]>
Commit | Line | Data |
---|---|---|
2749bbb7 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: Python 2 bindings for libcdio | |
7 | Summary(pl.UTF-8): Wiązania Pythona 2 do libcdio | |
180c8acb | 8 | Name: python-pycdio |
599ae605 | 9 | Version: 0.20 |
2749bbb7 | 10 | Release: 5 |
180c8acb JB |
11 | License: GPL v2+ |
12 | Group: Libraries/Python | |
13 | Source0: http://ftp.gnu.org/gnu/libcdio/pycdio-%{version}.tar.gz | |
599ae605 | 14 | # Source0-md5: 3f075574f661f49f4ede89aff9ff0cda |
2749bbb7 | 15 | Patch0: %{name}-update.patch |
180c8acb | 16 | URL: http://www.gnu.org/software/libcdio/ |
1763443f | 17 | BuildRequires: libcdio-devel >= 0.84 |
d4c132c2 | 18 | BuildRequires: pkgconfig |
2749bbb7 JB |
19 | %{?with_python2:BuildRequires: python-devel >= 1:2.3.5} |
20 | %{?with_python3:BuildRequires: python3-devel >= 1:3.2} | |
180c8acb | 21 | BuildRequires: rpm-pythonprov |
2749bbb7 JB |
22 | BuildRequires: rpmbuild(macros) >= 1.714 |
23 | BuildRequires: swig-python >= 3 | |
1763443f | 24 | Requires: libcdio >= 0.84 |
2749bbb7 | 25 | Requires: python-libs >= 1:2.3.5 |
180c8acb JB |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
2749bbb7 | 29 | Python 2 bindings for libcdio. |
180c8acb JB |
30 | |
31 | %description -l pl.UTF-8 | |
2749bbb7 JB |
32 | Wiązania Pythona 2 do libcdio. |
33 | ||
34 | %package -n python3-pycdio | |
35 | Summary: Python 3 bindings for libcdio | |
36 | Summary(pl.UTF-8): Wiązania Pythona 3 do libcdio | |
37 | Group: Libraries/Python | |
38 | Requires: libcdio >= 0.84 | |
39 | Requires: python3-libs >= 1:3.2 | |
40 | ||
41 | %description -n python3-pycdio | |
42 | Python 3 bindings for libcdio. | |
43 | ||
44 | %description -n python3-pycdio -l pl.UTF-8 | |
45 | Wiązania Pythona 3 do libcdio. | |
180c8acb JB |
46 | |
47 | %package examples | |
48 | Summary: Example programs using Python libcdio bindings | |
49 | Summary(pl.UTF-8): Przykładowe programy w Pythonie używające libcdio | |
50 | Group: Libraries/Python | |
51 | Requires: %{name} = %{version}-%{release} | |
52 | ||
53 | %description examples | |
54 | Example programs using Python libcdio bindings. | |
55 | ||
56 | %description examples -l pl.UTF-8 | |
57 | Przykładowe programy w Pythonie używające libcdio. | |
58 | ||
59 | %prep | |
60 | %setup -q -n pycdio-%{version} | |
2749bbb7 | 61 | %patch0 -p1 |
180c8acb JB |
62 | |
63 | %build | |
2749bbb7 | 64 | %if %{with python2} |
454d6e98 | 65 | %py_build |
2749bbb7 JB |
66 | %endif |
67 | ||
68 | %if %{with python3} | |
69 | %py3_build | |
70 | %endif | |
180c8acb JB |
71 | |
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
2749bbb7 | 75 | %if %{with python2} |
454d6e98 | 76 | %py_install |
180c8acb | 77 | |
2749bbb7 JB |
78 | %py_postclean |
79 | %endif | |
80 | ||
81 | %if %{with python3} | |
82 | %py3_install | |
83 | %endif | |
84 | ||
180c8acb JB |
85 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
86 | install example/{*.py,README} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
87 | ||
180c8acb JB |
88 | %clean |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
2749bbb7 | 91 | %if %{with python2} |
180c8acb JB |
92 | %files |
93 | %defattr(644,root,root,755) | |
2749bbb7 | 94 | %doc ChangeLog README.txt THANKS |
180c8acb JB |
95 | %attr(755,root,root) %{py_sitedir}/_pycdio.so |
96 | %attr(755,root,root) %{py_sitedir}/_pyiso9660.so | |
97 | %{py_sitedir}/cdio.py[co] | |
98 | %{py_sitedir}/iso9660.py[co] | |
99 | %{py_sitedir}/pycdio.py[co] | |
100 | %{py_sitedir}/pyiso9660.py[co] | |
478403e3 | 101 | %{py_sitedir}/pycdio-%{version}-py*.egg-info |
2749bbb7 JB |
102 | %endif |
103 | ||
104 | %if %{with python3} | |
105 | %files -n python3-pycdio | |
106 | %defattr(644,root,root,755) | |
107 | %doc ChangeLog README.txt THANKS | |
108 | %attr(755,root,root) %{py3_sitedir}/_pycdio.cpython-*.so | |
109 | %attr(755,root,root) %{py3_sitedir}/_pyiso9660.cpython-*.so | |
110 | %{py3_sitedir}/cdio.py | |
111 | %{py3_sitedir}/iso9660.py | |
112 | %{py3_sitedir}/pycdio.py | |
113 | %{py3_sitedir}/pyiso9660.py | |
114 | %{py3_sitedir}/__pycache__/cdio.cpython-*.py[co] | |
115 | %{py3_sitedir}/__pycache__/iso9660.cpython-*.py[co] | |
116 | %{py3_sitedir}/__pycache__/pycdio.cpython-*.py[co] | |
117 | %{py3_sitedir}/__pycache__/pyiso9660.cpython-*.py[co] | |
118 | %{py3_sitedir}/pycdio-%{version}-py*.egg-info | |
119 | %endif | |
180c8acb JB |
120 | |
121 | %files examples | |
122 | %defattr(644,root,root,755) | |
123 | %{_examplesdir}/%{name}-%{version} |