]>
Commit | Line | Data |
---|---|---|
d279805c | 1 | # |
0265fb28 JB |
2 | # Conditional build: |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
aa3ac0e1 | 5 | # |
0265fb28 JB |
6 | %define module mutagen |
7 | Summary: Audio metadata reader/writer for Python 2 | |
8 | Summary(pl.UTF-8): Moduł Pythona 2 do odczytu i zapisu metadanych dźwiękowych | |
aa3ac0e1 | 9 | Name: python-%{module} |
0265fb28 | 10 | Version: 1.37 |
e8572461 | 11 | Release: 2 |
0265fb28 | 12 | License: GPL v2+ |
0cfdc234 | 13 | Group: Development/Languages/Python |
550c4ddf | 14 | Source0: https://bitbucket.org/lazka/mutagen/downloads/mutagen-%{version}.tar.gz |
0265fb28 | 15 | # Source0-md5: da993427407854c94d491824666293ba |
550c4ddf | 16 | URL: https://bitbucket.org/lazka/mutagen/ |
0265fb28 JB |
17 | %if %{with python2} |
18 | BuildRequires: python-devel >= 1:2.7 | |
19 | BuildRequires: python-modules >= 1:2.7 | |
20 | %endif | |
21 | %if %{with python3} | |
22 | BuildRequires: python3-devel >= 1:3.3 | |
23 | BuildRequires: python3-modules >= 1:3.3 | |
24 | %endif | |
3455509f | 25 | BuildRequires: rpm-pythonprov |
0265fb28 JB |
26 | BuildRequires: rpmbuild(macros) >= 1.714 |
27 | Requires: python-modules >= 1:2.7 | |
aa3ac0e1 AF |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
b5268bc1 JB |
31 | Mutagen is an audio metadata tag reader and writer implemented in pure |
32 | Python. It supports reading ID3v1.1, ID3v2.2, ID3v2.3, ID3v2.4, APEv2, | |
33 | and FLAC, and writing ID3v1.1, ID3v2.4, APEv2, and FLAC. | |
34 | ||
e99f02a9 JR |
35 | %description -l pl.UTF-8 |
36 | Mutagen to moduł do odczytu i zapisu znaczników metadanych dźwiękowych | |
37 | zaimplementowany w czystym Pythonie. Obsługuje odczyt ID3v1.1, | |
b5268bc1 JB |
38 | ID3v2.2, ID3v2.3, ID3v2.4, APEv2 i FLAC oraz zapis ID3v1.1, ID3v2.4, |
39 | APEv2 i FLAC. | |
aa3ac0e1 | 40 | |
1bd02b5a AF |
41 | %package tools |
42 | Summary: Simple tools for reading and writing audio metadata | |
d480a941 | 43 | Summary(pl.UTF-8): Proste narzędzia do odczytu i zapisu metadanych dźwiękowych |
0cfdc234 | 44 | Group: Applications/Multimedia |
0265fb28 | 45 | %if %{with python2} |
1bd02b5a | 46 | Requires: %{name} = %{version}-%{release} |
0265fb28 JB |
47 | %else |
48 | Requires: python3-%{module} = %{version}-%{release} | |
49 | %endif | |
1bd02b5a AF |
50 | |
51 | %description tools | |
52 | Simple tools for reading and writting audio metadata. | |
53 | ||
e99f02a9 JR |
54 | %description tools -l pl.UTF-8 |
55 | Proste narzędzia do odczytu i zapisu metadanych dźwiękowych. | |
a673058c | 56 | |
0265fb28 JB |
57 | %package -n python3-%{module} |
58 | Summary: Audio metadata reader/writer for Python 3 | |
59 | Summary(pl.UTF-8): Moduł Pythona 3 do odczytu i zapisu metadanych dźwiękowych | |
60 | Group: Development/Languages/Python | |
e8572461 | 61 | Requires: python3-modules >= 1:3.3 |
0265fb28 JB |
62 | |
63 | %description -n python3-%{module} | |
64 | Mutagen is an audio metadata tag reader and writer implemented in pure | |
65 | Python. It supports reading ID3v1.1, ID3v2.2, ID3v2.3, ID3v2.4, APEv2, | |
66 | and FLAC, and writing ID3v1.1, ID3v2.4, APEv2, and FLAC. | |
67 | ||
68 | %description -n python3-%{module} -l pl.UTF-8 | |
69 | Mutagen to moduł do odczytu i zapisu znaczników metadanych dźwiękowych | |
70 | zaimplementowany w czystym Pythonie. Obsługuje odczyt ID3v1.1, | |
71 | ID3v2.2, ID3v2.3, ID3v2.4, APEv2 i FLAC oraz zapis ID3v1.1, ID3v2.4, | |
72 | APEv2 i FLAC. | |
73 | ||
aa3ac0e1 AF |
74 | %prep |
75 | %setup -q -n %{module}-%{version} | |
76 | ||
77 | %build | |
0265fb28 | 78 | %if %{with python2} |
89853bf7 | 79 | %py_build |
0265fb28 JB |
80 | %endif |
81 | ||
82 | %if %{with python3} | |
83 | %py3_build | |
84 | %endif | |
aa3ac0e1 AF |
85 | |
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
0265fb28 JB |
89 | %if %{with python3} |
90 | %py3_install | |
91 | %endif | |
92 | ||
93 | %if %{with python2} | |
89853bf7 | 94 | %py_install |
0cfdc234 | 95 | %py_postclean |
0265fb28 | 96 | %endif |
aa3ac0e1 AF |
97 | |
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
0265fb28 | 101 | %if %{with python2} |
d279805c | 102 | %files |
aa3ac0e1 | 103 | %defattr(644,root,root,755) |
550c4ddf | 104 | %doc NEWS README.rst |
0265fb28 JB |
105 | %{py_sitescriptdir}/mutagen |
106 | %{py_sitescriptdir}/mutagen-%{version}-py*.egg-info | |
107 | %endif | |
1bd02b5a AF |
108 | |
109 | %files tools | |
110 | %defattr(644,root,root,755) | |
0265fb28 JB |
111 | %attr(755,root,root) %{_bindir}/mid3cp |
112 | %attr(755,root,root) %{_bindir}/mid3iconv | |
113 | %attr(755,root,root) %{_bindir}/mid3v2 | |
114 | %attr(755,root,root) %{_bindir}/moggsplit | |
115 | %attr(755,root,root) %{_bindir}/mutagen-inspect | |
116 | %attr(755,root,root) %{_bindir}/mutagen-pony | |
117 | %{_mandir}/man1/mid3cp.1* | |
118 | %{_mandir}/man1/mid3iconv.1* | |
119 | %{_mandir}/man1/mid3v2.1* | |
120 | %{_mandir}/man1/moggsplit.1* | |
121 | %{_mandir}/man1/mutagen-inspect.1* | |
122 | %{_mandir}/man1/mutagen-pony.1* | |
123 | ||
124 | %if %{with python3} | |
125 | %files -n python3-%{module} | |
126 | %defattr(644,root,root,755) | |
127 | %{py3_sitescriptdir}/mutagen | |
128 | %{py3_sitescriptdir}/mutagen-%{version}-py*.egg-info | |
129 | %endif |