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