Summary: A daemon to record and keep track of system up times Name: uptimed Version: 0.3.16 Release: 9%{?dist} License: GPLv2 Group: System Environment/Daemons URL: http://podgorny.cz/moin/Uptimed Source0: http://podgorny.cz/uptimed/releases/%{name}-%{version}.tar.bz2 Source1: uptimed.service BuildRequires: libtool BuildRequires: automake BuildRequires: autoconf BuildRequires: systemd-units Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units %description Uptimed is an up time record daemon keeping track of the highest up times the system ever had. Uptimed has the ability to inform you of records and milestones though syslog and e-mail, and comes with a console front end to parse the records, which can also easily be used to show your records on your Web page %package devel Summary: Development header and library for uptimed Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development header and library for uptimed. %prep %setup -q # remove bundled getopt %{__rm} -rf src/getopt.[ch] %{__sed} --in-place -e 's/AC_REPLACE_FUNCS(getopt)//' configure.ac %build aclocal automake autoreconf --force --install %configure --disable-static make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} # remove superflous file rm %{buildroot}/%{_libdir}/libuptimed.la # Debian ships urec.h as uptimed.h since 2005 mkdir %{buildroot}%{_includedir} cp libuptimed/urec.h %{buildroot}%{_includedir}/uptimed.h install -m 755 -d %{buildroot}%_docdir/%{name}-%{version}/sample-cgi install -m 644 sample-cgi/uprecords.* %{buildroot}%_docdir/%{name}-%{version}/sample-cgi mv %{buildroot}/etc/uptimed.conf-dist %{buildroot}/etc/uptimed.conf mkdir -p %{buildroot}%{_unitdir} cp -p %{SOURCE1} %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_localstatedir}/spool/uptimed %post /sbin/ldconfig if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi %post devel -p /sbin/ldconfig %postun /sbin/ldconfig /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : fi %postun devel -p /sbin/ldconfig %preun if [ $1 -eq 0 ] ; then # Package removal, not upgrade /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || : /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : fi %files %defattr(-,root,root,-) %doc AUTHORS COPYING CREDITS ChangeLog INSTALL.cgi INSTALL.upgrade README README.unsupported TODO sample-cgi/ %config(noreplace) /etc/uptimed.conf %{_sbindir}/uptimed %{_bindir}/uprecords %{_mandir}/*/* %{_libdir}/libuptimed.so.* %{_unitdir}/uptimed.service %dir %{_localstatedir}/spool/uptimed %files devel %defattr(-,root,root,-) %{_libdir}/libuptimed.so %{_includedir}/uptimed.h %changelog * Sat Feb 11 2012 Tomasz Torcz 0.3.16-9 - remove bundled getopt * Thu Feb 09 2012 Tomasz Torcz 0.3.16-8 - start Description= in unit file with uppercase - provide defattr for -devel files * Sun Jan 29 2012 Tomasz Torcz 0.3.16-7 - remove epoch for -devel Requires * Sat Jan 14 2012 Tomasz Torcz 0.3.16-6 - add missing percentage sign to -devel Requires * Sat Jan 14 2012 Tomasz Torcz 0.3.16-5 - add _isa to -devel Requires - mention header in -devel description and summary * Mon Jan 9 2012 Tomasz Torcz 0.3.16-4 - ship urec.h as uptimed.h in -devel * Sun Jan 1 2012 Tomasz Torcz 0.3.16-3 - correct review issues (#770283): - dropped BuildRoot:, clean and rm -rf "{buildroot}" from install - use defattr(-,root,root,-) instead of defattr(-,root,root) - use dir {_localstatedir}/spool/uptimed/ in files - don't package uptimed.la * Wed Dec 28 2011 Tomasz Torcz 0.3.16-2 - added Group: and Requires: to -devel * Sun Dec 25 2011 Tomasz Torcz 0.3.16-1 - Initial version based on .spec shipped with source