]> git.pld-linux.org Git - packages/python-pycdio.git/blob - python-pycdio.spec
- added update patch (fix build with libcdio 1.0.0: remove obsolete constant)
[packages/python-pycdio.git] / python-pycdio.spec
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
8 Name:           python-pycdio
9 Version:        0.20
10 Release:        5
11 License:        GPL v2+
12 Group:          Libraries/Python
13 Source0:        http://ftp.gnu.org/gnu/libcdio/pycdio-%{version}.tar.gz
14 # Source0-md5:  3f075574f661f49f4ede89aff9ff0cda
15 Patch0:         %{name}-update.patch
16 URL:            http://www.gnu.org/software/libcdio/
17 BuildRequires:  libcdio-devel >= 0.84
18 BuildRequires:  pkgconfig
19 %{?with_python2:BuildRequires:  python-devel >= 1:2.3.5}
20 %{?with_python3:BuildRequires:  python3-devel >= 1:3.2}
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 BuildRequires:  swig-python >= 3
24 Requires:       libcdio >= 0.84
25 Requires:       python-libs >= 1:2.3.5
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Python 2 bindings for libcdio.
30
31 %description -l pl.UTF-8
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.
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}
61 %patch0 -p1
62
63 %build
64 %if %{with python2}
65 %py_build
66 %endif
67
68 %if %{with python3}
69 %py3_build
70 %endif
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 %if %{with python2}
76 %py_install
77
78 %py_postclean
79 %endif
80
81 %if %{with python3}
82 %py3_install
83 %endif
84
85 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
86 install example/{*.py,README} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %files
93 %defattr(644,root,root,755)
94 %doc ChangeLog README.txt THANKS
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]
101 %{py_sitedir}/pycdio-%{version}-py*.egg-info
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
120
121 %files examples
122 %defattr(644,root,root,755)
123 %{_examplesdir}/%{name}-%{version}
This page took 0.085652 seconds and 3 git commands to generate.