source: branches/stable/Makefile@ 452

Last change on this file since 452 was 438, checked in by Kris Deugau, 12 years ago

/branches/stable

*sigh* Another fine brown-paper-bag commit.

  • $webvar{forcettl}/{newttl} passing truncated due to not watching what needed to be trimmed from the merge
  • TTL override needed to reach the actual insert processing; this was already reworked on /trunk due to other changes

And just for good measure, bump the patch version for release.

  • Property svn:keywords set to Id
File size: 5.7 KB
RevLine 
[210]1# $Id: Makefile 438 2012-10-30 16:34:14Z kdeugau $
[114]2# DNS Admin makefile
3
4PKGNAME=dnsadmin
[438]5VERSION=1.0.5
[114]6RELEASE=1
7
8# Include some boilerplate Gnu makefile definitions.
9prefix = /usr/local
10
11exec_prefix = ${prefix}
12bindir = ${exec_prefix}/bin
13libdir = ${exec_prefix}/lib
14infodir = ${prefix}/info
15includedir = ${prefix}/include
16datadir = ${prefix}/share
17localedir = $(datadir)/locale
18sysconfdir = ${prefix}/etc
19mandir = ${prefix}/man
20
[220]21INSTALL = /usr/bin/install
[114]22INSTALL_PROGRAM = ${INSTALL}
23INSTALL_SCRIPT = ${INSTALL}
24INSTALL_DATA = ${INSTALL} -m 644
25INSTALLMODE= -m 0755
26INSTALLMODE2 = -m 0555
27
28DESTDIR =
29
[219]30# flag to indicate if we install in a version-numbered location to
31# support parallel installs (packaged or otherwise) or if we're
32# installing to .../dnsdb/ (overwrite whatever was there last)
33PARA_VERSIONS = 0
34
35# also set the leaf directories we'll be putting things in
[220]36PKG_LEAF = dnsdb
37CFG_LEAF = dnsdb
[219]38
39# tweak the final leaf directories we install to if PARA_VERSIONS is set
40ifeq "$(PARA_VERSIONS)" "1"
[220]41PKG_LEAF = dnsdb-$(VERSION)
42CFG_LEAF = dnsdb/$(VERSION)
[219]43endif
44
[114]45MANIFEST = \
[219]46 INSTALL COPYING TODO Makefile dnsadmin.spec \
[114]47 \
[423]48 new-dns.sql dns.sql dns.cgi dns-rpc.cgi textrecs.cgi DNSDB.pm vega-import.pl export.pl \
[219]49 \
[166]50 index.shtml \
[114]51 \
52 images/trash2.png images/fwd.png images/ffwd.png images/frev.png \
[201]53 images/rev.png images/DESC.png images/ASC.png images/tree_open.png images/tree_closed.png \
[114]54 \
[166]55 templates/adddomain.tmpl templates/addgroup.tmpl templates/addrec.tmpl templates/adduser.tmpl \
56 templates/axfr.tmpl templates/bulkchange.tmpl templates/bulkdomain.tmpl templates/dberr.tmpl \
57 templates/deldom.tmpl templates/delgrp.tmpl templates/delrec.tmpl templates/deluser.tmpl \
58 templates/dns.css templates/dnsq.tmpl templates/domlist.tmpl templates/edgroup.tmpl \
59 templates/editsoa.tmpl templates/footer.tmpl templates/fpnla.tmpl templates/grouptree.css \
60 templates/grouptree-ie.css templates/grpman.tmpl templates/grptree.tmpl templates/header.tmpl \
61 templates/lettsearch.tmpl templates/login.tmpl templates/log.tmpl templates/menu.tmpl \
62 templates/newdomain.tmpl templates/newgrp.tmpl templates/permlist_enabled.tmpl templates/permlist.tmpl \
63 templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \
[423]64 templates/soadata.tmpl templates/template.tmpl templates/textrecs.tmpl templates/updatesoa.tmpl \
65 templates/useradmin.tmpl templates/user.tmpl templates/whoisq.tmpl \
[216]66 \
67 dnsdb.conf
[114]68
69DIRS = \
70 images templates
71
[199]72IMAGES = \
73 images/trash2.png images/fwd.png images/ffwd.png images/frev.png \
74 images/rev.png images/DESC.png images/ASC.png
[114]75
76SCRIPTS = \
[423]77 dns.cgi dns-rpc.cgi textrecs.cgi vega-import.pl export.pl
[114]78
[166]79MODULES = DNSDB.pm
[114]80
[216]81TEMPLATES = \
82 templates/adddomain.tmpl templates/addgroup.tmpl templates/addrec.tmpl templates/adduser.tmpl \
83 templates/axfr.tmpl templates/bulkchange.tmpl templates/bulkdomain.tmpl templates/dberr.tmpl \
84 templates/deldom.tmpl templates/delgrp.tmpl templates/delrec.tmpl templates/deluser.tmpl \
85 templates/dns.css templates/dnsq.tmpl templates/domlist.tmpl templates/edgroup.tmpl \
86 templates/editsoa.tmpl templates/footer.tmpl templates/fpnla.tmpl templates/grouptree.css \
87 templates/grouptree-ie.css templates/grpman.tmpl templates/grptree.tmpl templates/header.tmpl \
88 templates/lettsearch.tmpl templates/login.tmpl templates/log.tmpl templates/menu.tmpl \
89 templates/newdomain.tmpl templates/newgrp.tmpl templates/permlist_enabled.tmpl templates/permlist.tmpl \
90 templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \
[423]91 templates/soadata.tmpl templates/template.tmpl templates/textrecs.tmpl templates/updatesoa.tmpl \
92 templates/useradmin.tmpl templates/user.tmpl templates/whoisq.tmpl
[114]93
[216]94CONFIGFILES = dnsdb.conf
95
[114]96all:
97 # nullop
98
99install:
[220]100 @mkdir -p $(DESTDIR)${datadir}/$(PKG_LEAF)/images
101 @$(INSTALL_DATA) $(IMAGES) $(DESTDIR)${datadir}/$(PKG_LEAF)/images
102 @mkdir -p $(DESTDIR)${datadir}/$(PKG_LEAF)/templates
103 @$(INSTALL_DATA) $(TEMPLATES) $(DESTDIR)${datadir}/$(PKG_LEAF)/templates
[216]104 @# munge in necessary 'use lib ...' bits so scripts can find libs and config...
105 @# datadir is correct; no arch-specific files
[114]106 @for i in $(SCRIPTS) $(MODULES); do \
[219]107 $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${datadir}/$(PKG_LEAF)/$$i ; \
108 perl -pi -e 's|use lib '.'; ##uselib##|use lib "${datadir}/$(PKG_LEAF)/";|;' $(DESTDIR)${datadir}/$(PKG_LEAF)/$$i ; \
109 perl -pi -e 's|use lib '.'; ##uselib##|use lib "${datadir}/$(PKG_LEAF)/";|;' $(DESTDIR)${datadir}/$(PKG_LEAF)/$$i ; \
[114]110 done
[219]111 @$(INSTALL) -d $(DESTDIR)${sysconfdir}/$(CFG_LEAF)/
[216]112 @# install an example config file with all known settings
113 @for i in $(CONFIGFILES) ; do \
[219]114 if [ -e $(DESTDIR)${sysconfdir}/$(CFG_LEAF)/$$i ]; then \
[216]115 echo "refusing to overwrite existing config file, created as $$i.new" ; \
[219]116 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/$(CFG_LEAF)/$$i.new ; \
[216]117 else \
[219]118 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/$(CFG_LEAF)/ ; \
119 fi ; \
120 perl -pi -e 's|"/etc/dnsdb"; ##CFG_LEAF##|"${sysconfdir}/$(CFG_LEAF)";|;' $(DESTDIR)${datadir}/$(PKG_LEAF)/DNSDB.pm ; \
[114]121 done
[199]122# # and now munge MyDNSDB.pm so it can find the core library
123# perl -pi -e 's|##uselib##|use lib "${libdir}/dnsdb";|;' $(DESTDIR)${sysconfdir}/dnsdb/MyDNSDB.pm
[114]124
125#clean:
126# @for i in $(DIRS) ; do \
127# $(MAKE) -C $$i clean ; \
128# done
129
130dist:
131 mkdir $(PKGNAME)-$(VERSION)
132 tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -)
[219]133 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec
[114]134 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < INSTALL > $(PKGNAME)-$(VERSION)/INSTALL
[433]135 perl -pi -e 's/["\d.]+;\s*##VERSION##/"$(VERSION)";/;' $(PKGNAME)-$(VERSION)/DNSDB.pm
[114]136 tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
137 gzip -v -f -9 $(PKGNAME)-$(VERSION).tar
138 rm -rf $(PKGNAME)-$(VERSION)
[263]139 gpg -a --detach-sign $(PKGNAME)-$(VERSION).tar.gz
Note: See TracBrowser for help on using the repository browser.