packages: firestarter/firestarter.spec - unify, use %service macro, rc-scri...

glen glen at pld-linux.org
Mon Mar 1 12:27:27 CET 2010


Author: glen                         Date: Mon Mar  1 11:27:27 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- unify, use %service macro, rc-script deps, updated initscript; rel 6

---- Files affected:
packages/firestarter:
   firestarter.spec (1.52 -> 1.53) 

---- Diffs:

================================================================
Index: packages/firestarter/firestarter.spec
diff -u packages/firestarter/firestarter.spec:1.52 packages/firestarter/firestarter.spec:1.53
--- packages/firestarter/firestarter.spec:1.52	Sun Nov  4 18:51:09 2007
+++ packages/firestarter/firestarter.spec	Mon Mar  1 12:27:22 2010
@@ -3,10 +3,10 @@
 Summary(pl.UTF-8):	Narzędzie do konfiguracji firewalla działające w środowisku GNOME
 Name:		firestarter
 Version:	1.0.3
-Release:	5
+Release:	6
 License:	GPL
 Group:		X11/Applications/Networking
-Source0:	http://dl.sourceforge.net/firestarter/%{name}-%{version}.tar.gz
+Source0:	http://downloads.sourceforge.net/firestarter/%{name}-%{version}.tar.gz
 # Source0-md5:	f46860a9e16dac4b693bd05f16370b03
 Source1:	%{name}.init
 Patch0:		%{name}-desktop.patch
@@ -22,9 +22,11 @@
 BuildRequires:	libgnomeui-devel >= 2.0.0
 BuildRequires:	libtool
 BuildRequires:	pkgconfig
+BuildRequires:	rpmbuild(macros) >= 1.268
 BuildRequires:	sed >= 4.0
 Requires(post,preun):	/sbin/chkconfig
 Requires:	iptables
+Requires:	rc-scripts
 # sr at Latn vs. sr at latin
 Conflicts:	glibc-misc < 6:2.7
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -51,6 +53,7 @@
 mv -f po/{no,nb}.po
 
 %build
+%{__intltoolize}
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
@@ -69,7 +72,7 @@
 	Applicationsdir=%{_desktopdir}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/firestarter
-install firestarter.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/firestarter
+cp -a firestarter.pam $RPM_BUILD_ROOT/etc/pam.d/firestarter
 
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/firestarter/inbound
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/firestarter/outbound
@@ -93,16 +96,19 @@
 touch $RPM_BUILD_ROOT%{_sysconfdir}/firestarter/outbound/deny-to
 touch $RPM_BUILD_ROOT%{_sysconfdir}/firestarter/outbound/setup
 
-mv $RPM_BUILD_ROOT%{_bindir}/firestarter $RPM_BUILD_ROOT%{_sbindir}
+mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/firestarter
 
-echo -e "#!/bin/sh
+# TODO: use .desktop magic for this
+cat <<'EOF' > $RPM_BUILD_ROOT%{_bindir}/firestarter
+#!/bin/sh
 if [ -x %{_bindir}/gksudo ] ; then
-	gksudo -g %{_sbindir}/firestarter
+	exec gksudo -g %{_sbindir}/firestarter
 elif [ -x %{_bindir}/kdesu ] ; then
-	kdesu %{_sbindir}/firestarter
+	exec kdesu %{_sbindir}/firestarter
 else
-	%{_sbindir}/firestarter
-fi" > $RPM_BUILD_ROOT%{_bindir}/firestarter
+	exec %{_sbindir}/firestarter
+fi
+EOF
 
 [ -d $RPM_BUILD_ROOT%{_datadir}/locale/sr at latin ] || \
 	mv -f $RPM_BUILD_ROOT%{_datadir}/locale/sr@{Latn,latin}
@@ -115,18 +121,12 @@
 %gconf_schema_install firestarter.schemas
 %update_desktop_database_post
 /sbin/chkconfig --add firestarter
-if [ -f /var/lock/subsys/firestarter ]; then
-	/etc/rc.d/init.d/firestarter restart 1>&2
-else
-	echo "Run \"/etc/rc.d/init.d/firestarter start\" to start firestarter."
-fi
+%service firestarter restart
 
 %preun
-if [ $1 = 0 ]; then
-    %gconf_schema_uninstall firestarter.schemas
-	if [ -f /var/lock/subsys/firestarter ]; then
-		/etc/rc.d/init.d/firestarter stop 1>&2
-	fi
+if [ "$1" = 0 ]; then
+	%gconf_schema_uninstall firestarter.schemas
+	%service firestarter stop
 	/sbin/chkconfig --del firestarter
 fi
 
@@ -138,11 +138,12 @@
 %doc README ChangeLog AUTHORS TODO CREDITS
 %attr(755,root,root) %{_bindir}/firestarter
 %attr(755,root,root) %{_sbindir}/firestarter
-%attr(754,root,root) /etc/rc.d/init.d/*
+%attr(754,root,root) /etc/rc.d/init.d/firestarter
 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/firestarter
+%{_sysconfdir}/gconf/schemas/firestarter.schemas
 %{_desktopdir}/firestarter.desktop
+%{_pixmapsdir}/firestarter.png
 %{_datadir}/%{name}
-%{_pixmapsdir}/*
 %dir %attr(700,root,root) %{_sysconfdir}/%{name}
 %dir %attr(700,root,root) %{_sysconfdir}/%{name}/inbound
 %dir %attr(700,root,root) %{_sysconfdir}/%{name}/outbound
@@ -155,7 +156,6 @@
 %config(noreplace) %attr(440,root,root) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/non-routables
 %config(noreplace) %attr(440,root,root) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/sysctl-tuning
 %config(noreplace) %attr(440,root,root) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/user-*
-%{_sysconfdir}/gconf/schemas/*
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -163,6 +163,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.53  2010/03/01 11:27:22  glen
+- unify, use %service macro, rc-script deps, updated initscript; rel 6
+
 Revision 1.52  2007/11/04 17:51:09  ankry
 - sr at Latn -> sr at latin, rel. 5
 
@@ -258,7 +261,7 @@
 - updated deps
 
 Revision 1.24  2003/07/03 18:54:01  luzik
- - updated to 0.9.2
+- updated to 0.9.2
 
 Revision 1.23  2003/05/26 16:24:58  malekith
 - massive attack: adding Source-md5
@@ -273,7 +276,7 @@
 - removed two lines with define
 
 Revision 1.19  2002/11/27 18:27:38  juandon
-- new %%doc
+- new %doc
 
 Revision 1.18  2002/10/09 13:14:22  kloczek
 - use more macros, some cosmetics, added missing "rm -f missing" and use new %doc
@@ -282,12 +285,12 @@
 - perl -pi -e "s/^libtoolize --copy --force/\%\{__libtoolize\}/"
 
 Revision 1.16  2002/05/21 23:13:02  kloczek
-perl -pi -e "s/^automake -a -c -f --foreing/\%\{__automake\}/; \
+- perl -pi -e "s/^automake -a -c -f --foreing/\%\{__automake\}/; \
              s/^automake -a -c -f/\%\{__automake\}/; \
-	     s/^autoconf/\%\{__autoconf\}/"
+     s/^autoconf/\%\{__autoconf\}/"
 
 Revision 1.15  2002/04/25 16:18:20  arturs
-fixed a small typo
+- fixed a small typo
 
 Revision 1.14  2002/03/04 19:54:34  kloczek
 - move desktop file to System/Administration,
@@ -301,7 +304,7 @@
   Group field using gettext).
 
 Revision 1.11  2002/01/18 02:12:57  kloczek
-perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
+- perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
 
 Revision 1.10  2001/08/03 17:33:07  waszi
 - updated to 0.7.1
@@ -319,20 +322,17 @@
 Revision 1.6  2000/10/29 17:44:18  kloczek
 - updated to 0.4.1,
 - Source url changed to ftp://,
-- uncomment using %%find_lang.
+- uncomment using %find_lang.
 
 Revision 1.5  2000/10/29 17:36:36  kloczek
 - release 2: use new rpm automation and rebuild against gnome-libs linked
   with db3.
 
 Revision 1.4  2000/06/09 07:22:50  kloczek
-- added using %%{__make} macro.
+- added using %{__make} macro.
 
 Revision 1.3  2000/06/01 00:32:58  kloczek
 - changed prefix to /usr/X11R6.
 
 Revision 1.2  2000/06/01 00:32:02  kloczek
 - completly rewrited in PLD style.
-
-* Mon May 29 2000 Tomas Junnonen
-- First spec file
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/firestarter/firestarter.spec?r1=1.52&r2=1.53&f=u



More information about the pld-cvs-commit mailing list