Blob Blame History Raw
%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/xsunpinyin.conf
%define gitdate 20130710

Name:		sunpinyin
Version:	2.0.4
Release:	0.14%{?dist}
Summary:	A statistical language model based Chinese input method engine
Group:		System Environment/Libraries
License:	LGPLv2 or CDDL
URL:		http://code.google.com/p/sunpinyin/
Source0:	%{name}-%{gitdate}.tar.xz
Source2:	http://open-gram.googlecode.com/files/lm_sc.t3g.arpa-20121025.tar.bz2
Source3:	http://open-gram.googlecode.com/files/dict.utf8-20130220.tar.bz2
Patch0:		sunpinyin-aarch64.patch
BuildRequires:	sqlite-devel
BuildRequires:	gettext	
BuildRequires:	scons
BuildRequires:	perl(Pod::Man)
BuildRequires:	python-devel

%description
Sunpinyin is an input method engine for Simplified Chinese. It is an SLM based
IM engine, and features full sentence input.

SunPinyin has been ported to various input method platforms and operating 
systems. The 2.0 release currently supports iBus, XIM, and Mac OS X. 

%package devel
Summary:	Development files for %{name}
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files that allows user
to write their own front-end for sunpinyin.

%package data
Summary:	Little-endian data files for %{name}
Group:		System Environment/Libraries
License:	CC-BY-SA
Obsoletes:	%{name}-data-le
Obsoletes:	%{name}-data-be

%description data
The %{name}-data package contains necessary lexicon data and its index data
files needed by the sunpinyin input methods.

%prep
%setup -q -n %{name}-%{gitdate}
%patch0 -p1
mkdir -p raw
cp %SOURCE2 raw
cp %SOURCE3 raw
pushd raw
tar xvf lm_sc.t3g.arpa-20121025.tar.bz2
tar xvf dict.utf8-20130220.tar.bz2
popd

%build
scons %{?_smp_mflags} --prefix=%{_prefix} --libdir=%{_libdir} --datadir=%{_datadir}
export PATH=`pwd`/src:$PATH
pushd raw
ln -sf ../doc/SLM-inst.mk Makefile
make %{?_smp_mflags} VERBOSE=1
popd

%install
scons %{?_smp_mflags} --prefix=%{_prefix} --libdir=%{_libdir} --datadir=%{_datadir} install --install-sandbox=%{buildroot}
pushd raw
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
popd

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING *.LICENSE
%doc README TODO
%{_libdir}/libsunpinyin*.so.*
%{_docdir}/%{name}/README

%files devel
%defattr(-,root,root,-)
%{_libdir}/libsunpinyin*.so
%{_libdir}/pkgconfig/sunpinyin*.pc
%{_includedir}/sunpinyin*

%files data
%defattr(-,root,root,-)
%{_datadir}/%{name}
%{_bindir}/*
%{_mandir}/man1/*.1.gz
%{_docdir}/%{name}/SLM-*.mk

%changelog
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.0.4-0.13
- Rebuilt for GCC 5 C++11 ABI change

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Mon Jun 16 2014 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 2.0.4-0.11
- Handle AArch64 as well

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Jul 10 2013 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.8
- Upstream to the latest git snapshot

* Sun Feb 24 2013 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.7
- Drop ibus-sunpinyin
- Drop xsunpinyin
- Architecture-dependent data file
- Upstream sunpinyin data file

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sun Jul 28 2012 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.5
- Fix the spec file for building fcitx-sunpinyin

* Thu Jul 26 2012 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.4
- Upstream to the latest git snapshot

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sun Jun 03 2012 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.2
- Upstream to the latest git snapshot

* Sun May 13 2012 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.1
- Upstream to the latest git snapshot
- Add BR: python-devel
- Upgrade to the latest SLM Data
- Drop the patch: sunpinyin-fixes-unistd-compile.patch

* Tue Mar 06 2012  Peng Wu <pwu@redhat.com> - 2.0.3-4
- Rebuilt for ibus-1.4.99

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 2.0.3-2
- Rebuild for new libpng

* Fri Feb 18 2011 Howard Ning <mrlhwliberty@gmail.com> - 2.0.3-1
- New upstream

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Nov 26 2010  Peng Wu <pwu@redhat.com> - 2.0.2-4
- Fixes build for ibus 1.4

* Thu Aug 19 2010 Chen Lei <supercyper@163.com> - 2.0.2-3
- Rebuild for Rawhide

* Thu Aug 19 2010 Chen Lei <supercyper@163.com> - 2.0.2-2
- Add seperate license field to data files

* Mon Aug 16 2010 Chen Lei <supercyper@163.com> - 2.0.2-1
- Initial Package