summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2011-11-14 10:29:38 -0500
committerPeng Huang <shawn.p.huang@gmail.com>2011-11-14 10:29:38 -0500
commitd4a3a174b8654bdd8961158845e9aba5c9c098b7 (patch)
treead2f7734f08783bbf4c680363d0d86d0f4759fcb
parenta1759127c553c77acee1f383c84e5155ec298fca (diff)
downloadpyzy-d4a3a174b8654bdd8961158845e9aba5c9c098b7.tar.gz
Fix build rpm errors.
BUG=build rpm errors TEST=make rpm Review URL: http://codereview.appspot.com/5371058
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac2
-rw-r--r--pyzy.spec.in (renamed from libpyzy.spec.in)45
3 files changed, 32 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am
index e1846f0..0584967 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,7 @@ ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
autogen.sh \
- libpyzy.spec.in \
+ @PACKAGE_NAME@.spec.in \
$(NULL)
noinst_DIST = \
@@ -117,7 +117,7 @@ dpkg: dist debian/changelog
upload: dist
./tools/googlecode_upload.py \
- -s "libpyzy source code" \
+ -s "pyzy source code" \
-p ibus \
-l "Type-Source,OpSys-Linux,Chinese,Unstable" \
$(distdir).tar.gz
diff --git a/configure.ac b/configure.ac
index 199ce8b..92b503f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,7 +184,7 @@ AM_CONDITIONAL(IBUS_BUILD_DB_OPEN_PHRASE, [test x"$enable_db_open_phrase" = x"ye
# OUTPUT files
AC_CONFIG_FILES([
Makefile
-libpyzy.spec
+pyzy.spec
pyzy-1.0.pc
src/Makefile
data/Makefile
diff --git a/libpyzy.spec.in b/pyzy.spec.in
index e5f0181..acbff90 100644
--- a/libpyzy.spec.in
+++ b/pyzy.spec.in
@@ -15,35 +15,43 @@ BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: sqlite-devel
BuildRequires: libuuid-devel
-BuildRequires: boost-devel >= 1.39
BuildRequires: gtest-devel
# Requires(post): sqlite
-Requires: libpyzy-db = %{version}-%{release}
+Requires: pyzy-db = %{version}-%{release}
%description
The Chinese Pinyin and Bopomofo conversion library.
+%package devel
+Summary: Development tools for pyzy
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: glib2-devel
+
+%description devel
+The pyzy-devel package contains the header files for pyzy.
+
%package db-open-phrase
-Summary: The open phrase database for libpyzy
+Summary: The open phrase database for pyzy
Group: System Environment/Libraries
BuildArch: noarch
-Provides: libpyzy-db
+Provides: pyzy-db
Requires(post): sqlite
%description db-open-phrase
-The phrase database for libpyzy from open-phrase project.
+The phrase database for pyzy from open-phrase project.
%package db-android
-Summary: The android phrase database for libpyzy
+Summary: The android phrase database for pyzy
Group: System Environment/Libraries
BuildArch: noarch
-Provides: libpyzy-db
+Provides: pyzy-db
Requires(post): sqlite
%description db-android
-The phrase database for libpyzy from android project.
+The phrase database for pyzy from android project.
%prep
%setup -q
@@ -57,34 +65,39 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
# make DESTDIR=${RPM_BUILD_ROOT} NO_INDEX=true install
-make DESTDIR=${RPM_BUILD_ROOT} install
-
-%find_lang %{name}
+make DESTDIR=$RPM_BUILD_ROOT install
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%clean
rm -rf $RPM_BUILD_ROOT
%post
-# cd %{_datadir}/libpyzy/db
+# cd %{_datadir}/@PACKAGE@/db
# sqlite3 android.db ".read create_index.sql"
%post db-open-phrase
-# cd %{_datadir}/libpyzy/db
+# cd %{_datadir}/@PACKAGE@/db
# sqlite3 open-phrase.db ".read create_index.sql"
%post db-android
-# cd %{_datadir}/libpyzy/db
+# cd %{_datadir}/@PACKAGE@/db
# sqlite3 android.db ".read create_index.sql"
-%files -f %{name}.lang
+%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
+%{_libdir}/lib*.so.*
%{_datadir}/@PACKAGE@/phrases.txt
-%{_datadir}/@PACKAGE@/icons
%{_datadir}/@PACKAGE@/db/create_index.sql
%dir %{_datadir}/@PACKAGE@
%dir %{_datadir}/@PACKAGE@/db
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/lib*.so
+%{_libdir}/pkgconfig/*
+%{_includedir}/*
+
%files db-open-phrase
%{_datadir}/@PACKAGE@/db/open-phrase.db