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