]> git.pld-linux.org Git - SPECS.git/blob - pyzy.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.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 BuildArch:      noarch
47
48 %description common
49 Common files for pyzy and phrase databases.
50
51 %description common -l pl.UTF-8
52 Pliki wspólne dla pyzy i baz danych fraz.
53
54 %package devel
55 Summary:        Header files for pyzy library
56 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki pyzy
57 Group:          Development/Libraries
58 Requires:       %{name} = %{version}-%{release}
59 Requires:       glib2-devel >= 1:2.24.0
60 Requires:       libstdc++-devel
61
62 %description devel
63 Header files for pyzy library.
64
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe biblioteki pyzy.
67
68 %package static
69 Summary:        Static pyzy library
70 Summary(pl.UTF-8):      Statyczna biblioteka pyzy
71 Group:          Development/Libraries
72 Requires:       %{name}-devel = %{version}-%{release}
73
74 %description static
75 Static pyzy library.
76
77 %description static -l pl.UTF-8
78 Statyczna biblioteka pyzy.
79
80 %package db-open-phrase
81 Summary:        The open phrase database for pyzy
82 Summary(pl.UTF-8):      Baza danych open-phrase dla pyzy
83 Group:          Libraries
84 Requires:       %{name}-common = %{version}-%{release}
85 Provides:       %{name}-db = %{version}-%{release}
86 Obsoletes:      ibus-pinyin-db-open-phrase < 1.4.99
87 BuildArch:      noarch
88
89 %description db-open-phrase
90 The phrase database for pyzy from open-phrase project.
91
92 %description db-open-phrase -l pl.UTF-8
93 Baza danych fraz dla pyzy pochodząca z projektu open-phrase.
94
95 %package db-android
96 Summary:        The android phrase database for pyzy
97 Summary(pl.UTF-8):      Baza danych android dla pyzy
98 Group:          Libraries
99 Requires:       %{name}-common = %{version}-%{release}
100 Provides:       %{name}-db = %{version}-%{release}
101 Obsoletes:      ibus-pinyin-db-android < 1.4.99
102 BuildArch:      noarch
103
104 %description db-android
105 The phrase database for pyzy from android project.
106
107 %description db-android -l pl.UTF-8
108 Baza danych fraz dla pyzy pochodząca z projektu android.
109
110 %prep
111 %setup -q
112 %patch0 -p1
113
114 cp -f %{SOURCE1} data/db/open-phrase
115
116 # update to support newer compilers
117 cp -f %{SOURCE2} m4/boost.m4
118
119 %build
120 %{__libtoolize}
121 %{__aclocal} -I m4
122 %{__autoconf}
123 %{__autoheader}
124 %{__automake}
125 %configure \
126         --disable-silent-rules \
127         --enable-boost \
128         --enable-db-open-phrase \
129         --enable-opencc \
130         %{?with_static_libs:--enable-static}
131
132 %{__make}
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136
137 %{__make} install \
138         DESTDIR=$RPM_BUILD_ROOT
139
140 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %post   -p /sbin/ldconfig
146 %postun -p /sbin/ldconfig
147
148 %files
149 %defattr(644,root,root,755)
150 %doc AUTHORS ChangeLog README
151 %attr(755,root,root) %{_libdir}/libpyzy-1.0.so.*.*.*
152 %attr(755,root,root) %ghost %{_libdir}/libpyzy-1.0.so.0
153
154 %files common
155 %defattr(644,root,root,755)
156 %dir %{_datadir}/pyzy
157 %{_datadir}/pyzy/phrases.txt
158 %dir %{_datadir}/pyzy/db
159 %{_datadir}/pyzy/db/create_index.sql
160
161 %files devel
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_libdir}/libpyzy-1.0.so
164 %{_includedir}/pyzy-1.0
165 %{_pkgconfigdir}/pyzy-1.0.pc
166
167 %if %{with static_libs}
168 %files static
169 %defattr(644,root,root,755)
170 %{_libdir}/libpyzy-1.0.a
171 %endif
172
173 %files db-open-phrase
174 %defattr(644,root,root,755)
175 %{_datadir}/pyzy/db/open-phrase.db
176
177 %files db-android
178 %defattr(644,root,root,755)
179 %{_datadir}/pyzy/db/android.db
This page took 0.607116 seconds and 3 git commands to generate.