[csw-devel] SF.net SVN: gar:[20630] csw/mgar/pkg/ntp/trunk

bonivart at users.sourceforge.net bonivart at users.sourceforge.net
Sun Apr 7 11:00:19 CEST 2013


Revision: 20630
          http://gar.svn.sourceforge.net/gar/?rev=20630&view=rev
Author:   bonivart
Date:     2013-04-07 09:00:19 +0000 (Sun, 07 Apr 2013)
Log Message:
-----------
ntp/trunk: add start script, sample conf file, split package

Modified Paths:
--------------
    csw/mgar/pkg/ntp/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/ntp/trunk/files/cswntp
    csw/mgar/pkg/ntp/trunk/files/ntp
    csw/mgar/pkg/ntp/trunk/files/ntp.conf

Modified: csw/mgar/pkg/ntp/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ntp/trunk/Makefile	2013-04-07 08:40:22 UTC (rev 20629)
+++ csw/mgar/pkg/ntp/trunk/Makefile	2013-04-07 09:00:19 UTC (rev 20630)
@@ -9,12 +9,38 @@
 MASTER_SITES = http://archive.ntp.org/ntp4/ntp-4.2/
 DISTFILES = $(DISTNAME).tar.gz
 
-RUNTIME_DEP_PKGS_CSWntp += CSWlibnetsnmp25
+SPKG_SOURCEURL = http://www.isc.org/software/ntp
+
+PACKAGES += CSWntp
+CATALOGNAME_CSWntp = ntp
+SPKG_DESC_CSWntp = $(DESCRIPTION)
 RUNTIME_DEP_PKGS_CSWntp += CSWlibssl1-0-0
-RUNTIME_DEP_PKGS_CSWntp += CSWlibnetsnmpagent25
 
+PACKAGES += CSWntp-snmp
+CATALOGNAME_CSWntp-snmp = ntp_snmp
+SPKG_DESC_CSWntp-snmp = $(DESCRIPTION) (SNMP)
+RUNTIME_DEP_PKGS_CSWntp-snmp += CSWlibnetsnmp25
+RUNTIME_DEP_PKGS_CSWntp-snmp += CSWlibnetsnmpagent25
+RUNTIME_DEP_PKGS_CSWntp-snmp += CSWlibssl1-0-0
+RUNTIME_DEP_PKGS_CSWntp-snmp += CSWntp
+PKGFILES_CSWntp-snmp = .*ntpsnmpd.*
+
+INITSMF = /etc/opt/csw/init.d/cswntp
+
 CONFIGURE_ARGS  = $(DIRPATHS)
 CONFIGURE_ARGS += --with-openssl-libdir=/opt/csw/lib
 CONFIGURE_ARGS += --with-openssl-incdir=/opt/csw/include
 
+# Doesn't make much sense without parent package
+CHECKPKG_OVERRIDES_CSWntp-snmp += surplus-dependency|CSWntp                     
+
 include gar/category.mk
+
+post-install-modulated:
+	@echo " ==> Post-install for $(NAME) (custom)"
+	ginstall -d $(DESTDIR)/etc/opt/csw/init.d
+	ginstall -m 755 $(FILEDIR)/cswntp $(DESTDIR)/etc/opt/csw/init.d/
+	ginstall -d $(DESTDIR)/etc/opt/csw/pkg/CSW$(NAME)
+	ginstall -m 755 $(FILEDIR)/ntp $(DESTDIR)/etc/opt/csw/pkg/CSW$(NAME)/
+	ginstall -d $(DESTDIR)/var/opt/csw/$(NAME)
+	touch $(DESTDIR)/var/opt/csw/$(NAME)/ntp.drift

Added: csw/mgar/pkg/ntp/trunk/files/cswntp
===================================================================
--- csw/mgar/pkg/ntp/trunk/files/cswntp	                        (rev 0)
+++ csw/mgar/pkg/ntp/trunk/files/cswntp	2013-04-07 09:00:19 UTC (rev 20630)
@@ -0,0 +1,39 @@
+#!/sbin/sh
+
+# rc-script for CSW NTP
+# Peter Bonivart, 2013-04-07
+
+# Source config file
+[ -r /etc/opt/csw/pkg/CSWntp/ntp ] && . /etc/opt/csw/pkg/CSWntp/ntp
+
+ZONE= # used for initialization, do not change
+
+case "$1" in
+  start)
+    if [ -f /opt/csw/bin/ntp -a -f /etc/opt/csw/ntp.conf ]; then
+      echo "Starting ntp."
+      /opt/csw/bin/ntp $OPTIONS
+    fi
+    ;;
+  stop)
+    echo "Shutting down ntp."
+    if [ -x /usr/bin/zonename ]; then
+      if [ "`/usr/bin/zonename`" = "global" ]; then
+        ZONE="-z global"
+      fi
+    fi
+    pkill $ZONE -x ntp
+    ;;
+  reload|refresh)
+    echo "Reloading ntp."
+    if [ -x /usr/bin/zonename ]; then
+      if [ "`/usr/bin/zonename`" = "global" ]; then
+        ZONE="-z global"
+      fi
+    fi
+    pkill -HUP $ZONE -x ntp
+    ;;
+  *)
+    echo "Usage: $0 { start | stop | reload | refresh }"
+    ;;
+esac

Added: csw/mgar/pkg/ntp/trunk/files/ntp
===================================================================
--- csw/mgar/pkg/ntp/trunk/files/ntp	                        (rev 0)
+++ csw/mgar/pkg/ntp/trunk/files/ntp	2013-04-07 09:00:19 UTC (rev 20630)
@@ -0,0 +1,8 @@
+# This is where you customize some settings of your NTP installation so
+# you don't have to edit the scripts themselves as they will be replaced during
+# upgrades.
+#
+# Peter Bonivart, OpenCSW
+
+# Options
+#OPTIONS="-c /etc/opt/csw/ntp.conf"

Added: csw/mgar/pkg/ntp/trunk/files/ntp.conf
===================================================================
--- csw/mgar/pkg/ntp/trunk/files/ntp.conf	                        (rev 0)
+++ csw/mgar/pkg/ntp/trunk/files/ntp.conf	2013-04-07 09:00:19 UTC (rev 20630)
@@ -0,0 +1,6 @@
+driftfile /var/opt/csw/ntp/ntp.drift
+
+server 0.pool.ntp.org
+server 1.pool.ntp.org
+server 2.pool.ntp.org
+server 3.pool.ntp.org

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list