File daemontools.spec of Package daemontools

Name: daemontools
Version: 0.76
Release: 1
Summary: Tool collection for managing UNIX services
Group: System/Base
License: Public domain
Source0: %{name}-%{version}.tar.gz
Source1: http://smarden.org/pape/djb/manpages/daemontools-0.76-man.tar.gz
Patch0: daemontools-0.76.errno.patch


%description
%{summary}.

%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_mandir}/man8/*


%package sv
Summary: Service monitoring programs from daemontools
Group: System/Base
Requires: %{name} = %{version}-%{release}

%description sv
%{summary}.

%files sv
%defattr(-,root,root,-)
%{_sbindir}/*



%prep
%setup -q -n admin/%{name}-%{version}
%patch0 -p1
tar xf %{SOURCE1}


%build
./package/compile


%install
install -m755 -d %{buildroot}/%{_bindir}
install -m755 -d %{buildroot}/%{_sbindir}
install -m755 command/* %{buildroot}/%{_bindir}/
mv %{buildroot}/%{_bindir}/sv* %{buildroot}/%{_sbindir}/
mv %{buildroot}/%{_bindir}/supervise %{buildroot}/%{_sbindir}/
install -m755 -d %{buildroot}/%{_mandir}/man8/
install -m644 daemontools-man/{e,f,m,p,r,se,t}*.8 %{buildroot}/%{_mandir}/man8/