1 %define name_dash tty_ctrl
2 Summary: Executing commands through special serial line device
3 Summary(pl.UTF-8): Wykonywanie poleceń poprzez specjalne urządzenie podłączone do portu szeregowego
9 Source0: http://dl.sourceforge.net/ttyctrl/tty_ctrl_%{version}.tgz
10 # Source0-md5: 7ba345323d89833b18a4fbb47f6086ff
11 Patch0: %{name}-makefile.patch
12 URL: http://ttyctrl.sourceforge.net/
14 #from http://www.linux-magazin.de/ausgabe/2000/09/Seriell/seriell.html
15 BuildRequires: rpmbuild(macros) >= 1.268
16 Requires(post,preun): /sbin/chkconfig
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _sbindir /sbin
23 When running a server on Linux without keyboard, mouse and monitor, it
24 is sometimes necessary to excute administrative commands. Tty_ctrl
25 offers the opportunity to execute 7 sommands on such a computer.
26 Success or Errors while execution of the commands will be displayed
27 via status LEDs. You'll need a free serial line, three resistors, 7
28 buttons, three LEDs, 6 diodes and of course a soldering pen to get
31 %description -l pl.UTF-8
32 Gdy używamy serwera linuksowego bez klawiatury, myszki i monitora,
33 czasem zachodzi potrzeba wydania poleceń administracyjnych. Tty_ctrl
34 oferuje możliwość wykonania 7 poleceń na takim komputerze. Wyniki
35 wykonania poleceń są sygnalizowane diodami LED. Potrzebne są do tego:
36 nie zajęty port szeregowy, trzy oporniki, siedem przycisków, 3 LED-y,
37 6 diod i oczywiście lutownica, aby to wszystko połączyć.
40 %setup -q -n %{name_dash}_%{version}
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,ttyctrl},/sbin,%{_examplesdir}/%{name}-%{version}}
50 install tty_control $RPM_BUILD_ROOT/sbin
51 install %{name_dash} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
52 install etc_tty_ctrl/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
55 rm -rf $RPM_BUILD_ROOT
58 /sbin/chkconfig --add %{name}
61 if [ "$1" = "0" ]; then
62 %service %{name_dash} stop
63 /sbin/chkconfig --del %{name}
67 %defattr(644,root,root,755)
69 %attr(755,root,root) %{_sbindir}/*
70 %{_examplesdir}/%{name}-%{version}
71 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ttyctrl
72 %attr(754,root,root) /etc/rc.d/init.d/%{name_dash}
73 #%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name_dash}