]> git.pld-linux.org Git - packages/python-mutagen.git/blob - python-mutagen.spec
- added python3.9 compat patch, relup
[packages/python-mutagen.git] / python-mutagen.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 #
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
9 Name:           python-%{module}
10 Version:        1.42.0
11 Release:        8
12 License:        GPL v2+
13 Group:          Development/Languages/Python
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
17 Patch0:         apev2_python39.patch
18 URL:            https://github.com/quodlibet/mutagen
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.7
21 BuildRequires:  python-modules >= 1:2.7
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel >= 1:3.4
25 BuildRequires:  python3-modules >= 1:3.4
26 %endif
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.714
29 Requires:       python-modules >= 1:2.7
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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
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,
41 ID3v2.2, ID3v2.3, ID3v2.4, APEv2 i FLAC oraz zapis ID3v1.1, ID3v2.4,
42 APEv2 i FLAC.
43
44 %package tools
45 Summary:        Simple tools for reading and writing audio metadata
46 Summary(pl.UTF-8):      Proste narzędzia do odczytu i zapisu metadanych dźwiękowych
47 Group:          Applications/Multimedia
48 %if %{with python2}
49 Requires:       %{name} = %{version}-%{release}
50 %else
51 Requires:       python3-%{module} = %{version}-%{release}
52 %endif
53
54 %description tools
55 Simple tools for reading and writting audio metadata.
56
57 %description tools -l pl.UTF-8
58 Proste narzędzia do odczytu i zapisu metadanych dźwiękowych.
59
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
64 Requires:       python3-modules >= 1:3.4
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
77 %prep
78 %setup -q -n %{module}-%{version}
79 %patch0 -p1
80
81 %build
82 %if %{with python2}
83 %py_build
84 %endif
85
86 %if %{with python3}
87 %py3_build
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python3}
94 %py3_install
95 %endif
96
97 %if %{with python2}
98 %if %{with python3}
99 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*
100 %endif
101 %py_install
102
103 %py_postclean
104 %endif
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %if %{with python2}
110 %files
111 %defattr(644,root,root,755)
112 %doc NEWS README.rst
113 %{py_sitescriptdir}/mutagen
114 %{py_sitescriptdir}/mutagen-%{version}-py*.egg-info
115 %endif
116
117 %files tools
118 %defattr(644,root,root,755)
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
This page took 0.078516 seconds and 3 git commands to generate.