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