aboutsummaryrefslogtreecommitdiff
path: root/sysutils/puppet
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2009-03-31 14:00:15 +0000
committerWesley Shields <wxs@FreeBSD.org>2009-03-31 14:00:15 +0000
commitc2042e5321067757b08b361fd93bd43843d982b1 (patch)
treec9f8ca7c3d4022f0cf8944ba0a8be6332c973df3 /sysutils/puppet
parent694ee5533aa3eaba3a430504e5def5b30bbfeaa3 (diff)
downloadports-c2042e5321067757b08b361fd93bd43843d982b1.tar.gz
ports-c2042e5321067757b08b361fd93bd43843d982b1.zip
Notes
Diffstat (limited to 'sysutils/puppet')
-rw-r--r--sysutils/puppet/Makefile57
-rw-r--r--sysutils/puppet/distinfo6
-rw-r--r--sysutils/puppet/files/pkg-deinstall.in14
-rw-r--r--sysutils/puppet/files/pkg-install.in14
-rw-r--r--sysutils/puppet/files/pkg-message.in4
-rw-r--r--sysutils/puppet/pkg-plist3
6 files changed, 57 insertions, 41 deletions
diff --git a/sysutils/puppet/Makefile b/sysutils/puppet/Makefile
index ac79fe94fbd5..e72b5db709e0 100644
--- a/sysutils/puppet/Makefile
+++ b/sysutils/puppet/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= puppet
-PORTVERSION= 0.24.4
+PORTVERSION= 0.24.8
CATEGORIES= sysutils
MASTER_SITES= http://www.reductivelabs.com/downloads/puppet/
EXTRACT_SUFX= .tgz
@@ -23,41 +23,35 @@ CONFLICTS= puppet-devel-[0-9]*
NO_BUILD= yes
USE_RUBY= yes
USE_RC_SUBR= puppetmasterd puppetd
-DOCS= CHANGELOG README LICENSE COPYING
+PORTDOCS= CHANGELOG README LICENSE COPYING
+PORTEXAMPLES= *
PUPPET_USER:= puppet
PUPPET_GROUP:= ${PUPPET_USER}
PUPPET_RUNDIR:= /var/run/${PORTNAME}
-SUB_FILES+= pkg-install pkg-message
+PUPPET_WORKDIR:= /var/${PORTNAME}
+SUB_FILES+= pkg-install pkg-message pkg-deinstall
SUB_LIST+= PUPPET_RUNDIR="${PUPPET_RUNDIR}" \
- PUPPET_USER="${PUPPET_USER}" \
- PUPPET_GROUP="${PUPPET_GROUP}"
+ PUPPET_USER="${PUPPET_USER}" \
+ PUPPET_GROUP="${PUPPET_GROUP}" \
+ PUPPET_WORKDIR="${PUPPET_WORKDIR}"
+
+MANCOMPRESSED= yes
+MAN8= filebucket.8 pi.8 puppet.8 puppet.conf.8 puppetca.8 puppetd.8 \
+ puppetdoc.8 puppetmasterd.8 puppetrun.8 ralsh.8
.include <bsd.port.pre.mk>
post-patch:
- ${REINPLACE_CMD} -e "s|/etc/puppet|${PREFIX}/etc/puppet|" \
+ @${REINPLACE_CMD} -e "s|/etc/puppet|${PREFIX}/etc/puppet|" \
${WRKSRC}/lib/puppet/reference/configuration.rb
- ${REINPLACE_CMD} -e "s|/etc/puppet|${PREFIX}/etc/puppet|" \
- ${WRKSRC}/lib/puppet/defaults.rb
+ @${REINPLACE_CMD} -e "s|/etc/puppet|${PREFIX}/etc/puppet|" \
+ ${WRKSRC}/lib/puppet/defaults.rb
pre-install:
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
- cd ${WRKSRC} && \
- ${SETENV} DSTDIR=${DSTDIR}/${PREFIX} \
- ${RUBY} ${WRKSRC}/install.rb --full
- ${INSTALL} -d ${DOCSDIR}
-.if !defined(NOPORTDOCS)
-.for FILE in ${DOCS}
- ${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
-.endfor
-.endif
-.if !defined(NOPORTEXAMPLES)
- ${INSTALL} -d ${EXAMPLESDIR}
- ${CP} -R ${WRKSRC}/examples/* ${EXAMPLESDIR}
- @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
-.endif
+ @cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} ${RUBY} ${WRKSRC}/install.rb
post-install:
${INSTALL} -d ${PREFIX}/etc/${PORTNAME}
@@ -74,21 +68,16 @@ post-install:
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type f | \
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
-.if !defined(NOPORTEXAMPLES)
- @${FIND} ${EXAMPLESDIR} -type f | \
- ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
- @${FIND} ${EXAMPLESDIR} -type d | ${SORT} -r | \
- ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
-.endif
-.if !defined(NOPORTDOCS)
- @${FIND} ${DOCSDIR} -type f | \
- ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
- @${FIND} ${DOCSDIR} -type d | ${SORT} -r | \
- ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
-.endif
@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type d | ${SORT} -r | \
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.if !defined(NOPORTDOCS)
+ ${INSTALL} -d ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
+.if !defined(NOPORTEXAMPLES)
+ cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
+.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/sysutils/puppet/distinfo b/sysutils/puppet/distinfo
index cc34c21598f9..aab0a0e993e3 100644
--- a/sysutils/puppet/distinfo
+++ b/sysutils/puppet/distinfo
@@ -1,3 +1,3 @@
-MD5 (puppet-0.24.4.tgz) = 9658624ed3745e8954772b3fbfdcc438
-SHA256 (puppet-0.24.4.tgz) = 0d54f6db7cf1210d123264bcb35b07b36837ebc12a4f2bd01aee6127836adfb9
-SIZE (puppet-0.24.4.tgz) = 652572
+MD5 (puppet-0.24.8.tgz) = 288d46dee00acad64d0f3ecc6d8ba6fa
+SHA256 (puppet-0.24.8.tgz) = 9e9dcfdd26f96e0b0b4ca9bcfe6f473c679ff082a0cd7226c2058ae652d4fdc8
+SIZE (puppet-0.24.8.tgz) = 1099188
diff --git a/sysutils/puppet/files/pkg-deinstall.in b/sysutils/puppet/files/pkg-deinstall.in
new file mode 100644
index 000000000000..70bf15c5da89
--- /dev/null
+++ b/sysutils/puppet/files/pkg-deinstall.in
@@ -0,0 +1,14 @@
+#!/bin/sh
+# $FreeBSD:
+
+PATH="/bin:/sbin:/usr/bin:/usr/sbin"
+
+RUNDIR=%%PUPPET_RUNDIR%%
+WORKDIR=%%PUPPET_WORKDIR%%
+
+if [ "$2" = "POST-DEINSTALL" ]; then
+ echo "=> Deleting ${RUNDIR} if empty..."
+ rm -d ${RUNDIR} 2>/dev/null || true
+ echo "=> Deleting ${WORKDIR} if empty..."
+ rm -d ${WORKDIR} 2>/dev/null || true
+fi
diff --git a/sysutils/puppet/files/pkg-install.in b/sysutils/puppet/files/pkg-install.in
index 9abe03a0e148..d446e5e003d2 100644
--- a/sysutils/puppet/files/pkg-install.in
+++ b/sysutils/puppet/files/pkg-install.in
@@ -8,6 +8,7 @@ UID=814
GID=$UID
RUNDIR=%%PUPPET_RUNDIR%%
+WORKDIR=%%PUPPET_WORKDIR%%
PW="pw"
CHOWN="chown"
@@ -36,7 +37,18 @@ if [ "$2" = "PRE-INSTALL" ]; then
fi
elif [ "$2" = "POST-INSTALL" ]; then
- ${INSTALL_DIR} ${RUNDIR}
+ if [ -d ${RUNDIR} ]; then
+ echo "=> ${RUNDIR} already exists."
+ else
+ echo -n "=> Creating RUNDIR ${RUNDIR}... "
+ ${INSTALL_DIR} ${RUNDIR} || echo "failed"
+ fi
+ if [ -d ${WORKDIR} ]; then
+ echo "=> ${WORKDIR} already exists."
+ else
+ echo -n "=> Creating WORKDIR ${WORKDIR}... "
+ ${INSTALL_DIR} ${WORKDIR} || echo "failed"
+ fi
fi
exit 0
diff --git a/sysutils/puppet/files/pkg-message.in b/sysutils/puppet/files/pkg-message.in
index 6f90cbeecc9e..a384ab8c99fe 100644
--- a/sysutils/puppet/files/pkg-message.in
+++ b/sysutils/puppet/files/pkg-message.in
@@ -5,7 +5,7 @@ puppetmasterd_enable="YES"
to /etc/rc.conf
-Indivisual config files such as %%PREFIX%%/etc/puppetmasterd.conf are
-deprecated. Use a single file, %%PREFIX%%/puppet/puppet.conf.
+Individual config files such as %%PREFIX%%/etc/puppetmasterd.conf are
+deprecated. Use a single file, %%PREFIX%%/etc/puppet/puppet.conf.
Now the default PID directory is %%PUPPET_RUNDIR%%.
diff --git a/sysutils/puppet/pkg-plist b/sysutils/puppet/pkg-plist
index 8751c5fdf14d..0d1a04eb5301 100644
--- a/sysutils/puppet/pkg-plist
+++ b/sysutils/puppet/pkg-plist
@@ -8,7 +8,8 @@ bin/puppetrun
bin/puppetmasterd
bin/ralsh
etc/puppet/puppet.conf-dist
+@exec mkdir -p %D/etc/puppet/ssl
+@exec mkdir -p %D/etc/puppet/manifests
@dirrmtry etc/puppet/ssl
@dirrmtry etc/puppet/manifests
@dirrmtry etc/puppet
-@dirrmtry /var/run/puppet