fcitx/fcitx.spec

144 lines
3.8 KiB
RPMSpec

%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/fcitx.conf
Name: fcitx
Summary: Free Chinese Input Toy for X (XIM)
Version: 4.0.1
Release: 2%{?dist}
License: GPLv2+
Group: User Interface/Desktops
URL: http://code.google.com/p/%{name}/
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}_all.tar.gz
Source1: xinput-%{name}
BuildRequires: pango-devel dbus-devel
BuildRequires: wget intltool chrpath
Requires: %{name}-libs = %{version}-%{release}
Requires: imsettings
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
%description
FCITX(Free Chinese Input Toy of X) is a collection of Simplified Chinese
input methods for Linux. It supports Pinyin, QuWei and Table-based input
methods. It's small and fast.
%package libs
Summary: Libraries for FCITX
Group: System Environment/Libraries
%description libs
The %{name}-libs package provides shared libraries for FCITX.
%package devel
Summary: Development files for FCITX
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: libX11-devel
%description devel
The %{name}-devel package contains libraries and header files necessary for
developing programs using FCITX libraries.
%prep
%setup -q
%build
%configure --disable-static \
--enable-dbus \
--enable-tray
make %{?_smp_mflags}
%install
make install INSTALL="install -p" DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/*.la
# remove rpath
chrpath --delete %{buildroot}%{_bindir}/{*PYMB,mb2org,fcitx,readPYBase}
# fix doc path
#mkdir __doc
#mv %{buildroot}%{_datadir}/%{name}/doc/* __doc
#rm -rf %{buildroot}%{_datadir}/%{name}/doc
#rm -f __doc/{API.txt,Develop_Readme*,fcitx_trunk.doxyfile}
# install xinput config file
install -pm 644 -D %{SOURCE1} %{buildroot}%{_xinputconf}
%find_lang %{name}
%clean
rm -rf %{buildroot}
%post
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 55 || :
%postun
if [ "$1" = "0" ]; then
%{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
# if alternative was set to manual, reset to auto
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
fi
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog THANKS TODO
#%doc __doc/*
%config %{_xinputconf}
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/pixmaps/*
%{_datadir}/applications/%{name}-configtool.desktop
%{_datadir}/applications/%{name}.desktop
%{_docdir}/%{name}/
%{_mandir}/man1/createPYMB.1.gz
%{_mandir}/man1/fcitx-remote.1.gz
%{_mandir}/man1/fcitx.1.gz
%{_mandir}/man1/mb2org.1.gz
%{_mandir}/man1/mb2txt.1.gz
%{_mandir}/man1/readPYBase.1.gz
%{_mandir}/man1/readPYMB.1.gz
%{_mandir}/man1/scel2org.1.gz
%{_mandir}/man1/txt2mb.1.gz
%files libs
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/libfcitx*.so.*
%files devel
%defattr(-,root,root,-)
%doc
%{_libdir}/libfcitx*.so
%{_libdir}/pkgconfig/fcitx*.pc
%{_includedir}/fcitx*
%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Dec 17 2010 Liang Suilong <liangsuilong@gmail.com> - 4.0.1-1
- Update to 4.0.1
* Fri Nov 19 2010 Chen Lei <supercyper@163.com> - 4.0.0-1
- Update to 4.0.0
* Mon Jun 14 2010 Chen Lei <supercyper@163.com> - 3.6.3-5.20100514svn_utf8
- Remove BR:libXext-devel
* Fri May 14 2010 Chen Lei <supercyper@163.com> - 3.6.3-4.20100514svn_utf8
- svn 365
* Sun Apr 18 2010 Chen Lei <supercyper@163.com> - 3.6.3-3.20100410svn_utf8
- Exclude xpm files
* Sat Apr 17 2010 Chen Lei <supercyper@163.com> - 3.6.3-2.20100410svn_utf8
- Update License tag
- Add more explanation for UTF-8 branch
* Mon Apr 12 2010 Chen Lei <supercyper@163.com> - 3.6.3-1.20100410svn_utf8
- Initial Package