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