]> git.pld-linux.org Git - packages/pyzy.git/blob - pyzy.spec
61706ea3cde8bc169ee2877a296e967f00c2a50c
[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:        3
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 URL:            https://github.com/pyzy/pyzy
18 BuildRequires:  boost-devel >= 1.39
19 BuildRequires:  glib2-devel >= 1:2.24.0
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  libuuid-devel
22 BuildRequires:  opencc-devel
23 BuildRequires:  pkgconfig
24 BuildRequires:  sqlite3-devel
25 Requires:       glib2 >= 1:2.24.0
26 Suggests:       %{name}-db = %{version}-%{release}
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 The Chinese Pinyin and Bopomofo conversion library.
31
32 %description -l pl.UTF-8
33 Biblioteka konwersji pisma chińskiego PinYin i Bopomofo.
34
35 %package common
36 Summary:        Common files for pyzy and phrase databases
37 Summary(pl.UTF-8):      Pliki wspólne dla pyzy i baz danych fraz
38 Group:          Libraries
39 %if "%{_rpmversion}" >= "4.6"
40 BuildArch:      noarch
41 %endif
42
43 %description common
44 Common files for pyzy and phrase databases.
45
46 %description common -l pl.UTF-8
47 Pliki wspólne dla pyzy i baz danych fraz.
48
49 %package devel
50 Summary:        Header files for pyzy library
51 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki pyzy
52 Group:          Development/Libraries
53 Requires:       %{name} = %{version}-%{release}
54 Requires:       glib2-devel >= 1:2.24.0
55 Requires:       libstdc++-devel
56
57 %description devel
58 Header files for pyzy library.
59
60 %description devel -l pl.UTF-8
61 Pliki nagłówkowe biblioteki pyzy.
62
63 %package static
64 Summary:        Static pyzy library
65 Summary(pl.UTF-8):      Statyczna biblioteka pyzy
66 Group:          Development/Libraries
67 Requires:       %{name}-devel = %{version}-%{release}
68
69 %description static
70 Static pyzy library.
71
72 %description static -l pl.UTF-8
73 Statyczna biblioteka pyzy.
74
75 %package db-open-phrase
76 Summary:        The open phrase database for pyzy
77 Summary(pl.UTF-8):      Baza danych open-phrase dla pyzy
78 Group:          Libraries
79 Requires:       %{name}-common = %{version}-%{release}
80 Provides:       %{name}-db = %{version}-%{release}
81 Obsoletes:      ibus-pinyin-db-open-phrase < 1.4.99
82 %if "%{_rpmversion}" >= "4.6"
83 BuildArch:      noarch
84 %endif
85
86 %description db-open-phrase
87 The phrase database for pyzy from open-phrase project.
88
89 %description db-open-phrase -l pl.UTF-8
90 Baza danych fraz dla pyzy pochodząca z projektu open-phrase.
91
92 %package db-android
93 Summary:        The android phrase database for pyzy
94 Summary(pl.UTF-8):      Baza danych android dla pyzy
95 Group:          Libraries
96 Requires:       %{name}-common = %{version}-%{release}
97 Provides:       %{name}-db = %{version}-%{release}
98 Obsoletes:      ibus-pinyin-db-android < 1.4.99
99 %if "%{_rpmversion}" >= "4.6"
100 BuildArch:      noarch
101 %endif
102
103 %description db-android
104 The phrase database for pyzy from android project.
105
106 %description db-android -l pl.UTF-8
107 Baza danych fraz dla pyzy pochodząca z projektu android.
108
109 %prep
110 %setup -q
111 cp %{SOURCE1} data/db/open-phrase
112
113 %build
114 %configure \
115         --disable-silent-rules \
116         --enable-boost \
117         --enable-db-open-phrase \
118         --enable-opencc \
119         %{?with_static_libs:--enable-static}
120
121 %{__make}
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125
126 %{__make} install \
127         DESTDIR=$RPM_BUILD_ROOT
128
129 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %post   -p /sbin/ldconfig
135 %postun -p /sbin/ldconfig
136
137 %files
138 %defattr(644,root,root,755)
139 %doc AUTHORS ChangeLog README
140 %attr(755,root,root) %{_libdir}/libpyzy-1.0.so.*.*.*
141 %attr(755,root,root) %ghost %{_libdir}/libpyzy-1.0.so.0
142
143 %files common
144 %defattr(644,root,root,755)
145 %dir %{_datadir}/pyzy
146 %{_datadir}/pyzy/phrases.txt
147 %dir %{_datadir}/pyzy/db
148 %{_datadir}/pyzy/db/create_index.sql
149
150 %files devel
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/libpyzy-1.0.so
153 %{_includedir}/pyzy-1.0
154 %{_pkgconfigdir}/pyzy-1.0.pc
155
156 %files static
157 %defattr(644,root,root,755)
158 %{_libdir}/libpyzy-1.0.a
159
160 %files db-open-phrase
161 %defattr(644,root,root,755)
162 %{_datadir}/pyzy/db/open-phrase.db
163
164 %files db-android
165 %defattr(644,root,root,755)
166 %{_datadir}/pyzy/db/android.db
This page took 0.066112 seconds and 2 git commands to generate.