diff wflogs-daemon.spec.in @ 0:0aa1171aebd2 stable-1-0-0

initial version
author Carl Byington <carl@five-ten-sg.com>
date Wed, 15 May 2013 13:15:59 -0700
parents
children 400b1de6e1c6
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wflogs-daemon.spec.in	Wed May 15 13:15:59 2013 -0700
@@ -0,0 +1,71 @@
+%define localstatedir   /var/lib
+
+Summary:            wflogs daemon
+Name:               @PACKAGE@
+Version:            @VERSION@
+Release:            1%{?dist}
+License:            GPLv3+
+Group:              System Environment/Daemons
+Source:             http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz
+BuildRoot:          %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+URL:                http://www.five-ten-sg.com/%{name}/
+
+Requires(post,preun):   /sbin/chkconfig
+Requires(post,preun):   /sbin/service
+Requires:               coreutils
+BuildRequires:          gcc gcc-c++
+
+
+%description
+This is a simple wflogs daemon. It reads a syslog file, and feeds
+the data every N seconds to wflogs, which creates a web page. M
+versions of the web page are kept.
+
+%prep
+%setup -q
+
+%build
+%configure
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}        $RPM_BUILD_ROOT/etc/rc.d/init.d
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%pre
+
+
+%post
+/sbin/chkconfig --add %{name}
+
+
+%preun
+[ $1 = 0 ] && /sbin/service %{name} stop || :
+
+
+%postun
+[ $1 = 0 ] && /sbin/chkconfig --del %{name}
+
+
+%files
+%defattr(-,root,root,-)
+%{_sbindir}/*
+%{_mandir}/man1/*
+%{_mandir}/man5/*
+%docdir %{_datadir}/doc/%{name}-%{version}
+%{_datadir}/doc/%{name}-%{version}
+%config(noreplace) %{_sysconfdir}/%{name}.conf
+/etc/rc.d/init.d/%{name}
+
+
+%changelog
+* Wed May 15 2013 Carl Byington <carl@five-ten-sg.com> - 1.0-1
+- initial revision