ca8bcfe
Name:               conman
a08c766
Version:            0.2.2
9b986a0
Release:            3%{?dist}
ca8bcfe
Summary:            ConMan - The Console Manager
ca8bcfe
ca8bcfe
Group:              Applications/System
abae52d
License:            GPLv2+
6afb1c1
URL:                http://home.gna.org/conman/
74932bd
Source0:            http://download.gna.org/%{name}/%{version}/%{name}-%{version}.tar.bz2
ca8bcfe
Source1:            %{name}.init
ca8bcfe
Source2:            %{name}.logrotate
ca8bcfe
BuildRoot:          %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ca8bcfe
ca8bcfe
Requires:           logrotate
ca8bcfe
Requires(post):     /sbin/chkconfig
ca8bcfe
Requires(preun):    /sbin/chkconfig
ca8bcfe
Requires(preun):    /sbin/service
ca8bcfe
Requires(postun):   /sbin/service
ca8bcfe
BuildRequires:      tcp_wrappers
740e881
740e881
%description
740e881
ConMan is a serial console management program designed to support a large
740e881
number of console devices and simultaneous users.  It currently supports
740e881
local serial devices and remote terminal servers (via the telnet protocol).
740e881
Its features include:
740e881
740e881
  - mapping symbolic names to console devices
740e881
  - logging all output from a console device to file
740e881
  - supporting monitor (R/O), interactive (R/W), and
740e881
    broadcast (W/O) modes of console access
740e881
  - allowing clients to join or steal console "write" privileges
740e881
  - executing Expect scripts across multiple consoles in parallel
740e881
740e881
%prep
740e881
%setup -q
740e881
740e881
%build
740e881
# not really lib material, more like share
740e881
mv lib share
740e881
chmod -x share/examples/*.exp
740e881
%{__perl} -pi.orig -e 's|cd lib|cd share|g' \
740e881
    Makefile.in
740e881
%{__perl} -pi -e 's|lib\/|share\/|g' \
740e881
    Makefile.in share/examples/*.exp
2a92b12
# don't strip the bins on install, let find-debug.sh do it
2a92b12
%{__perl} -pi -e 's|-m 755 -s conman|-m 755 conman|g' \
2a92b12
    Makefile.in
740e881
740e881
%configure --with-tcp-wrappers
5b6967f
make %{?_smp_mflags}
740e881
740e881
%install
740e881
rm -rf $RPM_BUILD_ROOT
740e881
make install DESTDIR=$RPM_BUILD_ROOT
740e881
# put in our own initscript and logrotate
740e881
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name}
740e881
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
740e881
# make log directories
740e881
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
740e881
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.old
740e881
# examples don't belong in datadir...
740e881
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/examples
740e881
# these shouldn't be executable
740e881
chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
740e881
# adjust perms on main config file
740e881
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
740e881
740e881
%clean
740e881
rm -rf "$RPM_BUILD_ROOT"
740e881
740e881
%post
740e881
/sbin/chkconfig --add conman
740e881
740e881
%preun
740e881
if [ "$1" = 0 ]; then
740e881
  /sbin/service conman stop >/dev/null 2>&1 || :
740e881
  /sbin/chkconfig --del conman
740e881
fi
740e881
740e881
%postun
740e881
if [ "$1" -ge 1 ]; then
740e881
  /sbin/service conman condrestart >/dev/null 2>&1 || :
740e881
fi
740e881
740e881
%files
740e881
%defattr(-,root,root,-)
a08c766
%doc AUTHORS ChangeLog COPYING FAQ NEWS
740e881
%doc share/examples
740e881
%config(noreplace) %{_sysconfdir}/%{name}.conf
740e881
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
740e881
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
740e881
%{_sysconfdir}/init.d/%{name}
740e881
%{_localstatedir}/log/%{name}
740e881
%{_localstatedir}/log/%{name}.old
740e881
%{_bindir}/*
740e881
%{_sbindir}/*
740e881
%{_datadir}/%{name}
740e881
%{_mandir}/*/*
740e881
740e881
%changelog
9b986a0
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2-3
9b986a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9b986a0
e798135
* Mon Oct 06 2008 Jarod Wilson <jarod@redhat.com> 0.2.2-2
e798135
- The console option in conman.conf is case-insensitive, so relax
e798135
  defined consoles check in initscript (Mark McLoughlin, #465777)
e798135
a08c766
* Mon Sep 08 2008 Steven M. Parrish <smparrish@shallowcreek.net> 0.2.2-1
a08c766
- New upstream release
abae52d
74932bd
* Fri May 02 2008 Jarod Wilson <jwilson@redhat.com> 0.2.1-1
74932bd
- New upstream release
74932bd
28b49d9
* Wed Feb 13 2008 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-8
28b49d9
- Bump and rebuild for gcc 4.3
28b49d9
6afb1c1
* Thu Apr 26 2007 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-7
6afb1c1
- Update project urls
6afb1c1
- Fix up initscript exit codes (#237936)
6afb1c1
e27da75
* Tue Sep 05 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-6
e27da75
- Bump for new glibc
e27da75
5b6967f
* Fri Jul 28 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-5
5b6967f
- Properly enable smp_mflags this time
5b6967f
ca8bcfe
* Fri Jul 28 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-4
ca8bcfe
- Add Reqs on chkconfig and service
ca8bcfe
- Turn on smp_mflags
ca8bcfe
- Initial build for RHEL5
ca8bcfe
60ba5dc
* Wed Jul 05 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-3
60ba5dc
- Add missing condrestart fuction to initscript
60ba5dc
2a92b12
* Tue Jun 27 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-2
2a92b12
- Don't strip bins on make install, leave for find-debug.sh
2a92b12
695670f
* Tue Jun 27 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-1
695670f
- Update to 0.1.9.2
695670f
740e881
* Tue Jun 20 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.1-3
740e881
- Add Requires: logrotate
740e881
- Ugh, conmand exits cleanly if no CONSOLE(s) are defined in
740e881
  /etc/conman.conf, add check to initscript to report failure
740e881
  if none are defined
740e881
740e881
* Wed Jun 14 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.1-2
740e881
- Create log directories and install working logrotate config
740e881
- Use a much cleaner RH/FC-specific initscript
740e881
740e881
* Tue Jun 13 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.1-1
740e881
- Initial build for Fedora Extras