SF.net SVN: gar:[23897] csw/mgar/pkg/znapzend/trunk

lblume at users.sourceforge.net lblume at users.sourceforge.net
Thu Jul 31 16:41:30 CEST 2014


Revision: 23897
          http://sourceforge.net/p/gar/code/23897
Author:   lblume
Date:     2014-07-31 14:41:29 +0000 (Thu, 31 Jul 2014)
Log Message:
-----------
znapzend/trunk: Add SMF; various adjustments

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

Added Paths:
-----------
    csw/mgar/pkg/znapzend/trunk/files/cswznapzend

Modified: csw/mgar/pkg/znapzend/trunk/Makefile
===================================================================
--- csw/mgar/pkg/znapzend/trunk/Makefile	2014-07-31 13:27:40 UTC (rev 23896)
+++ csw/mgar/pkg/znapzend/trunk/Makefile	2014-07-31 14:41:29 UTC (rev 23897)
@@ -17,17 +17,46 @@
 VENDOR_URL   = http://www.znapzend.org/
 
 DISTFILES  = $(DISTNAME).tar.gz
+DISTFILES += cswznapzend
 
-CONFIGURE_ARGS = $(DIRPATHS)
+INITSMF = /etc/opt/csw/init.d/cswznapzend
 
+REINPLACEMENTS += manifest servicename xmlloc datadir pmdir
+# Bug, incorrect part in path
+REINPLACE_MATCH_manifest = /oep/
+REINPLACE_WITH_manifest  = /
+REINPLACE_FILES_manifest = init/znapzend.xml.in
+# Adjust the name for OpenCSW
+REINPLACE_MATCH_servicename = name="oep/znapzend"
+REINPLACE_WITH_servicename  = name="system/cswznapzend"
+REINPLACE_FILES_servicename = init/znapzend.xml.in
+# Install that file manually in the right location
+REINPLACE_MATCH_xmlloc = nobase_data_DATA = \$$\(PM\) init/znapzend.xml
+REINPLACE_WITH_xmlloc  = nobase_data_DATA = \$$\(PM\)
+REINPLACE_FILES_xmlloc = Makefile.in
+# datadir must be set
+REINPLACE_MATCH_datadir = datadir = \$$\(prefix\)
+REINPLACE_WITH_datadir  = datadir = \@datadir\@
+REINPLACE_FILES_datadir = Makefile.in
+# No need for lib/ subdir
+REINPLACE_MATCH_pmdir = \$$\(DESTDIR\)\$$\(datadir\)/\$$\$$dir
+REINPLACE_WITH_pmdir  = \$$\(DESTDIR\)\$$\(datadir\)/ZnapZend
+REINPLACE_FILES_pmdir = Makefile.in
+
+CONFIGURE_ARGS =  $(DIRPATHS)
+CONFIGURE_ARGS += --datadir=$(libdir)/perl/csw/
+
 BUILD_DEP_PKGS += CSWpm-pod-simple
 BUILD_DEP_PKGS += CSWpm-mojolicious
+BUILD_DEP_PKGS += CSWpm-mojo-ioloop-forkcall
 
 RUNTIME_DEP_PKGS_CSWznapzend += CSWperl
 RUNTIME_DEP_PKGS_CSWznapzend += CSWpm-pod-simple
 CHECKPKG_OVERRIDES_CSWznapzend += surplus-dependency|CSWpm-pod-simple
 RUNTIME_DEP_PKGS_CSWznapzend += CSWpm-mojolicious
 CHECKPKG_OVERRIDES_CSWznapzend += surplus-dependency|CSWpm-mojolicious
+RUNTIME_DEP_PKGS_CSWznapzend += CSWpm-mojo-ioloop-forkcall
+CHECKPKG_OVERRIDES_CSWznapzend += surplus-dependency|CSWpm-mojo-ioloop-forkcall
 # Can be used as an option
 RUNTIME_DEP_PKGS_CSWznapzend += CSWmbuffer
 CHECKPKG_OVERRIDES_CSWznapzend += surplus-dependency|CSWmbuffer
@@ -43,3 +72,9 @@
 
 include gar/category.mk
 
+post-install:
+	ginstall -d $(DESTDIR)/etc/opt/csw/init.d
+	ginstall $(WORKDIR)/cswznapzend $(DESTDIR)/etc/opt/csw/init.d
+#	ginstall -d -m 755 $(DESTDIR)/var/opt/csw/svc/manifest/system
+#	ginstall -m 444 $(WORKSRC)/init/znapzend.xml $(DESTDIR)/var/opt/csw/svc/manifest/system/
+

Added: csw/mgar/pkg/znapzend/trunk/files/cswznapzend
===================================================================
--- csw/mgar/pkg/znapzend/trunk/files/cswznapzend	                        (rev 0)
+++ csw/mgar/pkg/znapzend/trunk/files/cswznapzend	2014-07-31 14:41:29 UTC (rev 23897)
@@ -0,0 +1,27 @@
+#!/bin/sh
+#AUTOENABLE no      # Before running always manual adjustment of smb.conf is needed
+#FMRI system        # FMRI path for service (S10+), default is /network.
+
+
+PATH=/bin:/sbin:/usr/bin:/usr/sbin
+export PATH
+
+case "$1" in
+	start)
+		echo "Starting znapzend..."
+		/opt/csw/bin/znapzend --daemonize --pidfile=/var/run/znapzend.pid
+	;;
+	stop)
+		echo "Stopping znapzend..."
+		/usr/bin/kill `cat /var/run/znapzend.pid`
+	;;
+	restart)
+		$0 stop
+		$0 start
+	;;
+	*)
+		echo "$0 {start | stop | restart}"
+		exit 1;
+	;;
+esac
+


Property changes on: csw/mgar/pkg/znapzend/trunk/files/cswznapzend
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
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