[gnome-alsamixer] Update spec file for newer best practices



commit 9a1e984ce7c1fd7b5868bede6a800905987b21d7
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jun 26 14:49:50 2012 +0100

    Update spec file for newer best practices

 gnome-alsamixer.spec.in |   45 +++++++++++++--------------------------------
 1 files changed, 13 insertions(+), 32 deletions(-)
---
diff --git a/gnome-alsamixer.spec.in b/gnome-alsamixer.spec.in
index e1d8362..f2f2a67 100644
--- a/gnome-alsamixer.spec.in
+++ b/gnome-alsamixer.spec.in
@@ -1,8 +1,7 @@
 %define name	@PACKAGE@
 %define ver	@VERSION@
-%define RELEASE	paw.1
+%define RELEASE	1
 %define rel	%{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
-%define prefix /usr
 
 Summary:   An ALSA mixer for GNOME written for ALSA 0.9.x.
 Name:      %{name}
@@ -10,9 +9,9 @@ Version:   %{ver}
 Release:   %{rel}
 Packager:  Dennis J Houy <djhouy paw za org>
 Vendor:    PAW Digital Dynamics
-Copyright: GPL
 Group:     Applications/Multimedia
-Source:    ftp://ftp.paw.za.org/pub/PAW/sources/@PACKAGE -%{ver} tar gz
+License:   GPL
+Source:    ftp://ftp.paw.za.org/pub/PAW/sources/@PACKAGE -%{ver} tar bz2
 URL:       http://www.paw.za.org/projects/@PACKAGE@
 BuildRoot: /var/tmp/@PACKAGE -%{PACKAGE_VERSION}-root
 
@@ -21,6 +20,10 @@ Requires: libgnomeui >= 2.4.0
 Requires: GConf2 >= 2.8.0
 Requires: alsa-lib >= 0.9.0
 
+Requires(pre): GConf2
+Requires(post): GConf2
+Requires(preun): GConf2
+
 BuildRequires: gtk2-devel >= 2.0.0
 BuildRequires: libgnomeui-devel >= 2.0.0
 BuildRequires: GConf2-devel >= 2.8.0
@@ -44,53 +47,31 @@ export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
 make DESTDIR=$RPM_BUILD_ROOT install-strip
 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
 
-cat << EOF > gnome-alsamixer.desktop
-[Desktop Entry]
-Encoding=UTF-8
-Name=ALSA Volume Control
-Comment=Adjust the volume level
-Exec=gnome-alsamixer
-Icon=gnome-alsamixer/gnome-alsamixer-icon.png
-Terminal=false
-Type=Application
-Categories=GNOME;Application;AudioVideo;X-Red-Hat-Base;
-StartupNotify=true
-X-Desktop-File-Install-Version=0.3
-EOF
-
-mkdir ${RPM_BUILD_ROOT}%{_datadir}/applications
-
-desktop-file-install --vendor "PAW Digital Dynamics" --delete-original \
-  --dir ${RPM_BUILD_ROOT}%{_datadir}/applications                      \
-  --add-category GNOME                                                 \
-  --add-category Application                                           \
-  --add-category AudioVideo                                            \
-  --add-category X-Red-Hat-Base                                        \
-  gnome-alsamixer.desktop
+%find_lang %{name}
 
 %post
 export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas &> /dev/null || :
-/usr/bin/killall -HUP gconfd-2
 
 %postun
 export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas &> /dev/null || :
-/usr/bin/killall -HUP gconfd-2
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+%files -f %{name}.lang
 %defattr(-, root, root)
 %doc README COPYING ChangeLog NEWS AUTHORS INSTALL TODO
 %{_bindir}/%{name}
 %{_sysconfdir}/gconf/schemas/%{name}.schemas
 %{_datadir}/applications/*%{name}.desktop
-%{_datadir}/pixmaps/%{name}
-%{_datadir}/locale/*
+%{_datadir}/pixmaps/%{name}.png
 
 %changelog
+* Tue Jun 26 2012 Bastien Nocera <bnocera redhat com>
+- Update for newer best practices
+
 * Thu Jul  7 2005 Derrick J Houy <djhouy paw za org>
 - Added GConf stuff, and gnome-alsamixer.schemas to files section.
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]