]> git.pld-linux.org Git - packages/autossh.git/blobdiff - autossh.spec
- release 4
[packages/autossh.git] / autossh.spec
index 27cc41c4e670b456b496da1aa3708bc8109cf850..874064c2537d84975e21508c51f453ff3d99610c 100644 (file)
@@ -1,13 +1,17 @@
 Summary:       Automatically restart SSH sessions and tunnels
-Summary(pl):   Automatyczny restart sesji i tuneli SSH
+Summary(pl.UTF-8):     Automatyczny restart sesji i tuneli SSH
 Name:          autossh
-Version:       1.2f
-Release:       1
+Version:       1.4b
+Release:       4
 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
+Source3:       %{name}.tmpfiles
+# Source0-md5: 8f9aa006f6f69e912d3c2f504622d6f7
 URL:           http://www.harding.motd.ca/autossh/
+Requires:      openssh-clients
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -20,27 +24,51 @@ off on rate of connection attempts when experiencing rapid failures
 such as connection refused. Compiled and tested on OpenBSD, Linux, and
 Solaris; should work fine on other BSDs (except Mac OS 10).
 
-%description -l pl
-autossh jest programem uruchamiaj±cym kopiê ssh i monitoruj±cym j±,
-restartuj±c w miarê potrzeby, je¶li umrze lub przestanie przekazywaæ
-ruch. Idea i mechanizm pochodz± z rstunnela (Reliable SSH Tunnel), ale
-zaimplementowano je w C. Wed³ug autora nie trzeba siê tak patyczkowaæ,
-jak z rstunnelem, aby go uruchomiæ. Monitorowanie po³±czenia u¿ywa
-pêtli przekazywania portów. Czêstotliwo¶æ prób po³±czeñ jest
-zmniejszana w przypadku napotkania nag³ych awarii, takich jak
-odrzucenie po³±czenia. Program skompilowano i sprawdzono na OpenBSD,
-Linuksie i Solarisie; powinien dzia³aæ tak¿e na innych BSD (oprócz
+%description -l pl.UTF-8
+autossh jest programem uruchamiającym kopię ssh i monitorującym ją,
+restartując w miarę potrzeby, jeśli umrze lub przestanie przekazywać
+ruch. Idea i mechanizm pochodzą z rstunnela (Reliable SSH Tunnel), ale
+zaimplementowano je w C. Według autora nie trzeba się tak patyczkować,
+jak z rstunnelem, aby go uruchomić. Monitorowanie połączenia używa
+pętli przekazywania portów. Częstotliwość prób połączeń jest
+zmniejszana w przypadku napotkania nagłych awarii, takich jak
+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
 
 %build
-%{__make} -f Makefile.linux
+%configure
+%{__make}
 
 %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} \
+       $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
+
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/autossh.tab
+install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
 
 install autossh $RPM_BUILD_ROOT%{_bindir}
 install autossh.1 $RPM_BUILD_ROOT%{_mandir}/man1
@@ -48,8 +76,25 @@ install autossh.1 $RPM_BUILD_ROOT%{_mandir}/man1
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post init
+/sbin/chkconfig --add autossh
+%service autossh restart "autossh"
+
+%preun init
+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) %{_sysconfdir}/%{name}.tab
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+/usr/lib/tmpfiles.d/%{name}.conf
+%dir /var/run/autossh
This page took 0.093201 seconds and 4 git commands to generate.