source: branches/stable/Makefile@ 774

Last change on this file since 774 was 756, checked in by Kris Deugau, 7 years ago

/branches/stable

Merge /trunk through r749 for 1.4.0

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