Name: shmpps Version: 1.03 Release: 1%{?dist} Summary: Shared Memory driver for PPS time signals Group: System Environment/Daemons License: Public Domain and MIT URL: http://time.qnan.org/ Source0: http://time.qnan.org/%{name}.tar Source1: shmpps.init Source2: shmpps.sysconfig BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: ntp Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig /sbin/service Requires(postun): /sbin/service %description Shared memory (SHM) driver to allow high-resolution pulse-per-second (PPS) time sources to be used with a Network Time Protocol (NTP) server without a PPS-enabled kernel. The PPS pin of the time source must be connected to the declared signal pin on a serial or parallel port. See /etc/sysconfig/shmpps for configuration. %prep %setup -q -n %{name} sed -i \ -e 's/#undef *DOPARALLEL/#define DOPARALLEL/' \ shm_splc2.c %build make CFLAGS="%{optflags}" LDFLAGS="" %install rm -rf %{buildroot} install -p -m755 -D shm_splc2 %{buildroot}%{_sbindir}/shm_splc2 install -p -m755 -D %{SOURCE1} %{buildroot}%{_initrddir}/shmpps install -p -m644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/shmpps %clean rm -rf %{buildroot} %post /sbin/chkconfig --add shmpps %preun if [ "$1" -eq 0 ]; then /sbin/service shmpps stop > /dev/null 2>&1 /sbin/chkconfig --del shmpps fi %postun if [ "$1" -ge 1 ]; then /sbin/service shmpps condrestart > /dev/null 2>&1 fi %files %defattr(-,root,root,-) %{_sbindir}/shm_splc2 %{_initrddir}/shmpps %config(noreplace) %{_sysconfdir}/sysconfig/shmpps %changelog * Sat Nov 22 2008 Chris Adams 1.03-1 - initial package