aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/puppet
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2007-04-13 21:37:08 +0800
committerlwhsu <lwhsu@FreeBSD.org>2007-04-13 21:37:08 +0800
commit7d879a9ce9f82df1a262311b0160bb7dccc34d08 (patch)
tree0a1f2c81a95ca3457c0f3de46e8510c64f4b4656 /sysutils/puppet
parent68f551ea60b44b9bd3b2461521dc3a84e9ae146c (diff)
downloadfreebsd-ports-gnome-7d879a9ce9f82df1a262311b0160bb7dccc34d08.tar.gz
freebsd-ports-gnome-7d879a9ce9f82df1a262311b0160bb7dccc34d08.tar.zst
freebsd-ports-gnome-7d879a9ce9f82df1a262311b0160bb7dccc34d08.zip
- Install rc.d scripts [1]
- Install default config file [1] - Add PORTDOCS in pkg-plist [2] PR: 110618 [1], 110543 [2] Submitted by: Tomoyuki Sakurai <cherry AT trombik.org> (maintainer) [1] Robert Gogolok <gogo AT cs.uni-sb.de> [2] Approved by: clsung (mentor)
Diffstat (limited to 'sysutils/puppet')
-rw-r--r--sysutils/puppet/Makefile15
-rw-r--r--sysutils/puppet/files/puppetd.in27
-rw-r--r--sysutils/puppet/files/puppetmasterd.in27
-rw-r--r--sysutils/puppet/pkg-plist86
4 files changed, 113 insertions, 42 deletions
diff --git a/sysutils/puppet/Makefile b/sysutils/puppet/Makefile
index 61675e4ea80a..90832f92877b 100644
--- a/sysutils/puppet/Makefile
+++ b/sysutils/puppet/Makefile
@@ -7,6 +7,7 @@
PORTNAME= puppet
PORTVERSION= 0.22.1
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.reductivelabs.com/downloads/puppet/
EXTRACT_SUFX= .tgz
@@ -19,6 +20,7 @@ RUN_DEPENDS= ${BUILD_DEPENDS}
NO_BUILD= yes
USE_RUBY= yes
+USE_RC_SUBR= puppetmasterd puppetd
DOCS= CHANGELOG TODO README LICENSE COPYING
@@ -35,7 +37,18 @@ do-install:
.endfor
${INSTALL} -d ${EXAMPLESDIR}
${CP} -R ${WRKSRC}/examples/* ${EXAMPLESDIR}
- @${CHOWN} -R root:wheel ${EXAMPLESDIR}
+ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
.endif
+post-install:
+ ${INSTALL} -d ${PREFIX}/etc/${PORTNAME}
+.for DIR in ssl manifests
+ ${INSTALL} -d ${PREFIX}/etc/${PORTNAME}/${DIR}
+.endfor
+ ${RUBY} ${PREFIX}/bin/puppetmasterd \
+ --confdir=${PREFIX}/etc/${PORTNAME} \
+ --genconfig | \
+ ${SED} -e 's/genconfig = true/# genconfig = false/' \
+ > ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf-dist
+
.include <bsd.port.post.mk>
diff --git a/sysutils/puppet/files/puppetd.in b/sysutils/puppet/files/puppetd.in
new file mode 100644
index 000000000000..8ad8440cd67c
--- /dev/null
+++ b/sysutils/puppet/files/puppetd.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+
+# PROVIDE: puppetd
+# REQUIRE: NETWORK
+
+# Add the following lines to /etc/rc.conf to enable puppetd:
+#
+# puppetmasterd_enable="YES"
+
+. %%RC_SUBR%%
+
+name="puppetd"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/${name}"
+command_interpreter="${prefix}/bin/ruby18"
+
+load_rc_config "$name"
+: ${puppetd_enable="NO"}
+: ${puppetd_confdir="%%PREFIX%%/etc/puppet"}
+: ${puppetd_pid="/var/run/puppet/${name}.pid"}
+: ${puppetd_flags="--confdir $puppetd_confdir "}
+command_args="$puppetd_flags"
+pidfile="$puppetd_pid"
+
+run_rc_command "$1"
diff --git a/sysutils/puppet/files/puppetmasterd.in b/sysutils/puppet/files/puppetmasterd.in
new file mode 100644
index 000000000000..f97dcab3335b
--- /dev/null
+++ b/sysutils/puppet/files/puppetmasterd.in
@@ -0,0 +1,27 @@
+:#!/bin/sh
+#
+
+# PROVIDE: puppetmasterd
+# REQUIRE: NETWORK
+
+# Add the following lines to /etc/rc.conf to enable puppetmasterd:
+#
+# puppetmasterd_enable="YES"
+
+. %%RC_SUBR%%
+
+name="puppetmasterd"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/${name}"
+command_interpreter="${prefix}/bin/ruby18"
+
+load_rc_config "$name"
+: ${puppetmasterd_enable="NO"}
+: ${puppetmasterd_confdir="%%PREFIX%%/etc/puppet"}
+: ${puppetmasterd_pid="/var/run/puppet/${name}.pid"}
+: ${puppetmasterd_flags="--confdir $puppetmasterd_confdir "}
+command_args="$puppetmasterd_flags"
+pidfile="$puppetmasterd_pid"
+
+run_rc_command "$1"
diff --git a/sysutils/puppet/pkg-plist b/sysutils/puppet/pkg-plist
index 32f449239fc8..d336aa9679a7 100644
--- a/sysutils/puppet/pkg-plist
+++ b/sysutils/puppet/pkg-plist
@@ -275,45 +275,49 @@ bin/puppetmasterd
@dirrmtry %%RUBY_SITELIBDIR%%/puppet/external
@dirrmtry %%RUBY_SITELIBDIR%%/puppet/client
@dirrmtry %%RUBY_SITELIBDIR%%/puppet
-%%DOCSDIR%%/CHANGELOG
-%%DOCSDIR%%/TODO
-%%DOCSDIR%%/README
-%%DOCSDIR%%/LICENSE
-%%DOCSDIR%%/COPYING
+%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
+%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%EXAMPLESDIR%%/root/bin/sleeper
-%%EXAMPLESDIR%%/root/etc/init.d/sleeper
-%%EXAMPLESDIR%%/root/etc/puppet/puppetd.conf
-%%EXAMPLESDIR%%/root/etc/puppet/fileserver.conf
-%%EXAMPLESDIR%%/root/etc/puppet/puppetmasterd.conf
-%%EXAMPLESDIR%%/root/etc/puppet/namespaceauth.conf
-%%EXAMPLESDIR%%/root/etc/puppet/tagmail.conf
-%%EXAMPLESDIR%%/root/etc/otherfile
-%%EXAMPLESDIR%%/root/etc/configfile
-%%EXAMPLESDIR%%/root/etc/debian-passwd
-%%EXAMPLESDIR%%/root/etc/debian-syslog.conf
-%%EXAMPLESDIR%%/code/allatonce
-%%EXAMPLESDIR%%/code/head
-%%EXAMPLESDIR%%/code/selectors
-%%EXAMPLESDIR%%/code/execs
-%%EXAMPLESDIR%%/code/nodes
-%%EXAMPLESDIR%%/code/filerecursion
-%%EXAMPLESDIR%%/code/components
-%%EXAMPLESDIR%%/code/file.bl
-%%EXAMPLESDIR%%/code/groups
-%%EXAMPLESDIR%%/code/functions
-%%EXAMPLESDIR%%/code/fileparsing
-%%EXAMPLESDIR%%/code/svncommit
-%%EXAMPLESDIR%%/code/filedefaults
-%%EXAMPLESDIR%%/code/simpletests
-%%EXAMPLESDIR%%/code/assignments
-%%EXAMPLESDIR%%/code/relationships
-%%EXAMPLESDIR%%/code/importing
-%%EXAMPLESDIR%%/code/one
-@dirrmtry %%EXAMPLESDIR%%/root/bin
-@dirrmtry %%EXAMPLESDIR%%/root/etc/init.d
-@dirrmtry %%EXAMPLESDIR%%/root/etc/puppet
-@dirrmtry %%EXAMPLESDIR%%/root/etc
-@dirrmtry %%EXAMPLESDIR%%/root
-@dirrmtry %%EXAMPLESDIR%%/code
-@dirrmtry %%EXAMPLESDIR%%
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/bin/sleeper
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/init.d/sleeper
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/puppetd.conf
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/fileserver.conf
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/puppetmasterd.conf
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/namespaceauth.conf
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/tagmail.conf
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/otherfile
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/configfile
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/debian-passwd
+%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/debian-syslog.conf
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/allatonce
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/head
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/selectors
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/execs
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/nodes
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/filerecursion
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/components
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/file.bl
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/groups
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/functions
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/fileparsing
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/svncommit
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/filedefaults
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/simpletests
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/assignments
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/relationships
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/importing
+%%PORTDOCS%%%%EXAMPLESDIR%%/code/one
+%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root/bin
+%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root/etc/init.d
+%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root/etc/puppet
+%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root/etc
+%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root
+%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/code
+%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%
+etc/puppet/puppet.conf-dist
+@dirrmtry etc/puppet/ssl
+@dirrmtry etc/puppet/manifests
+@dirrmtry etc/puppet