1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

root/csw/mgar/pkg/puppet/trunk/Makefile

Revision 17933, 5.0 KB (checked in by phipsy, 3 weeks ago)

puppet: 2.7.14

  • Property svn:keywords set to Id
Line 
1# Copyright 2009 OpenCSW
2# Distributed under the terms of the GNU General Public License v2
3# $Id$
4#
5# Based on a build script[1] written by Gary Law.
6#
7# [1] http://garylaw.net/packages/puppet-build.sh
8
9NAME = puppet
10VERSION = 2.7.14
11CATEGORIES = apps
12GARTYPE = v2
13
14define BLURB
15  Puppet helps accomplish the goal of a hands-off, automated infrastructure.
16  The benefits of automated infrastructure go beyond policy-enforced
17  consistency and auditing.  The impact of hardware failure and other disaster
18  scenarios can be mitigated, as services can be quickly restored by Puppet. In
19  conjunction with virtualizaton, the ability to reliably create new systems
20  running consistent services can be leveraged to create autoscaling
21  applications as well as test systems identical to production environments.
22endef
23
24MASTER_SITES = http://puppetlabs.com/downloads/puppet/
25DISTFILES  = $(NAME)-$(VERSION).tar.gz
26DISTFILES += cswpuppetd
27DISTFILES += cswpuppetmasterd
28DISTFILES += cswusergroup
29DISTFILES += CSWpuppet.postinstall
30# pkgutil.rb https://raw.github.com/domcleal/puppet/tickets/master/8011c/lib/puppet/provider/package/pkgutil.rb
31# Should be headed into 2.7 code - supports -t REPO
32# Still not in 2.7.14 as of 03-May-12(FFS!)
33DISTFILES += pkgutil.rb
34DISTFILES += README.CSW
35DISTFILES += puppet.conf.example-CSW
36SPKG_SOURCEURL = http://puppetlabs.com/
37LICENSE_CSWpuppet = LICENSE
38LICENSE_CSWpuppetmaster = LICENSE
39
40INITSMF += $(sysconfdir)/init\.d/cswpuppetd
41INITSMF += $(sysconfdir)/init\.d/cswpuppetmasterd
42USERGROUP = $(sysconfdir)/pkg/puppet/cswusergroup
43
44# Creating a separate package CSWpuppetmaster so that the cswpuppetmaster
45# service isn't started upon the installation of CSWpuppet.
46PACKAGES += CSWpuppetmaster
47PACKAGES += CSWpuppet
48
49SPKG_DESC_CSWpuppet       = System configuration management tool, client daemon
50SPKG_DESC_CSWpuppetmaster = System configuration management tool, server
51
52RUNTIME_DEP_PKGS                  = CSWfacter
53RUNTIME_DEP_PKGS                 += CSWruby18
54RUNTIME_DEP_PKGS                                 += CSWrubyaugeas
55RUNTIME_DEP_PKGS_CSWpuppetmaster += CSWpuppet
56RUNTIME_DEP_PKGS_CSWpuppetmaster += CSWruby18
57
58PKGFILES_CSWpuppetmaster  = $(sysconfdir)/init\.d/cswpuppetmasterd
59PKGFILES_CSWpuppetmaster += $(sbindir)/puppetmasterd
60PKGFILES_CSWpuppetmaster += $(mandir)/man8/puppetmasterd.8
61PKGFILES_CSWpuppetmaster += $(libdir)/.*/puppet/application/puppetmasterd.rb
62PKGFILES_CSWpuppetmaster += $(sysconfdir)/puppet/auth.conf
63
64ARCHALL = 1
65
66sysconfdir     = /etc$(prefix)
67localstatedir  = /var$(prefix)
68rubysitelibdir = $(shell ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
69
70CONFIGURE_SCRIPTS =
71BUILD_SCRIPTS     =
72TEST_SCRIPTS      =
73INSTALL_SCRIPTS   = puppet
74
75CHECKPKG_OVERRIDES_CSWpuppetmaster  = surplus-dependency|CSWruby18
76CHECKPKG_OVERRIDES_CSWpuppet        = surplus-dependency|CSWfacter
77CHECKPKG_OVERRIDES_CSWpuppet       += surplus-dependency|CSWrubyaugeas
78CHECKPKG_OVERRIDES_CSWpuppet       += missing-dependency|CSWpython
79# Puppet has hardcoded paths to look at for many OSes, many of which involve
80# /usr/share and /usr/local.
81CHECKPKG_OVERRIDES_CSWpuppet       += file-with-bad-content
82# These files are quite deliberate - without them users will not get CSW
83# behaviour. The README explains
84CHECKPKG_OVERRIDES_CSWpuppet       += bad-location-of-file|file=/etc/puppet
85CHECKPKG_OVERRIDES_CSWpuppet       += bad-location-of-file|file=/etc/puppet/README.CSW
86CHECKPKG_OVERRIDES_CSWpuppet       += bad-location-of-file|file=/etc/puppet/puppet.conf.example-CSW
87
88include gar/category.mk
89
90install-puppet:
91        ginstall -m 755 -d $(DESTDIR)
92        ginstall -m 755 -d $(DESTDIR)/etc/puppet
93        ginstall -m 644 $(FILEDIR)/README.CSW $(DESTDIR)/etc/puppet/README.CSW
94        ginstall -m 644 $(FILEDIR)/puppet.conf.example-CSW $(DESTDIR)/etc/puppet/puppet.conf.example-CSW
95        ginstall -m 755 -d $(DESTDIR)$(sysconfdir)/puppet
96        ginstall -m 755 -d $(DESTDIR)$(localstatedir)/puppet/run
97        ginstall -m 755 -d $(DESTDIR)$(sysconfdir)/init.d
98        ginstall -m 755 $(FILEDIR)/cswpuppetd $(DESTDIR)$(sysconfdir)/init.d
99        ginstall -m 755 $(FILEDIR)/cswpuppetmasterd $(DESTDIR)$(sysconfdir)/init.d
100        ginstall -m 755 $(FILEDIR)/cswpuppetmasterd $(DESTDIR)/etc$(prefix)/init.d
101        cd $(WORKSRC) && $(INSTALL_ENV) ruby install.rb \
102                --configdir=$(sysconfdir)/puppet \
103                --bindir=$(bindir) \
104                --sbindir=$(sbindir) \
105                --full
106        ginstall -m 755 $(FILEDIR)/pkgutil.rb $(DESTDIR)$(rubysitelibdir)/puppet/provider/package
107        cd $(DESTDIR)$(mandir)/man8 && gunzip *
108        (cd $(WORKSRC)/examples/etc/puppet && \
109        for f in *; do \
110            if [ -f $$f ] ; then \
111                cp $$f $(DESTDIR)$(sysconfdir)/puppet/$$f.example; \
112                chmod 644 $(DESTDIR)$(sysconfdir)/puppet/$$f.example; \
113            fi; \
114        done)
115        mv $(DESTDIR)$(sysconfdir)/puppet/auth.conf $(DESTDIR)$(sysconfdir)/puppet/auth.conf.example
116        ginstall -m 644 $(FILEDIR)/puppet.conf.example-CSW $(DESTDIR)$(sysconfdir)/puppet/puppet.conf.example
117        ginstall -d -m 755 $(DESTDIR)$(sysconfdir)/pkg/puppet
118        ginstall -m 644 $(FILEDIR)/cswusergroup \
119                $(DESTDIR)$(sysconfdir)/pkg/puppet/cswusergroup
120        mkdir -p $(DESTDIR)$(localstatedir)/lib
121        gunzip $(DESTDIR)$(mandir)/man5/puppet.conf.5.gz
122        @$(MAKECOOKIE)
Note: See TracBrowser for help on using the browser.