4
# Uncomment this to turn on verbose mode.
9
prefix := $(CURDIR)/debian/tmp
10
bindir := $(prefix)/usr/bin
11
sbindir := $(prefix)/usr/sbin
12
libdir := $(prefix)/usr/lib
13
localstatedir := $(prefix)/var
14
rubylibdir := $(libdir)/ruby/1.8
15
sysconfdir := $(prefix)/etc
16
pkgconfdir := $(sysconfdir)/puppet
18
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
24
configure: configure-stamp
31
build-stamp: configure-stamp
38
rm -f build-stamp configure-stamp
47
# ripped from the redhat spec
48
# this sucks, who wants to maintain this?
49
# note to self, fix the install.rb to handle DESTDIR and change
51
install -d -m0755 $(sbindir)
52
install -d -m0755 $(bindir)
53
install -d -m0755 $(rubylibdir)
54
install -d -m0755 $(pkgconfdir)/manifests
55
install -d -m0755 $(localstatedir)/lib/puppet
56
install -d -m0755 $(localstatedir)/run
57
install -d -m0755 $(localstatedir)/log/puppet
59
$(INSTALL) -m0755 bin/puppet bin/puppetdoc $(bindir)
60
$(INSTALL) -m0755 bin/puppetd bin/puppetmasterd bin/puppetca bin/puppetrun $(sbindir)
61
$(INSTALL) -m0644 lib/puppet.rb $(rubylibdir)/puppet.rb
62
cp -a lib/puppet $(rubylibdir)
63
find $(rubylibdir) -type f -perm +ugo+x -exec chmod a-x {} \;
65
$(INSTALL) -m0644 debian/fileserver.conf $(pkgconfdir)/fileserver.conf
66
$(INSTALL) -m0644 debian/puppet.conf $(pkgconfdir)/puppet.conf
68
# Vim auto-syntax-highlighting stuff
69
$(INSTALL) -m0644 ext/vim/syntax/puppet.vim \
70
$(CURDIR)/debian/puppet/usr/share/vim/vim71/syntax/
71
$(INSTALL) -m0644 ext/vim/ftdetect/puppet.vim \
72
$(CURDIR)/debian/puppet/usr/share/vim/addons/ftdetect/
74
# Emacs keeping up with the Joneses
75
$(INSTALL) -m0644 ext/emacs/puppet-mode-init.el \
76
$(CURDIR)/debian/puppet/etc/emacs/site-start.d/50puppet-mode-init.el
77
$(INSTALL) -m0644 ext/emacs/puppet-mode.el \
78
$(CURDIR)/debian/puppet/usr/share/emacs/site-lisp/puppet-mode.el
80
dh_installexamples examples/*
82
# Logcheck rules. Gee I wish you could specify a file to source
83
# in dh_installlogcheck.
84
cp ext/logcheck/puppet debian/puppet.logcheck.ignore.server
85
cp ext/logcheck/puppet debian/puppet.logcheck.ignore.workstation
87
rm debian/puppet.logcheck.*
89
# Clean out any SVN cruft that may still be lingering in our
91
find debian/tmp debian/puppet debian/puppetmaster -name .svn |xargs rm -rf
93
# Build architecture-dependent files here.
94
binary-arch: build install
96
# Build architecture-independent files here.
97
binary-indep: build install
101
dh_installchangelogs -i CHANGELOG
103
dh_installinit -ppuppetmaster
104
dh_installinit -ppuppet -- defaults 21
105
dh_installlogrotate -i
114
binary: binary-indep binary-arch
115
.PHONY: build clean binary-indep binary-arch binary install configure