From b54f0964dad543609f8562a575179a712652ccb0 Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Wed, 25 Jun 2008 01:12:28 +0800 Subject: [PATCH] Add rpm build scripts. --- Makefile.am | 10 +++++ configure.ac | 1 + ibus.spec.in | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 ibus.spec.in diff --git a/Makefile.am b/Makefile.am index 8de4de90..1aeede31 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,6 +34,7 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ autogen.sh \ + ibus.spec.in \ python-config.py \ $(NULL) @@ -44,3 +45,12 @@ noinst_DIST = \ DISTCLEANFILES = \ po/stamp-it +rpm: dist ibus.spec + rpmbuild -bb \ + --define "_sourcedir `pwd`" \ + --define "_builddir `pwd`" \ + --define "_srcrpmdir `pwd`" \ + --define "_rpmdir `pwd`" \ + --define "_specdir `pwd`" \ + ibus.spec + diff --git a/configure.ac b/configure.ac index a14c3282..c95d2024 100644 --- a/configure.ac +++ b/configure.ac @@ -132,6 +132,7 @@ AM_GNU_GETTEXT_VERSION(0.16.1) # OUTPUT files AC_CONFIG_FILES([ po/Makefile.in Makefile +ibus.spec ibus/Makefile ibus/interface/Makefile ibusdaemon/Makefile diff --git a/ibus.spec.in b/ibus.spec.in new file mode 100644 index 00000000..fe272ef8 --- /dev/null +++ b/ibus.spec.in @@ -0,0 +1,113 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +# %define mod_path scim-@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@ +Name: ibus +Version: @PACKAGE_VERSION@ +Release: 1%{?dist} +Summary: Input bus for Linux OS +License: LGPLv2+ +Group: System Environment/Libraries +URL: http://code.google.com/p/ibus/ +Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: gettext-devel, libtool, python-devel, pygtk2-devel, perl(XML::Parser) gtk2-devel qt-devel +Requires: pygtk2 + +%description +Input bus for Linux OS + +%package gtk +Summary: IBus im module for gtk2 +Group: System Environment/Libraries +Requires: %{name} = %{version}-%{release} + +%description gtk +This package contains ibus im module for gtk2 + +%package qt +Summary: IBus im module for qt4 +Group: System Environment/Libraries +Requires: %{name} = %{version}-%{release} + +%description qt +This package contains ibus im module for qt4 + +%package enchant +Summary: IBus enchant engine +Group: System Environment/Libraries +BuildRequires: python-enchant +Requires: %{name} = %{version}-%{release} python-enchant + +%description enchant +This package contains an enchant IM engine. + +%package anthy +Summary: Anthy japanese IM engine +Group: System Environment/Libraries +Requires: %{name} = %{version}-%{release} anthy + +%description anthy +This package contains the anthy IM engine + + +Requires: %{name}-xingma = %{version}-%{release} + +%prep +%setup -q + +%build +%configure --disable-static +# make -C po update-gmo +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=${RPM_BUILD_ROOT} install +rm -f $RPM_BUILD_ROOT%{python_sitearch}/_anthy.la +rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/immodules/im-ibus.la + +# %find_lang %{name} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +# -f %{name}.lang +%defattr(-,root,root,-) +%doc AUTHORS COPYING README +%dir %{python_sitearch}/ibus +%{python_sitearch}/ibus/* +%dir %{_datadir}/ibus/ +%dir %{_datadir}/ibus/ibusdaemon/ +%dir %{_datadir}/ibus/panel/ +%dir %{_datadir}/ibus/engine/ +%dir %{_datadir}/ibus/icons/ +%{_datadir}/ibus/ibusdaemon/* +%{_datadir}/ibus/panel/* +%{_datadir}/ibus/engine/* +%{_datadir}/ibus/icons/* +%{_libexecdir}/ibus-daemon +%{_libexecdir}/ibus-panel + +%files gtk +%{_libdir}/gtk-2.0/immodules/im-ibus.so + +%files qt +%{_libdir}/qt4/plugins/inputmethods/libibus.so + +%files enchant +%dir %{_datadir}/ibus/engine/enchant +%{_datadir}/ibus/engine/enchant/* +%{_libexecdir}/ibus-engine-enchant + +%files anthy +%{python_sitearch}/_anthy.so +%{python_sitearch}/anthy.* +%dir %{_datadir}/ibus/engine/anthy +%{_datadir}/ibus/engine/anthy/* +%{_libexecdir}/ibus-engine-anthy + +%changelog +* Wed Jun 25 2008 Huang Peng - 0.1.0-1 +- The first version. -- 2.34.1