summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-23 19:18:20 -0600
committerLuke Kanies <luke@madstop.com>2007-11-23 19:18:20 -0600
commit72c0e7bd73e9185a04f141a142dc79202f5ff441 (patch)
tree0bdc075021b9bcaea5dcd4afe48691ea6b1d7de6 /debian/rules
parent56aad69f8cdf8b0b08fdb7985014986223fa4455 (diff)
downloadpuppet-72c0e7bd73e9185a04f141a142dc79202f5ff441.tar.gz
puppet-72c0e7bd73e9185a04f141a142dc79202f5ff441.tar.xz
puppet-72c0e7bd73e9185a04f141a142dc79202f5ff441.zip
Adding the debian directory via patch 20070831052721-6856b-b90bb56a4ed37ea420f10352a0a366068cddc7e4.patch from womble
Diffstat (limited to 'debian/rules')
-rw-r--r--debian/rules114
1 files changed, 114 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100644
index 000000000..69bf3a4af
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,114 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+INSTALL=install -Dp
+
+prefix := $(CURDIR)/debian/tmp
+bindir := $(prefix)/usr/bin
+sbindir := $(prefix)/usr/sbin
+libdir := $(prefix)/usr/lib
+localstatedir := $(prefix)/var
+rubylibdir := $(libdir)/ruby/1.8
+sysconfdir := $(prefix)/etc
+pkgconfdir := $(sysconfdir)/puppet
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+build-stamp: configure-stamp
+ dh_testdir
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # ripped from the redhat spec
+ # this sucks, who wants to maintain this?
+ # note to self, fix the install.rb to handle DESTDIR and change
+ # library path
+ install -d -m0755 $(sbindir)
+ install -d -m0755 $(bindir)
+ install -d -m0755 $(rubylibdir)
+ install -d -m0755 $(pkgconfdir)/manifests
+ install -d -m0755 $(localstatedir)/lib/puppet
+ install -d -m0755 $(localstatedir)/run
+ install -d -m0755 $(localstatedir)/log/puppet
+
+ $(INSTALL) -m0755 bin/puppet bin/puppetdoc $(bindir)
+ $(INSTALL) -m0755 bin/puppetd bin/puppetmasterd bin/puppetca bin/puppetrun $(sbindir)
+ $(INSTALL) -m0644 lib/puppet.rb $(rubylibdir)/puppet.rb
+ cp -a lib/puppet $(rubylibdir)
+ find $(rubylibdir) -type f -perm +ugo+x -exec chmod a-x {} \;
+
+ $(INSTALL) -m0644 debian/fileserver.conf $(pkgconfdir)/fileserver.conf
+ $(INSTALL) -m0644 debian/puppet.conf $(pkgconfdir)/puppet.conf
+
+ # Vim auto-syntax-highlighting stuff
+ $(INSTALL) -m0644 ext/vim/puppet.vim \
+ $(CURDIR)/debian/puppet/usr/share/vim/vim70/syntax/puppet.vim
+ $(INSTALL) -m0644 ext/vim/filetype.vim \
+ $(CURDIR)/debian/puppet/usr/share/vim/addons/ftdetect/puppet.vim
+
+ # Emacs keeping up with the Joneses
+ $(INSTALL) -m0644 ext/emacs/puppet-mode-init.el \
+ $(CURDIR)/debian/puppet/etc/emacs/site-start.d/50puppet-mode-init.el
+ $(INSTALL) -m0644 ext/emacs/puppet-mode.el \
+ $(CURDIR)/debian/puppet/usr/share/emacs/site-lisp/puppet-mode.el
+
+ dh_installexamples examples/*
+
+ # Logcheck rules. Gee I wish you could specify a file to source
+ # in dh_installlogcheck.
+ cp ext/logcheck/puppet debian/puppet.logcheck.ignore.server
+ cp ext/logcheck/puppet debian/puppet.logcheck.ignore.workstation
+ dh_installlogcheck
+ rm debian/puppet.logcheck.*
+
+ # Clean out any SVN cruft that may still be lingering in our
+ # packages
+ find debian/tmp debian/puppet debian/puppetmaster -name .svn |xargs rm -rf
+
+# Build architecture-dependent files here.
+binary-arch: build install
+
+# Build architecture-independent files here.
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_movefiles -i
+ dh_installchangelogs -i CHANGELOG
+ dh_installdocs -i
+ dh_installinit -i
+ dh_installlogrotate -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+ dh_shlibdeps -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure