rpms/shmpps/F-11 import.log, NONE, 1.1 shmpps.init, NONE, 1.1 shmpps.spec, NONE, 1.1 shmpps.sysconfig, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Chris Adams cmadams at fedoraproject.org
Thu Aug 20 17:51:12 UTC 2009


Author: cmadams

Update of /cvs/pkgs/rpms/shmpps/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11387/F-11

Modified Files:
	.cvsignore sources 
Added Files:
	import.log shmpps.init shmpps.spec shmpps.sysconfig 
Log Message:
Initial Fedora import


--- NEW FILE import.log ---
shmpps-1_03-1_fc11:F-11:shmpps-1.03-1.fc11.src.rpm:1250790644


--- NEW FILE shmpps.init ---
#!/bin/sh
#
# shmpps	This shell script takes care of starting and stopping
#		the shared memory PPS driver.
#
# chkconfig: - 58 74
# description: shm_splc2 is the shared memory PPS driver for NTP

# Source function library
. /etc/init.d/functions

prog=shm_splc2
lockfile=/var/lock/subsys/$prog

start() {
	[ -x /usr/sbin/shm_splc2 ] || exit 5

	[ -f /etc/sysconfig/shmpps ] || exit 6
	. /etc/sysconfig/shmpps

        echo -n $"Starting $prog: "
        daemon $prog $OPTIONS
	RETVAL=$?
        echo
	[ $RETVAL -eq 0 ] && touch $lockfile
	return $RETVAL
}

stop() {
        echo -n $"Shutting down $prog: "
	killproc $prog
	RETVAL=$?
        echo
	[ $RETVAL -eq 0 ] && rm -f $lockfile
	return $RETVAL
}

# See how we were called
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status $prog
	;;
  restart|force-reload)
	stop
	start
	;;
  try-restart|condrestart)
	if [ -f $lockfile ]; then
	    stop
	    start
	fi
	;;
  reload)
	exit 3
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
	exit 2
esac


--- NEW FILE shmpps.spec ---
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 <linux at cmadams.net> 1.03-1
- initial package



--- NEW FILE shmpps.sysconfig ---
########################################################################
# Usage:
# shm -d/dev/device -s (serial) or -p (parallel) -u (unit)
#  -c -l (line) -f -D
#
# -c sets second boundary on hi->lo transition for serial
# -l line defines serial line being sampled: DCD CTS DSR
# -f sets pin 14 flapping on parallel i/f
#
# -D debug level, may be repeated:
# No. of -D
# 0  normal operation: daemonize; no reporting
# 1  + no daemonization; progress reports to stderr
# 2  + out-of-range reports
# 3  + no updating SHM
#
# (wire PPS to parallel pin 10, ground to 18, echo out to 14)
#
# Configure ntpd to use this as a time source in ntp.conf like:
# server 127.127.28.3 minpoll 4 maxpoll 4 prefer
# fudge 127.127.28.3 refid GPS
########################################################################
# For serial DCD
OPTIONS="-d /dev/gps0 -s -u 0 -l DCD"
# For parallel
#OPTIONS="-d /dev/parport0 -p -u 0 -l DCD"


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/shmpps/F-11/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	20 Aug 2009 17:39:34 -0000	1.1
+++ .cvsignore	20 Aug 2009 17:51:12 -0000	1.2
@@ -0,0 +1 @@
+shmpps.tar


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/shmpps/F-11/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	20 Aug 2009 17:39:34 -0000	1.1
+++ sources	20 Aug 2009 17:51:12 -0000	1.2
@@ -0,0 +1 @@
+a55d2a3c51c7810cfd3e2adb08f55d02  shmpps.tar




More information about the scm-commits mailing list