]>
Commit | Line | Data |
---|---|---|
9b3f8afb JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with python2 # CPython 2.x module [not supported as of 1.2] | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: Python wrapper for libcangjie, the library implementing the Cangjie input method | |
7 | Summary(pl.UTF-8): Interfejs Pythona do libcangjie - biblioteki implementującej metodę wprowadzania Cangjie | |
8 | Name: python-cangjie | |
caf70941 | 9 | Version: 1.3 |
18bba584 | 10 | Release: 4 |
9b3f8afb JB |
11 | License: LGPL v3+ |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://github.com/Cangjians/pycangjie/releases | |
14 | Source0: https://github.com/Cangjians/pycangjie/releases/download/v%{version}/cangjie-%{version}.tar.xz | |
caf70941 | 15 | # Source0-md5: 25a618f487a6e041d8ebe76881c83b22 |
9b3f8afb JB |
16 | URL: https://github.com/Cangjians/pycangjie |
17 | BuildRequires: autoconf >= 2.63 | |
18 | BuildRequires: automake >= 1:1.11 | |
19 | BuildRequires: libcangjie-devel >= 1.0 | |
20 | BuildRequires: libtool >= 2:2 | |
21 | BuildRequires: pkgconfig | |
22 | BuildRequires: rpm-pythonprov | |
23 | %if %{with python2} | |
24 | BuildRequires: python-Cython >= 0.14 | |
25 | BuildRequires: python-devel >= 2.0 | |
26 | %endif | |
27 | %if %{with python3} | |
28 | BuildRequires: python3-Cython >= 0.14 | |
29 | BuildRequires: python3-devel >= 1:3.2.3 | |
30 | %endif | |
31 | Requires: libcangjie >= 1.0 | |
32 | Requires: python-libs | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | This is a Python wrapper to libcangjie, the library implementing the | |
37 | Cangjie input method (for Chinese). | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | Ten pakiet zawiera interfejs Pythona do libcangjie - biblioteki | |
41 | implementującej metodę wprowadzania znaków chińskich Cangjie. | |
42 | ||
43 | %package -n python3-cangjie | |
44 | Summary: Python 3 wrapper for libcangjie, the library implementing the Cangjie input method | |
45 | Summary(pl.UTF-8): Interfejs Pythona 3 do libcangjie - biblioteki implementującej metodę wprowadzania Cangjie | |
46 | Group: Libraries/Python | |
47 | Requires: libcangjie >= 1.0 | |
48 | Requires: python3-libs >= 1:3.2.3 | |
49 | ||
50 | %description -n python3-cangjie | |
51 | This is a Python 3 wrapper to libcangjie, the library implementing the | |
52 | Cangjie input method (for Chinese). | |
53 | ||
54 | %description -n python3-cangjie -l pl.UTF-8 | |
55 | Ten pakiet zawiera interfejs Pythona 3 do libcangjie - biblioteki | |
56 | implementującej metodę wprowadzania znaków chińskich Cangjie. | |
57 | ||
58 | %prep | |
59 | %setup -q -n cangjie-%{version} | |
9b3f8afb JB |
60 | |
61 | %build | |
62 | %{__libtoolize} | |
63 | %{__aclocal} -I m4 | |
64 | %{__autoconf} | |
65 | %{__autoheader} | |
66 | %{__automake} | |
67 | %configure \ | |
68 | --disable-silent-rules | |
69 | ||
70 | %{__make} | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %{__make} install \ | |
76 | DESTDIR=$RPM_BUILD_ROOT | |
77 | ||
78 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/cangjie/*.la | |
79 | ||
80 | %clean | |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %if %{with python2} | |
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc AUTHORS README.md docs/*.md | |
87 | %dir %{py_sitedir}/cangjie | |
88 | %endif | |
89 | ||
90 | %if %{with python3} | |
91 | %files -n python3-cangjie | |
92 | %defattr(644,root,root,755) | |
93 | %doc AUTHORS README.md docs/*.md | |
94 | %dir %{py3_sitedir}/cangjie | |
95 | %attr(755,root,root) %{py3_sitedir}/cangjie/_core.so | |
96 | %attr(755,root,root) %{py3_sitedir}/cangjie/errors.so | |
97 | %attr(755,root,root) %{py3_sitedir}/cangjie/filters.so | |
98 | %attr(755,root,root) %{py3_sitedir}/cangjie/versions.so | |
99 | %{py3_sitedir}/cangjie/__init__.py | |
100 | %{py3_sitedir}/cangjie/__pycache__ | |
101 | %endif |