%define name conserver %define version 8.1.10 %define release 1mdk Summary: Serial console server daemon/client Name: %{name} Version: %{version} Release: %{release} License: BSD-like Group: System/Servers URL: http://www.conserver.com/ Source0: http://www.conserver.com/%{name}-%{version}.tar.bz2 Source1: %{name}.init.bz2 PreReq: rpm-helper Requires: tcp_wrappers BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: tcp_wrappers-devel BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description Conserver is an application that allows multiple users to watch a serial console at the same time. It can log the data, allows users to take write-access of a console (one at a time), and has a variety of bells and whistles to accentuate that basic functionality. %package -n conserver-daemon Summary: Serial console server daemon Group: System/Servers PreReq: rpm-helper Requires: tcp_wrappers %description -n conserver-daemon Conserver is an application that allows multiple users to watch a serial console at the same time. It can log the data, allows users to take write-access of a console (one at a time), and has a variety of bells and whistles to accentuate that basic functionality. This package contains the server daemon part. %package -n conserver-client Summary: Serial console server client Group: System/Servers Requires: tcp_wrappers %description -n conserver-client Conserver is an application that allows multiple users to watch a serial console at the same time. It can log the data, allows users to take write-access of a console (one at a time), and has a variety of bells and whistles to accentuate that basic functionality. This package contains the client part. %prep %setup -q %build %configure2_5x \ --with-port=782 \ --with-base=0 \ --with-master=console \ --with-cffile=%{_sysconfdir}/%{name}.cf \ --with-pwdfile=%{_sysconfdir}/%{name}.passwd \ --with-logfile=/var/log/%{name}/%{name}.log \ --with-pidfile=/var/run/%{name}/%{name}.pid \ --with-libwrap=%{_prefix} \ --with-openssl=%{_prefix} \ --with-maxmemb=16 \ --with-timeout=10 \ --with-pam %make # make test must be run by root? %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %makeinstall install -d %{buildroot}%{_initrddir} install -d %{buildroot}/var/log/%{name} install -d %{buildroot}/var/run/%{name} %{__sed} -e 's/^/#/' \ < %{name}.cf/%{name}.cf \ > %{buildroot}%{_sysconfdir}/%{name}.cf %{__sed} -e 's/^/#/' \ < %{name}.cf/%{name}.passwd \ > %{buildroot}%{_sysconfdir}/%{name}.passwd bzcat %{SOURCE1} > %{buildroot}%{_initrddir}/%{name} chmod 755 %{buildroot}%{_initrddir}/%{name} # fix ghostfiles touch %{buildroot}/var/log/%{name}/%{name}.log # remove crap rm -f %{buildroot}%{_sysconfdir}/%{name}.rc rm -rf %{buildroot}%{_datadir}/examples # install missing stuff install -m0755 conserver/convert %{buildroot}%{_sbindir}/convert-conserver.cf %post -n %{name}-daemon %_post_service %{name}-daemon %create_ghostfile /var/log/%{name}/%{name}.log root root 0644 # make sure /etc/services has a conserver entry if ! egrep '\<conserver\>' /etc/services > /dev/null 2>&1 ; then echo "console 782/tcp conserver" >> /etc/services fi %preun -n %{name}-daemon %_preun_service %{name}-daemon %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files -n %{name}-daemon %defattr(-,root,root) %doc CHANGES FAQ LICENSE README TODO %{name}.html %doc %{name}.cf/%{name}.cf %doc %{name}.cf/%{name}.passwd %doc %{name}.cf/label.ps %doc %{name}.cf/test.cf %doc %{name}/Sun-serial %config(noreplace) %{_sysconfdir}/%{name}.cf %config(noreplace) %{_sysconfdir}/%{name}.passwd %config(noreplace) %attr(0755,root,root) %{_initrddir}/%{name} %{_mandir}/man8/%{name}.8* %{_mandir}/man5/%{name}.cf.5* %{_mandir}/man5/%{name}.passwd.5* %{_sbindir}/%{name} %{_sbindir}/convert-conserver.cf %dir /var/log/%{name} %dir /var/run/%{name} %attr(0644,root,root) %ghost /var/log/%{name}/%{name}.log %files -n %{name}-client %defattr(-,root,root) %{_bindir}/console %{_mandir}/man1/console.1* %changelog * Fri Oct 08 2004 Lenny Cartier <lenny@mandrakesoft.com> 8.1.10-1mdk - 8.1.10 - bzip2 source * Thu Aug 05 2004 Erwan Velu <erwan@mandrakesoft.com> 8.1.9-1mdk - 8.1.9 * Fri Jun 11 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 8.1.8-1mdk - 8.1.8 * Sat May 29 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 8.1.7-1mdk - 8.1.7 * Thu May 27 2004 Lenny Cartier <lenny@mandrakesoft.com> 8.1.6-1mdk - 8.1.6 * Wed Apr 14 2004 Michael Scherer <misc@mandrake.org> 8.1.4-1mdk - New release 8.1.4 - rpmbuildupdate aware * Thu Dec 11 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 8.0.9-1mdk - 8.0.9 * Wed Dec 03 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 8.0.8-1mdk - 8.0.8 * Wed Nov 19 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 8.0.6-1mdk - 8.0.6 - added the convert utility as %%{_sbindir}/convert-conserver.cf - fix invalid-build-requires - fix explicit-lib-dependency * Fri Jul 11 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 7.2.7-1mdk - 7.2.7 - the actual cooker contrib * Tue Apr 01 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 7.2.6-1mdk - initial cooker contrib - used bits and pieces from the provided spec file