14
0
Files
python-mutagen/python-mutagen.spec

68 lines
2.4 KiB
RPMSpec

#
# spec file for package python-mutagen
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-mutagen
Version: 1.22
Release: 0
Summary: Python module to Handle Audio Metadata
License: GPL-2.0
Group: Development/Libraries/Python
Url: https://pypi.python.org/pypi/mutagen
Source: https://pypi.python.org/packages/source/m/mutagen/mutagen-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
Mutagen is a Python module to handle audio metadata. It supports FLAC,
M4A, MP3, Ogg FLAC, Ogg Speex, Ogg Theora, Ogg Vorbis, True Audio, and
WavPack audio files. All versions of ID3v2 are supported, and all
standard ID3v2.4 frames are parsed. It can read Xing headers to
accurately calculate the bitrate and length of MP3s. ID3 and APEv2 tags
can be edited regardless of their audio format. It can also manipulate
Ogg streams on an individual packet/page level.
%prep
%setup -q -n mutagen-%{version}
# remove shebangs from library files
find mutagen/ -name "*.py" -exec sed -i -e '/^#!\s\?\/usr\/bin\/\(env\s\)\?python$/d' {} ';'
%build
python setup.py build
%install
python setup.py install --root=%{buildroot} --prefix="%{_prefix}"
%files
%defattr(-, root, root, 0755)
%doc COPYING NEWS README TODO
%{_bindir}/mid3iconv
%{_bindir}/mid3v2
%{_bindir}/moggsplit
%{_bindir}/mutagen-inspect
%{_bindir}/mutagen-pony
%{python_sitelib}/mutagen
%{python_sitelib}/mutagen-%{version}-py%{py_ver}.egg-info
%{_mandir}/man1/*.gz
%changelog