summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortonnerre <tonnerre>2008-03-13 20:05:09 +0000
committertonnerre <tonnerre>2008-03-13 20:05:09 +0000
commit60b7de34021c05b1ad8ec66b13a303c3060358f2 (patch)
treefce3a2f2be24c5078dd1d92c0b07f00ae1407225
parent3af1be17bd3b6af63e250fe3dc790afbc037cd2a (diff)
downloadpkgsrc-60b7de34021c05b1ad8ec66b13a303c3060358f2.tar.gz
Various style improvements as suggested by Joerg:
- Don't use variables that contain EXAMPLESDIR - Eliminate PLIST_SUBST - Use SUBST instead of post-patch target - Use INSTALLATION_DIRS instead of INSTALL_DATA_DIR - Use proper English capitalization in patch files
-rw-r--r--sysutils/puppet/Makefile36
-rw-r--r--sysutils/puppet/PLIST90
-rw-r--r--sysutils/puppet/distinfo6
-rw-r--r--sysutils/puppet/patches/patch-aa4
-rw-r--r--sysutils/puppet/patches/patch-ac4
5 files changed, 66 insertions, 74 deletions
diff --git a/sysutils/puppet/Makefile b/sysutils/puppet/Makefile
index 61debd0481e..a0cfad77936 100644
--- a/sysutils/puppet/Makefile
+++ b/sysutils/puppet/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/03/13 14:17:05 tonnerre Exp $
+# $NetBSD: Makefile,v 1.2 2008/03/13 20:05:09 tonnerre Exp $
#
DISTNAME= puppet-0.22.4
@@ -13,7 +13,7 @@ COMMENT= Configuration management framework written in Ruby
NO_BUILD= yes
DOCS= CHANGELOG TODO README LICENSE COPYING
PUPPET_DOCSDIR= ${PREFIX}/share/doc/puppet
-PUPPET_EXAMPLESDIR= ${PREFIX}/share/examples/puppet
+PUPPET_EGDIR= ${PREFIX}/share/examples/puppet
EXAMPLEROOT_DIRS= bin etc etc/init.d etc/puppet
EXAMPLEROOT_FILES= bin/sleeper etc/init.d/sleeper \
etc/puppet/puppetd.conf etc/puppet/fileserver.conf \
@@ -22,45 +22,37 @@ EXAMPLEROOT_FILES= bin/sleeper etc/init.d/sleeper \
etc/debian-passwd etc/debian-syslog.conf
RCD_SCRIPTS= puppetd puppetmasterd
-PLIST_SUBST+= DOCSDIR="${PUPPET_DOCSDIR:S,${PREFIX}/,,}"
-PLIST_SUBST+= EXAMPLESDIR="${PUPPET_EXAMPLESDIR:S,${PREFIX}/,,}"
+SUBST_CLASSES+= prefix
+SUBST_STAGE.prefix= post-patch
+SUBST_FILES.prefix= lib/puppet/configuration.rb
+SUBST_SED.prefix= -e "s@/etc/puppet@${PREFIX}/etc/puppet@"
+
+INSTALLATION_DIRS= ${PUPPET_DOCSDIR} ${PUPPET_EGDIR} ${PUPPET_EGDIR}/code
+INSTALLATION_DIRS+= ${PUPPET_EGDIR}/root/bin ${PUPPET_EGDIR}/root/etc
+INSTALLATION_DIRS+= ${PUPPET_EGDIR}/root/etc/init.d
+INSTALLATION_DIRS+= ${PUPPET_EGDIR}/root/etc/puppet
.include "../../lang/ruby/buildlink3.mk"
DEPENDS+= ${RUBY_PKGPREFIX}-facter-[0-9]*:../../sysutils/ruby-facter
-post-patch:
- ${RM} ${WRKSRC}/bin/*.orig || ${TRUE}
- ${SED} -e "s@/etc/puppet@${PREFIX}/etc/puppet@" \
- ${WRKSRC}/lib/puppet/configuration.rb > \
- ${WRKSRC}/lib/puppet/configuration.rb.new
- ${MV} ${WRKSRC}/lib/puppet/configuration.rb.new \
- ${WRKSRC}/lib/puppet/configuration.rb
-
do-install:
cd ${WRKSRC} && ${SETENV} DSTDIR=${DESTDIR}/${PREFIX} \
${RUBY} ${WRKSRC}/install.rb --full
- ${INSTALL_DATA_DIR} ${PUPPET_DOCSDIR}
.for file in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${file} ${PUPPET_DOCSDIR}
.endfor
- ${INSTALL_DATA_DIR} ${PUPPET_EXAMPLESDIR}
- ${INSTALL_DATA_DIR} ${PUPPET_EXAMPLESDIR}/code
- ${INSTALL_DATA} ${WRKSRC}/examples/code/* ${PUPPET_EXAMPLESDIR}/code
-.for dir in ${EXAMPLEROOT_DIRS}
- ${INSTALL_DATA_DIR} ${PUPPET_EXAMPLESDIR}/root/${dir}
-.endfor
+ ${INSTALL_DATA} ${WRKSRC}/examples/code/* ${PUPPET_EGDIR}/code
.for file in ${EXAMPLEROOT_FILES}
${INSTALL_DATA} ${WRKSRC}/examples/root/${file} \
- ${PUPPET_EXAMPLESDIR}/root/${file}
+ ${PUPPET_EGDIR}/root/${file}
.endfor
- ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PUPPET_EXAMPLESDIR}
post-install:
${RUBY} ${PREFIX}/bin/puppetmasterd \
--confdir=${PREFIX}/etc/puppet --rundir=/var/run \
--genconfig | \
${SED} -e 's/genconfig = true/# genconfig = false/' \
- > ${PUPPET_EXAMPLESDIR}/puppetmasterd.conf.sample
+ > ${PUPPET_EGDIR}/puppetmasterd.conf.sample
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/puppet/PLIST b/sysutils/puppet/PLIST
index c69ef4b57d6..34b6909ab0e 100644
--- a/sysutils/puppet/PLIST
+++ b/sysutils/puppet/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2008/03/13 14:17:05 tonnerre Exp $
+@comment $NetBSD: PLIST,v 1.2 2008/03/13 20:05:09 tonnerre Exp $
bin/puppet
bin/puppetca
bin/puppetd
@@ -294,47 +294,47 @@ ${RUBY_SITELIBDIR}/puppet/provider/package/blastwave.rb
@dirrm ${RUBY_SITELIBDIR}/puppet/external/event-loop
@dirrm ${RUBY_SITELIBDIR}/puppet/external
@dirrm ${RUBY_SITELIBDIR}/puppet
-${DOCSDIR}/CHANGELOG
-${DOCSDIR}/TODO
-${DOCSDIR}/README
-${DOCSDIR}/LICENSE
-${DOCSDIR}/COPYING
-@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/mac_automount.pp
-${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
-${EXAMPLESDIR}/puppetmasterd.conf.sample
-@dirrm ${EXAMPLESDIR}/root/bin
-@dirrm ${EXAMPLESDIR}/root/etc/init.d
-@dirrm ${EXAMPLESDIR}/root/etc/puppet
-@dirrm ${EXAMPLESDIR}/root/etc
-@dirrm ${EXAMPLESDIR}/root
-@dirrm ${EXAMPLESDIR}/code
-@dirrm ${EXAMPLESDIR}
+share/doc/puppet/CHANGELOG
+share/doc/puppet/TODO
+share/doc/puppet/README
+share/doc/puppet/LICENSE
+share/doc/puppet/COPYING
+@dirrm share/doc/puppet
+share/examples/puppet/root/bin/sleeper
+share/examples/puppet/root/etc/init.d/sleeper
+share/examples/puppet/root/etc/puppet/puppetd.conf
+share/examples/puppet/root/etc/puppet/fileserver.conf
+share/examples/puppet/root/etc/puppet/puppetmasterd.conf
+share/examples/puppet/root/etc/puppet/namespaceauth.conf
+share/examples/puppet/root/etc/puppet/tagmail.conf
+share/examples/puppet/root/etc/otherfile
+share/examples/puppet/root/etc/configfile
+share/examples/puppet/root/etc/debian-passwd
+share/examples/puppet/root/etc/debian-syslog.conf
+share/examples/puppet/code/allatonce
+share/examples/puppet/code/head
+share/examples/puppet/code/selectors
+share/examples/puppet/code/execs
+share/examples/puppet/code/nodes
+share/examples/puppet/code/mac_automount.pp
+share/examples/puppet/code/filerecursion
+share/examples/puppet/code/components
+share/examples/puppet/code/file.bl
+share/examples/puppet/code/groups
+share/examples/puppet/code/functions
+share/examples/puppet/code/fileparsing
+share/examples/puppet/code/svncommit
+share/examples/puppet/code/filedefaults
+share/examples/puppet/code/simpletests
+share/examples/puppet/code/assignments
+share/examples/puppet/code/relationships
+share/examples/puppet/code/importing
+share/examples/puppet/code/one
+share/examples/puppet/puppetmasterd.conf.sample
+@dirrm share/examples/puppet/root/bin
+@dirrm share/examples/puppet/root/etc/init.d
+@dirrm share/examples/puppet/root/etc/puppet
+@dirrm share/examples/puppet/root/etc
+@dirrm share/examples/puppet/root
+@dirrm share/examples/puppet/code
+@dirrm share/examples/puppet
diff --git a/sysutils/puppet/distinfo b/sysutils/puppet/distinfo
index 19406dbfe8e..fa454a2b6b7 100644
--- a/sysutils/puppet/distinfo
+++ b/sysutils/puppet/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/03/13 14:17:05 tonnerre Exp $
+$NetBSD: distinfo,v 1.2 2008/03/13 20:05:09 tonnerre Exp $
SHA1 (puppet-0.22.4.tgz) = afc6e64dcbfab251dd433c6e0de5015cbe0a37ec
RMD160 (puppet-0.22.4.tgz) = c836292dc112e52d32bfdcd68d74799135e9c2e9
Size (puppet-0.22.4.tgz) = 642077 bytes
-SHA1 (patch-aa) = 73c2ffa5890f6d0d473ec0585b34d42965361b39
+SHA1 (patch-aa) = 3573c5ad7852c3e03aab76a40188203069b58dbf
SHA1 (patch-ab) = f14b5f3d595fa5f9d1e115f85d9dd030a711d7bc
-SHA1 (patch-ac) = 1b36104cf7cf92c3b44be49d76de8ebb83b6ee17
+SHA1 (patch-ac) = 60ca77dd0dffcab2eba9c9a99c4094dca22c0fd1
diff --git a/sysutils/puppet/patches/patch-aa b/sysutils/puppet/patches/patch-aa
index 70916a2051c..0d259820bcc 100644
--- a/sysutils/puppet/patches/patch-aa
+++ b/sysutils/puppet/patches/patch-aa
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.1.1.1 2008/03/13 14:17:05 tonnerre Exp $
+$NetBSD: patch-aa,v 1.2 2008/03/13 20:05:09 tonnerre Exp $
-always define PATCH. without it, puppetd hangs when upgrading INTERACTIVE port.
+Always define PATCH. Without it, puppetd hangs when upgrading INTERACTIVE port.
http://reductivelabs.com/trac/puppet/ticket/624
--- lib/puppet/provider/package/ports.rb.orig Tue May 8 14:55:34 2007
diff --git a/sysutils/puppet/patches/patch-ac b/sysutils/puppet/patches/patch-ac
index 352b36cdf6d..5e6c251a516 100644
--- a/sysutils/puppet/patches/patch-ac
+++ b/sysutils/puppet/patches/patch-ac
@@ -1,6 +1,6 @@
-$NetBSD: patch-ac,v 1.1.1.1 2008/03/13 14:17:05 tonnerre Exp $
+$NetBSD: patch-ac,v 1.2 2008/03/13 20:05:09 tonnerre Exp $
-support package that contains '-' in its name, like syslog-ng
+Support package that contains '-' in its name, like syslog-ng
http://reductivelabs.com/trac/puppet/ticket/628
--- lib/puppet/provider/package/ports.rb.orig Wed May 9 17:12:39 2007