]> git.pld-linux.org Git - packages/pyzy.git/blob - pyzy.spec
- added opencc-1 patch (adjust for opencc 1.0.x API)
[packages/pyzy.git] / pyzy.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 #
5 Summary:        The Chinese PinYin and Bopomofo conversion library
6 Summary(pl.UTF-8):      Biblioteka konwersji pisma chińskiego PinYin i Bopomofo
7 Name:           pyzy
8 Version:        0.1.0
9 Release:        4
10 License:        LGPL v2.1+
11 Group:          Libraries
12 #Source0Download: http://code.google.com/p/pyzy/downloads/list
13 Source0:        http://pyzy.googlecode.com/files/%{name}-%{version}.tar.gz
14 # Source0-md5:  73afc3c20808af2fee5f9fca47c64630
15 Source1:        http://pyzy.googlecode.com/files/%{name}-database-1.0.0.tar.bz2
16 # Source1-md5:  d0951b8daa7f56a2cbd3b6b4e42532e0
17 Source2:        https://raw.githubusercontent.com/tsuna/boost.m4/3d67ee84e9149f6279a8df2113f5a86f0a83bd0d/build-aux/boost.m4
18 # Source2-md5:  86092bd75ae3e9109891646b21cc433e
19 # https://github.com/hillwoodroc/pyzy/commit/344872231b95ce7c2808288101cc563dcd011940.patch
20 Patch0:         %{name}-opencc-1.patch
21 URL:            https://github.com/pyzy/pyzy
22 BuildRequires:  autoconf >= 2.62
23 BuildRequires:  automake >= 1:1.11
24 BuildRequires:  boost-devel >= 1.39
25 BuildRequires:  glib2-devel >= 1:2.24.0
26 BuildRequires:  libstdc++-devel
27 BuildRequires:  libtool >= 2:1.5
28 BuildRequires:  libuuid-devel
29 BuildRequires:  opencc-devel >= 1.0.2
30 BuildRequires:  pkgconfig
31 BuildRequires:  sqlite3-devel
32 Requires:       glib2 >= 1:2.24.0
33 Suggests:       %{name}-db = %{version}-%{release}
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 The Chinese Pinyin and Bopomofo conversion library.
38
39 %description -l pl.UTF-8
40 Biblioteka konwersji pisma chińskiego PinYin i Bopomofo.
41
42 %package common
43 Summary:        Common files for pyzy and phrase databases
44 Summary(pl.UTF-8):      Pliki wspólne dla pyzy i baz danych fraz
45 Group:          Libraries
46 %if "%{_rpmversion}" >= "4.6"
47 BuildArch:      noarch
48 %endif
49
50 %description common
51 Common files for pyzy and phrase databases.
52
53 %description common -l pl.UTF-8
54 Pliki wspólne dla pyzy i baz danych fraz.
55
56 %package devel
57 Summary:        Header files for pyzy library
58 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki pyzy
59 Group:          Development/Libraries
60 Requires:       %{name} = %{version}-%{release}
61 Requires:       glib2-devel >= 1:2.24.0
62 Requires:       libstdc++-devel
63
64 %description devel
65 Header files for pyzy library.
66
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe biblioteki pyzy.
69
70 %package static
71 Summary:        Static pyzy library
72 Summary(pl.UTF-8):      Statyczna biblioteka pyzy
73 Group:          Development/Libraries
74 Requires:       %{name}-devel = %{version}-%{release}
75
76 %description static
77 Static pyzy library.
78
79 %description static -l pl.UTF-8
80 Statyczna biblioteka pyzy.
81
82 %package db-open-phrase
83 Summary:        The open phrase database for pyzy
84 Summary(pl.UTF-8):      Baza danych open-phrase dla pyzy
85 Group:          Libraries
86 Requires:       %{name}-common = %{version}-%{release}
87 Provides:       %{name}-db = %{version}-%{release}
88 Obsoletes:      ibus-pinyin-db-open-phrase < 1.4.99
89 %if "%{_rpmversion}" >= "4.6"
90 BuildArch:      noarch
91 %endif
92
93 %description db-open-phrase
94 The phrase database for pyzy from open-phrase project.
95
96 %description db-open-phrase -l pl.UTF-8
97 Baza danych fraz dla pyzy pochodząca z projektu open-phrase.
98
99 %package db-android
100 Summary:        The android phrase database for pyzy
101 Summary(pl.UTF-8):      Baza danych android dla pyzy
102 Group:          Libraries
103 Requires:       %{name}-common = %{version}-%{release}
104 Provides:       %{name}-db = %{version}-%{release}
105 Obsoletes:      ibus-pinyin-db-android < 1.4.99
106 %if "%{_rpmversion}" >= "4.6"
107 BuildArch:      noarch
108 %endif
109
110 %description db-android
111 The phrase database for pyzy from android project.
112
113 %description db-android -l pl.UTF-8
114 Baza danych fraz dla pyzy pochodząca z projektu android.
115
116 %prep
117 %setup -q
118 %patch0 -p1
119
120 cp -f %{SOURCE1} data/db/open-phrase
121
122 # update to support newer compilers
123 cp -f %{SOURCE2} m4/boost.m4
124
125 %build
126 %{__libtoolize}
127 %{__aclocal} -I m4
128 %{__autoconf}
129 %{__autoheader}
130 %{__automake}
131 %configure \
132         --disable-silent-rules \
133         --enable-boost \
134         --enable-db-open-phrase \
135         --enable-opencc \
136         %{?with_static_libs:--enable-static}
137
138 %{__make}
139
140 %install
141 rm -rf $RPM_BUILD_ROOT
142
143 %{__make} install \
144         DESTDIR=$RPM_BUILD_ROOT
145
146 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %post   -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
153
154 %files
155 %defattr(644,root,root,755)
156 %doc AUTHORS ChangeLog README
157 %attr(755,root,root) %{_libdir}/libpyzy-1.0.so.*.*.*
158 %attr(755,root,root) %ghost %{_libdir}/libpyzy-1.0.so.0
159
160 %files common
161 %defattr(644,root,root,755)
162 %dir %{_datadir}/pyzy
163 %{_datadir}/pyzy/phrases.txt
164 %dir %{_datadir}/pyzy/db
165 %{_datadir}/pyzy/db/create_index.sql
166
167 %files devel
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_libdir}/libpyzy-1.0.so
170 %{_includedir}/pyzy-1.0
171 %{_pkgconfigdir}/pyzy-1.0.pc
172
173 %if %{with static_libs}
174 %files static
175 %defattr(644,root,root,755)
176 %{_libdir}/libpyzy-1.0.a
177 %endif
178
179 %files db-open-phrase
180 %defattr(644,root,root,755)
181 %{_datadir}/pyzy/db/open-phrase.db
182
183 %files db-android
184 %defattr(644,root,root,755)
185 %{_datadir}/pyzy/db/android.db
This page took 0.069479 seconds and 3 git commands to generate.