]> git.pld-linux.org Git - packages/autossh.git/commitdiff
- added init subpackage containig init script
authorpawelz <pawelz@pld-linux.org>
Tue, 19 May 2009 10:15:17 +0000 (10:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- more verbose %files
- rel 2

Changed files:
    autossh.spec -> 1.18

autossh.spec

index 263b71c7454885c892f13c0b39179ea6bec77d9d..fc7c6382ef3f09abb59bcb33a54f84c492dc9cb0 100644 (file)
@@ -2,11 +2,13 @@ Summary:      Automatically restart SSH sessions and tunnels
 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@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)
@@ -33,6 +35,23 @@ odrzucenie połączenia. Program skompilowano i sprawdzono na OpenBSD,
 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
 
@@ -42,7 +61,10 @@ MacOS 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
@@ -50,8 +72,24 @@ install autossh.1 $RPM_BUILD_ROOT%{_mandir}/man1
 %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
This page took 0.108887 seconds and 4 git commands to generate.