Name:       	m17n-db
Version:    	1.7.0
Release:    	1%{?dist}
Summary:	Multilingualization datafiles for m17n-lib
Summary(ja):    m17n-lib 用の多言語化データファイル

License:	LGPLv2+
Group:		System Environment/Libraries
URL:	        http://www.nongnu.org/m17n

Source0: 	http://download-mirror.savannah.gnu.org/releases/m17n/%{name}-%{version}.tar.gz
## Till the Inscript2 gets upstreamed in m17n-lib, use this source
Source1:	https://fedorahosted.org/releases/i/n/inscript2/inscript2-20120320.tar.gz
# Following is awaiting for upstream commit
Source2:	https://raw.githubusercontent.com/gnuman/m17n-inglish-mims/master/minglish/minglish.mim

BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	gettext

Vendor:		Project Vine
Distribution:	Vine Linux

%description
This package contains multilingualization (m17n) datafiles for m17n-lib
which describe input maps, encoding maps, OpenType font data and
font layout text rendering for languages.

%package devel
Summary:  	Development files for m17n-db
Summary(ja):  	m17n-db の開発用ファイル
Group:		Development/Libraries
Requires: 	%{name} = %{version}-%{release}

%description devel
m17n-db development files

%prep
%setup -q

##extract inscript2 maps
tar xzf %{SOURCE1}

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"

# don't ship unijoy map for now
rm $RPM_BUILD_ROOT%{_datadir}/m17n/bn-unijoy.mim
rm $RPM_BUILD_ROOT%{_datadir}/m17n/icons/bn-unijoy.png

#removing ispell.mim for rh#587927
rm $RPM_BUILD_ROOT%{_datadir}/m17n/ispell.mim

#install inscript2 keymaps
pwd
cp -p inscript2/IM/* $RPM_BUILD_ROOT%{_datadir}/m17n/
cp -p inscript2/icons/* $RPM_BUILD_ROOT%{_datadir}/m17n/icons

# install minglish keymap
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/m17n

%find_lang %{name}

%check
make check

%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_datadir}/m17n

%files devel
%defattr(-,root,root)
%{_bindir}/m17n-db
%{_datadir}/pkgconfig/m17n-db.pc

%changelog
* Thu Apr  2 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.7.0-1
- updated to 1.7.0
- added SOURCE1 and SOURCE2 from Fedora
  * Wed Feb 25 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.7.0-2
  - Added Minglish input method (rh#1191543)
  * Wed Mar 12 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.6.5-2
  - Add missing install commands for inscript2 maps
- split development files into devel subpackage
  
* Sun Jul 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.5-1
- update to 1.6.5

* Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.5.5-3
- rebuild with VineSeed environment

* Wed Oct 06 2010 Shu KONNO <owa@bg.wakwak.com> 1.5.5-2
- rebuilt with rpm-4.8.1 for pkg-config

* Sun Feb  7 2010 IWAI, Masaharu <iwai@alib.jp> 1.5.5-1
- new upstream relase

* Wed Apr  1 2009 IWAI, Masaharu <iwai@alib.jp> 1.5.4-1
- initial release


