source: trunk/Makefile@ 477

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

/trunk

Add location delete template, tweak link for location delete in
location list. See #10.
Normalize delete templates to be closer to identical.
Add revzone delete template to Makefile file list.

  • Property svn:keywords set to Id
File size: 5.8 KB
RevLine 
[210]1# $Id: Makefile 427 2012-10-11 20:58:14Z kdeugau $
[114]2# DNS Admin makefile
3
4PKGNAME=dnsadmin
[166]5VERSION=1.0
[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 \
[424]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 \
[427]57 templates/deldom.tmpl templates/delgrp.tmpl templates/delloc.tmpl templates/delrec.tmpl \
58 templates/delrevzone.tmpl templates/deluser.tmpl \
[166]59 templates/dns.css templates/dnsq.tmpl templates/domlist.tmpl templates/edgroup.tmpl \
60 templates/editsoa.tmpl templates/footer.tmpl templates/fpnla.tmpl templates/grouptree.css \
61 templates/grouptree-ie.css templates/grpman.tmpl templates/grptree.tmpl templates/header.tmpl \
62 templates/lettsearch.tmpl templates/login.tmpl templates/log.tmpl templates/menu.tmpl \
63 templates/newdomain.tmpl templates/newgrp.tmpl templates/permlist_enabled.tmpl templates/permlist.tmpl \
64 templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \
[424]65 templates/soadata.tmpl templates/template.tmpl templates/textrecs.tmpl templates/updatesoa.tmpl \
66 templates/useradmin.tmpl templates/user.tmpl templates/whoisq.tmpl \
[216]67 \
68 dnsdb.conf
[114]69
70DIRS = \
71 images templates
72
[199]73IMAGES = \
74 images/trash2.png images/fwd.png images/ffwd.png images/frev.png \
75 images/rev.png images/DESC.png images/ASC.png
[114]76
77SCRIPTS = \
[424]78 dns.cgi dns-rpc.cgi textrecs.cgi vega-import.pl export.pl
[114]79
[166]80MODULES = DNSDB.pm
[114]81
[216]82TEMPLATES = \
83 templates/adddomain.tmpl templates/addgroup.tmpl templates/addrec.tmpl templates/adduser.tmpl \
84 templates/axfr.tmpl templates/bulkchange.tmpl templates/bulkdomain.tmpl templates/dberr.tmpl \
[427]85 templates/deldom.tmpl templates/delgrp.tmpl templates/delloc.tmpl templates/delrec.tmpl \
86 templates/delrevzone.tmpl templates/deluser.tmpl \
[216]87 templates/dns.css templates/dnsq.tmpl templates/domlist.tmpl templates/edgroup.tmpl \
88 templates/editsoa.tmpl templates/footer.tmpl templates/fpnla.tmpl templates/grouptree.css \
89 templates/grouptree-ie.css templates/grpman.tmpl templates/grptree.tmpl templates/header.tmpl \
90 templates/lettsearch.tmpl templates/login.tmpl templates/log.tmpl templates/menu.tmpl \
91 templates/newdomain.tmpl templates/newgrp.tmpl templates/permlist_enabled.tmpl templates/permlist.tmpl \
92 templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \
[424]93 templates/soadata.tmpl templates/template.tmpl templates/textrecs.tmpl templates/updatesoa.tmpl \
94 templates/useradmin.tmpl templates/user.tmpl templates/whoisq.tmpl
[114]95
[216]96CONFIGFILES = dnsdb.conf
97
[114]98all:
99 # nullop
100
101install:
[220]102 @mkdir -p $(DESTDIR)${datadir}/$(PKG_LEAF)/images
103 @$(INSTALL_DATA) $(IMAGES) $(DESTDIR)${datadir}/$(PKG_LEAF)/images
104 @mkdir -p $(DESTDIR)${datadir}/$(PKG_LEAF)/templates
105 @$(INSTALL_DATA) $(TEMPLATES) $(DESTDIR)${datadir}/$(PKG_LEAF)/templates
[216]106 @# munge in necessary 'use lib ...' bits so scripts can find libs and config...
107 @# datadir is correct; no arch-specific files
[114]108 @for i in $(SCRIPTS) $(MODULES); do \
[219]109 $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${datadir}/$(PKG_LEAF)/$$i ; \
110 perl -pi -e 's|use lib '.'; ##uselib##|use lib "${datadir}/$(PKG_LEAF)/";|;' $(DESTDIR)${datadir}/$(PKG_LEAF)/$$i ; \
111 perl -pi -e 's|use lib '.'; ##uselib##|use lib "${datadir}/$(PKG_LEAF)/";|;' $(DESTDIR)${datadir}/$(PKG_LEAF)/$$i ; \
[114]112 done
[219]113 @$(INSTALL) -d $(DESTDIR)${sysconfdir}/$(CFG_LEAF)/
[216]114 @# install an example config file with all known settings
115 @for i in $(CONFIGFILES) ; do \
[219]116 if [ -e $(DESTDIR)${sysconfdir}/$(CFG_LEAF)/$$i ]; then \
[216]117 echo "refusing to overwrite existing config file, created as $$i.new" ; \
[219]118 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/$(CFG_LEAF)/$$i.new ; \
[216]119 else \
[219]120 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/$(CFG_LEAF)/ ; \
121 fi ; \
122 perl -pi -e 's|"/etc/dnsdb"; ##CFG_LEAF##|"${sysconfdir}/$(CFG_LEAF)";|;' $(DESTDIR)${datadir}/$(PKG_LEAF)/DNSDB.pm ; \
[114]123 done
[199]124# # and now munge MyDNSDB.pm so it can find the core library
125# perl -pi -e 's|##uselib##|use lib "${libdir}/dnsdb";|;' $(DESTDIR)${sysconfdir}/dnsdb/MyDNSDB.pm
[114]126
127#clean:
128# @for i in $(DIRS) ; do \
129# $(MAKE) -C $$i clean ; \
130# done
131
132dist:
133 mkdir $(PKGNAME)-$(VERSION)
134 tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -)
[219]135 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec
[114]136 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < INSTALL > $(PKGNAME)-$(VERSION)/INSTALL
[424]137 perl -pi -e 's/[\d.]+;\s*##VERSION##/"$(VERSION)";/;' $(PKGNAME)-$(VERSION)/DNSDB.pm
[114]138 tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
139 gzip -v -f -9 $(PKGNAME)-$(VERSION).tar
140 rm -rf $(PKGNAME)-$(VERSION)
[262]141 gpg -a --detach-sign $(PKGNAME)-$(VERSION).tar.gz
Note: See TracBrowser for help on using the repository browser.