]> git.pld-linux.org Git - packages/python-mutagen.git/blob - python-mutagen.spec
rebuild with tests and docs
[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:        7
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 URL:            https://github.com/quodlibet/mutagen
18 %if %{with python2}
19 BuildRequires:  python-devel >= 1:2.7
20 BuildRequires:  python-modules >= 1:2.7
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-devel >= 1:3.4
24 BuildRequires:  python3-modules >= 1:3.4
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 Requires:       python-modules >= 1:2.7
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Mutagen is an audio metadata tag reader and writer implemented in pure
34 Python. It supports reading ID3v1.1, ID3v2.2, ID3v2.3, ID3v2.4, APEv2,
35 and FLAC, and writing ID3v1.1, ID3v2.4, APEv2, and FLAC.
36
37 %description -l pl.UTF-8
38 Mutagen to moduł do odczytu i zapisu znaczników metadanych dźwiękowych
39 zaimplementowany w czystym Pythonie. Obsługuje odczyt ID3v1.1,
40 ID3v2.2, ID3v2.3, ID3v2.4, APEv2 i FLAC oraz zapis ID3v1.1, ID3v2.4,
41 APEv2 i FLAC.
42
43 %package tools
44 Summary:        Simple tools for reading and writing audio metadata
45 Summary(pl.UTF-8):      Proste narzędzia do odczytu i zapisu metadanych dźwiękowych
46 Group:          Applications/Multimedia
47 %if %{with python2}
48 Requires:       %{name} = %{version}-%{release}
49 %else
50 Requires:       python3-%{module} = %{version}-%{release}
51 %endif
52
53 %description tools
54 Simple tools for reading and writting audio metadata.
55
56 %description tools -l pl.UTF-8
57 Proste narzędzia do odczytu i zapisu metadanych dźwiękowych.
58
59 %package -n python3-%{module}
60 Summary:        Audio metadata reader/writer for Python 3
61 Summary(pl.UTF-8):      Moduł Pythona 3 do odczytu i zapisu metadanych dźwiękowych
62 Group:          Development/Languages/Python
63 Requires:       python3-modules >= 1:3.4
64
65 %description -n python3-%{module}
66 Mutagen is an audio metadata tag reader and writer implemented in pure
67 Python. It supports reading ID3v1.1, ID3v2.2, ID3v2.3, ID3v2.4, APEv2,
68 and FLAC, and writing ID3v1.1, ID3v2.4, APEv2, and FLAC.
69
70 %description -n python3-%{module} -l pl.UTF-8
71 Mutagen to moduł do odczytu i zapisu znaczników metadanych dźwiękowych
72 zaimplementowany w czystym Pythonie. Obsługuje odczyt ID3v1.1,
73 ID3v2.2, ID3v2.3, ID3v2.4, APEv2 i FLAC oraz zapis ID3v1.1, ID3v2.4,
74 APEv2 i FLAC.
75
76 %prep
77 %setup -q -n %{module}-%{version}
78
79 %build
80 %if %{with python2}
81 %py_build
82 %endif
83
84 %if %{with python3}
85 %py3_build
86 %endif
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python3}
92 %py3_install
93 %endif
94
95 %if %{with python2}
96 %if %{with python3}
97 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*
98 %endif
99 %py_install
100
101 %py_postclean
102 %endif
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %if %{with python2}
108 %files
109 %defattr(644,root,root,755)
110 %doc NEWS README.rst
111 %{py_sitescriptdir}/mutagen
112 %{py_sitescriptdir}/mutagen-%{version}-py*.egg-info
113 %endif
114
115 %files tools
116 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_bindir}/mid3cp
118 %attr(755,root,root) %{_bindir}/mid3iconv
119 %attr(755,root,root) %{_bindir}/mid3v2
120 %attr(755,root,root) %{_bindir}/moggsplit
121 %attr(755,root,root) %{_bindir}/mutagen-inspect
122 %attr(755,root,root) %{_bindir}/mutagen-pony
123 %{_mandir}/man1/mid3cp.1*
124 %{_mandir}/man1/mid3iconv.1*
125 %{_mandir}/man1/mid3v2.1*
126 %{_mandir}/man1/moggsplit.1*
127 %{_mandir}/man1/mutagen-inspect.1*
128 %{_mandir}/man1/mutagen-pony.1*
129
130 %if %{with python3}
131 %files -n python3-%{module}
132 %defattr(644,root,root,755)
133 %{py3_sitescriptdir}/mutagen
134 %{py3_sitescriptdir}/mutagen-%{version}-py*.egg-info
135 %endif
This page took 0.059066 seconds and 3 git commands to generate.