LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File easymp3gain.spec of Package easymp3gain (Project home:wolfi323)

# Copyright (c) 2008-2010 oc2pus
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments to toni@links2linux.de

# norootforbuild

%define _prefix	/usr

Name:			easymp3gain
Version:		0.5.0
Release:		1.pm.2.1
Summary:		Graphical User Interface for MP3Gain, VorbisGain and AACGain
License:		GPL
Group:			Productivity/Multimedia/Sound/Utilities
URL:			https://sourceforge.net/projects/easymp3gain/
BuildRoot:		%{_tmppath}/%{name}-%{version}-build
Source0:		%{name}_%{version}.src.tar.gz
Patch:          fix-build.patch
BuildRequires:	fpc
BuildRequires:	fpc-src
BuildRequires:	hicolor-icon-theme
BuildRequires:	lazarus
#if %suse_version > 1110
BuildRequires:	qt4pas-devel
# part of lazarus since 42.2
#BuildRequires:	libQt5Pas-devel
#%endif
BuildRequires:	update-desktop-files
Recommends:		aacgain
Requires:		hicolor-icon-theme
Requires:		mp3gain
Requires:		vorbisgain
Requires:       %{name}-gui

%description
Graphical User Interface (GUI) for MP3Gain, VorbisGain and AACGain
(enables you to modify the loudness level of mp3,ogg,mp4 files).

%package -n gtk2-%{name}
Summary:	Gtk2 easymp3gain
Group:		Productivity/Multimedia/Sound/Utilities
Requires:	%{name} = %{version}
Provides:   %{name}-gui

%description -n gtk2-%{name}
This package contains the gtk2-based binary for easymp3gain.

%if %suse_version > 1110
%package -n qt4-%{name}
Summary:	Qt4 easymp3gain
Group:		Productivity/Multimedia/Sound/Utilities
Requires:	%{name} = %{version}
Provides:   %{name}-gui

%description -n qt4-%{name}
This package contains the qt4-enabled binary for easymp3gain.
%endif

%prep
%setup -q -n %{name}-%{version}
%patch -p0
#sed -i 's/--ws=qt/--ws=qt5/' make.sh
# don't strip
%__sed -i -e 's|strip --strip-all|#strip --strip-all|g' \
	install.sh

# build for i386 on 32bit systems
%ifarch i586
%__sed -i -e 's|<TargetCPU Value="x86_64"/>|<TargetCPU Value="i386"/>|g' \
	easymp3gain.lpi
%endif

# fix desktop-file
%__sed -i -e 's|Audio;||g' \
	applications/easymp3gain.desktop
%__sed -i -e 's|x-easymp3gain|x-easymp3gain;|g' \
	applications/easymp3gain.desktop

%build
%__make
%if %suse_version > 1110
%__make WIDGET=qt4
%endif

%install
%makeinstall

%__install -dm 755 %{buildroot}%{_datadir}/pixmaps
%__install -m 644 icons/easymp3gain-48.png \
	%{buildroot}%{_datadir}/pixmaps/%{name}.png

%suse_update_desktop_file -i -n %{name} AudioVideo Player Jukebox

%if %suse_version > 1110
%__install -dm 755 %{buildroot}%{_bindir}
%__install -m 755 bin/qt4/%{name} \
	%{buildroot}%{_bindir}/qt4-%{name}

%__install -m 644 %{buildroot}%{_datadir}/applications/%{name}.desktop \
	%{buildroot}%{_datadir}/applications/qt4-%{name}.desktop
%__sed -i -e 's|Name=easyMP3Gain|Name=easyMP3Gain (Qt4)|g' \
	%{buildroot}%{_datadir}/applications/qt4-%{name}.desktop
%__sed -i -e 's|Exec=%{name}|Exec=qt4-%{name}|g' \
	%{buildroot}%{_datadir}/applications/qt4-%{name}.desktop
%endif

%clean
[ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}"

%files
%defattr(-, root, root)
%doc AUTHORS *.txt
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/pixmaps/%{name}.png

%files -n gtk2-%{name}
%defattr(-, root, root)
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop

%if %suse_version > 1110
%files -n qt4-%{name}
%defattr(-, root, root)
%{_bindir}/qt4-%{name}
%{_datadir}/applications/qt4-%{name}.desktop
%endif

%changelog
* Tue Feb 14 2017 Wolfgang Bauer <wbauer@tmo.at>
- add "(Qt4)" to the Name of the Qt4 .desktop file to differentiate it
  from the Gtk one in the application menu
* Wed Mar 18 2015 Wolfgang Bauer <wbauer@tmo.at>
- split out the Gtk2 executable into its own subpackage, so
  it's possible to only install the Qt4 one
* Wed Mar 18 2015 Wolfgang Bauer <wbauer@tmo.at>
- import to OBS
- fix build
- remove %%debug_package, this is created automatically by OBS
- don't require aacgain, this is not available any more. A Recommends is good enough,
  since easymp3gain works without it as well (it just cannot tag AAC files of course)
* Mon Mar 15 2010 Toni Graffy <toni@links2linux.de> - 0.5.0-1.pm.1
- added qt4-easymp3gain sub-package
* Tue Jan 12 2010 Toni Graffy <toni@links2linux.de> - 0.5.0-0.pm.1
- update to 0.5.0
- First release of Qt4 Version
- Added Italian translation (thanks to Giulio Rodoni!)
- Main window remebers its size after restart
- Speed improvements when checking tags
- Fixed Constant Gain bug
- Customizable columns (filename/path)
* Mon Nov 17 2008 Toni Graffy <toni@links2linux.de> - 0.4.2-0.pm.1
- added aacgain and vorbisgain to Requires as they are available
  in pm-repo
* Sun Nov 16 2008 Toni Graffy <toni@links2linux.de> - 0.4.2-0.pm.1
- initial build 0.4.2