File whipper.spec of Package whipper

#
# spec file for package whipper
#
# Copyright (c) 2017 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:           whipper
Version:        0.7.3
Release:        0
License:        GPL-3.0+
Summary:        A CD ripper aiming for accuracy over speed
Url:            https://github.com/JoeLametta/whipper/
Group:          Productivity/Multimedia/CD/Grabbers
Source0:        https://github.com/JoeLametta/whipper/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0:         whipper-fix-appstream-file-path.patch
BuildRequires:  fdupes
BuildRequires:  libsndfile-devel
BuildRequires:  python2-gobject
BuildRequires:  python2-setuptools
BuildRequires:  python-xml

# nb: there is a difference between cd-paranoia [we want] and
#     cdparanoia [we don't]
Requires:       cd-paranoia >= 10.2
Requires:       cdrdao
Requires:       gobject-introspection
Requires:       python2-gobject
Requires:       python2-musicbrainzngs
Requires:       python2-mutagen
Requires:       python-CDDB
Requires:       python2-requests
Requires:       python-pycdio >= 0.20
Requires:       libcdio16 <= 0.94
Requires:       flac
Requires:       sox

Conflicts:      morituri
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Whipper is an audio CD ripper that aims for accuracy over speed. It
automatically tags tracks using MusicBrainz data, takes drive offsets into
account, supports AccurateRip, and can rip certain hidden tracks.
It is written in Python 2. Whipper was forked from the Morituri project,
after Morituri development halted.

%prep
%setup -q
%patch0 -p1

%build
make -C src CFLAGS='-std=c99 %{optflags}' CC=gcc PREFIX=%{_prefix}

%install
make -C src CFLAGS='-std=c99 %{optflags}' CC=gcc PREFIX=%{_prefix} DESTDIR=%{buildroot} install
python2 setup.py install -O2 \
  --root=%{buildroot} \
  --prefix=%{_prefix} \
  --exec-prefix=%{_exec_prefix} \
  --install-data=%{_datadir}

find %{buildroot}%{python_sitelib} -name '*.pyc' -exec rm -vf '{}' \+
%fdupes %{buildroot}%{python_sitelib}/

%files
%doc CHANGELOG.md README
%license LICENSE
%{_bindir}/accuraterip-checksum
%{_bindir}/%{name}
%{python_sitelib}/whipper/
%{python_sitelib}/%{name}-%{version}-py*.egg-info/
%{_datadir}/metainfo/com.github.whipper_team.Whipper.metainfo.xml

%changelog
openSUSE Build Service is sponsored by