packages: autossh/autossh.spec - added init subpackage containig init scrip...

pawelz pawelz at pld-linux.org
Tue May 19 12:15:22 CEST 2009


Author: pawelz                       Date: Tue May 19 10:15:22 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added init subpackage containig init script
- more verbose %files
- rel 2

---- Files affected:
packages/autossh:
   autossh.spec (1.17 -> 1.18) 

---- Diffs:

================================================================
Index: packages/autossh/autossh.spec
diff -u packages/autossh/autossh.spec:1.17 packages/autossh/autossh.spec:1.18
--- packages/autossh/autossh.spec:1.17	Fri Apr 18 14:29:23 2008
+++ packages/autossh/autossh.spec	Tue May 19 12:15:17 2009
@@ -3,11 +3,13 @@
 Summary(pl.UTF-8):	Automatyczny restart sesji i tuneli SSH
 Name:		autossh
 Version:	1.4b
-Release:	1
+Release:	2
 License:	GPL
 Group:		Applications/Networking
 Vendor:		Carson Harding <carson.harding at shaw.ca>
 Source0:	http://www.harding.motd.ca/autossh/%{name}-%{version}.tgz
+Source1:	%{name}.init
+Source2:	%{name}.tab
 # Source0-md5:	8f9aa006f6f69e912d3c2f504622d6f7
 URL:		http://www.harding.motd.ca/autossh/
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -34,6 +36,23 @@
 Linuksie i Solarisie; powinien działać także na innych BSD (oprócz
 MacOS 10).
 
+%package init
+Summary:	autossh configuration as system service
+Summary(pl.UTF-8):	konfiguracja autossh jako usługi systemowej
+Group:		Networking/Daemons
+Requires(post,preun):   /sbin/chkconfig
+Requires:	autossh = %{epoch}:%{version}-%{release}
+Requires:	awk
+Requires:	rc-scripts >= 0.4.0.20
+
+%description init
+this package contains init script and example configuration file, that allows
+to run autossh as Unix system service.
+
+%description init -l pl.UTF-8
+Ten pakiet zawiera skrypt startowy oraz przykładowy plik konfiguracyjny, które
+pozwalają uruchamić autossh jako uniksową usługę systemową.
+
 %prep
 %setup -q
 
@@ -43,7 +62,10 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/run/%{name},%{_bindir},%{_mandir}/man1}
+
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/autossh.tab
 
 install autossh $RPM_BUILD_ROOT%{_bindir}
 install autossh.1 $RPM_BUILD_ROOT%{_mandir}/man1
@@ -51,11 +73,27 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add autossh
+%service autossh restart "autossh"
+
+%preun
+if [ "$1" = "0" ]; then
+	%service autossh stop
+	/sbin/chkconfig --del autossh
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc README CHANGES autossh.host rscreen
-%attr(755,root,root) %{_bindir}/*
-%{_mandir}/man1/*
+%attr(755,root,root) %{_bindir}/autossh
+%{_mandir}/man1/autossh.1*
+
+%files init
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/%{name}.tab
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%dir /var/run/autossh
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -63,6 +101,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.18  2009/05/19 10:15:17  pawelz
+- added init subpackage containig init script
+- more verbose %files
+- rel 2
+
 Revision 1.17  2008/04/18 12:29:23  areq
 - 1.4b
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/autossh/autossh.spec?r1=1.17&r2=1.18&f=u



More information about the pld-cvs-commit mailing list