File rubyripper.spec of Package rubyripper
#
# spec file for package rubyripper
#
# Copyright (c) 2015 SUSE LINUX 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: rubyripper
Version: 0.7.0
Release: 0
License: GPL-3.0
Summary: Secure Audiodisc Ripper
Url: http://code.google.com/p/rubyripper/
Group: Productivity/Multimedia/CD/Grabbers
Source0: http://rubyripper.googlecode.com/files/%{name}-%{version}.tar.xz
BuildRequires: ImageMagick
BuildRequires: cdparanoia-devel
BuildRequires: hicolor-icon-theme
BuildRequires: ruby
BuildRequires: update-desktop-files
Requires: abcde
Requires: cdparanoia
Requires: eject
Requires: flac
Requires: ruby
Requires: vorbis-tools
Recommends: lame
Recommends: mp3gain
Recommends: normalize
Recommends: vorbisgain
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Rubyripper is a digital audio extraction algorithm that uses cdparanoia
in a sophisticated way to make sure that a CD rip is done successfully
and accurately. It is very similar to and inspired by EAC.
# Don't build GUI noarch! It depends on ruby libs path.
%package gui
Summary: GTK Front-end for rubyripper
Group: Productivity/Multimedia/CD/Grabbers
Requires: %{name} = %{version}
Requires: ruby-gtk2
%description gui
GTK graphical interface for the rubyripper secure audio extraction tool.
%prep
%setup -q
#sed -i '/#!\/usr\/bin\/env/d' rr_lib.rb
#sed -i '/#!\/usr\/bin\/env/s/env %%{_builddir}/ruby/ruby/' \
# %%{_builddir}/configure %%{_builddir}/bin/rubyripper_cli %%{_builddir}/bin/rubyripper_gtk3
#chmod 644 README GPL-3.txt
%build
# Future proofness.
%if "%{version}" == "0.7.0"
%define rubyripper_gtk_version gtk3
%else
%define rubyripper_gtk_version gtk2
%endif
%configure \
--prefix=%{_prefix} \
--enable-cli \
--enable-%{rubyripper_gtk_version}
%install
%make_install RUBYDIR=%{rb_sitedir}
# RUBYDIR is not honored, so let’s move the files manually.
mkdir -p %{buildroot}%{rb_sitedir}
mv %{buildroot}/usr/lib/rubyripper %{buildroot}%{rb_sitedir}
for size in 96x96 64x64 48x48 32x32 22x22 16x16 ; do
install -dm 0755 %{buildroot}%{_datadir}/icons/hicolor/${size}/apps
convert -resize ${size} %{_builddir}/%{name}-%{version}/share/icons/hicolor/128x128/apps/%{name}.png %{buildroot}%{_datadir}/icons/hicolor/${size}/apps/%{name}.png
done
%suse_update_desktop_file -r %{name} AudioVideo CD
%post
%icon_theme_cache_post
%postun
%icon_theme_cache_postun
%files
%defattr(0644,root,root,0755)
%license GPL-3.txt
%doc README.md
%attr(0755,root,root) %{_bindir}/rrip_cli
%{rb_sitedir}/%{name}/
%files gui
%defattr(0644,root,root,0755)
%license GPL-3.txt
%doc README.md
%attr(0755,root,root) %{_bindir}/rrip_gui
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/*/%{name}.png
%changelog