| [114] | 1 | # $Id: Makefile 417 2010-06-30 21:48:03Z kdeugau $ | 
|---|
|  | 2 | # DNS Admin makefile | 
|---|
|  | 3 |  | 
|---|
|  | 4 | PKGNAME=dnsadmin | 
|---|
| [166] | 5 | VERSION=1.0 | 
|---|
| [114] | 6 | RELEASE=1 | 
|---|
|  | 7 |  | 
|---|
|  | 8 | # Include some boilerplate Gnu makefile definitions. | 
|---|
|  | 9 | prefix = /usr/local | 
|---|
|  | 10 |  | 
|---|
|  | 11 | exec_prefix = ${prefix} | 
|---|
|  | 12 | bindir = ${exec_prefix}/bin | 
|---|
|  | 13 | libdir = ${exec_prefix}/lib | 
|---|
|  | 14 | infodir = ${prefix}/info | 
|---|
|  | 15 | includedir = ${prefix}/include | 
|---|
|  | 16 | datadir = ${prefix}/share | 
|---|
|  | 17 | localedir = $(datadir)/locale | 
|---|
|  | 18 | sysconfdir = ${prefix}/etc | 
|---|
|  | 19 | mandir = ${prefix}/man | 
|---|
|  | 20 |  | 
|---|
|  | 21 | INSTALL = /usr/bin/install -c | 
|---|
|  | 22 | INSTALL_PROGRAM = ${INSTALL} | 
|---|
|  | 23 | INSTALL_SCRIPT = ${INSTALL} | 
|---|
|  | 24 | INSTALL_DATA = ${INSTALL} -m 644 | 
|---|
|  | 25 | INSTALLMODE= -m 0755 | 
|---|
|  | 26 | INSTALLMODE2 = -m 0555 | 
|---|
|  | 27 |  | 
|---|
|  | 28 | DESTDIR = | 
|---|
|  | 29 |  | 
|---|
|  | 30 | MANIFEST = \ | 
|---|
|  | 31 | INSTALL COPYING TODO Makefile dnsadmin.spec new-dns.sql dns.sql dns.cgi DNSDB.pm \ | 
|---|
|  | 32 | \ | 
|---|
| [166] | 33 | index.shtml \ | 
|---|
| [114] | 34 | \ | 
|---|
|  | 35 | images/trash2.png images/fwd.png images/ffwd.png images/frev.png \ | 
|---|
|  | 36 | images/rev.png images/DESC.png images/ASC.png \ | 
|---|
|  | 37 | \ | 
|---|
| [166] | 38 | templates/adddomain.tmpl templates/addgroup.tmpl templates/addrec.tmpl templates/adduser.tmpl \ | 
|---|
|  | 39 | templates/axfr.tmpl templates/bulkchange.tmpl templates/bulkdomain.tmpl templates/dberr.tmpl \ | 
|---|
|  | 40 | templates/deldom.tmpl templates/delgrp.tmpl templates/delrec.tmpl templates/deluser.tmpl \ | 
|---|
|  | 41 | templates/dns.css templates/dnsq.tmpl templates/domlist.tmpl templates/edgroup.tmpl \ | 
|---|
|  | 42 | templates/editsoa.tmpl templates/footer.tmpl templates/fpnla.tmpl templates/grouptree.css \ | 
|---|
|  | 43 | templates/grouptree-ie.css templates/grpman.tmpl templates/grptree.tmpl templates/header.tmpl \ | 
|---|
|  | 44 | templates/lettsearch.tmpl templates/login.tmpl templates/log.tmpl templates/menu.tmpl \ | 
|---|
|  | 45 | templates/newdomain.tmpl templates/newgrp.tmpl templates/permlist_enabled.tmpl templates/permlist.tmpl \ | 
|---|
|  | 46 | templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \ | 
|---|
|  | 47 | templates/soadata.tmpl templates/template.tmpl templates/updatesoa.tmpl templates/useradmin.tmpl \ | 
|---|
|  | 48 | templates/user.tmpl templates/viadns.css templates/whoisq.tmpl \ | 
|---|
| [114] | 49 |  | 
|---|
|  | 50 | DIRS = \ | 
|---|
|  | 51 | images templates | 
|---|
|  | 52 |  | 
|---|
|  | 53 | IMAGES = images/logo.png | 
|---|
|  | 54 |  | 
|---|
|  | 55 | SCRIPTS = \ | 
|---|
|  | 56 | cgi-bin/extras/db2rwhois.pl cgi-bin/combineblocks.pl cgi-bin/access-pwd-update.pl \ | 
|---|
|  | 57 | cgi-bin/newnode.cgi cgi-bin/freespace.pl cgi-bin/admin.cgi \ | 
|---|
|  | 58 | cgi-bin/main.cgi cgi-bin/newcity.cgi cgi-bin/allocate.pl \ | 
|---|
|  | 59 | cgi-bin/search.cgi cgi-bin/consistency-check.pl | 
|---|
|  | 60 |  | 
|---|
| [166] | 61 | MODULES = DNSDB.pm | 
|---|
| [114] | 62 |  | 
|---|
|  | 63 | CONFIGMODULES = cgi-bin/MyIPDB.pm cgi-bin/CustIDCK.pm | 
|---|
|  | 64 |  | 
|---|
|  | 65 | all: | 
|---|
|  | 66 | # nullop | 
|---|
|  | 67 |  | 
|---|
|  | 68 | install: | 
|---|
|  | 69 | @for i in $(HTML) $(IMAGES); do \ | 
|---|
| [166] | 70 | $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/dnsdb/$$i ; \ | 
|---|
| [114] | 71 | done | 
|---|
|  | 72 | # munge in necessary 'use lib ...' bits so scripts can find MyIPDB.pm... | 
|---|
|  | 73 | @for i in $(SCRIPTS) $(MODULES); do \ | 
|---|
| [166] | 74 | $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/dnsdb/$$i ; \ | 
|---|
|  | 75 | perl -pi -e 's|##uselib##|use lib "${sysconfdir}/dnsdb/";|;' $(DESTDIR)${libdir}/dnsdb/$$i ; \ | 
|---|
| [114] | 76 | done | 
|---|
| [166] | 77 | $(INSTALL) -d $(DESTDIR)${sysconfdir}/dnsdb/ | 
|---|
| [114] | 78 | @for i in $(CONFIGMODULES) ; do \ | 
|---|
| [166] | 79 | $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/dnsdb/ ; \ | 
|---|
| [114] | 80 | done | 
|---|
|  | 81 | #       # and now munge MyIPDB.pm so it can find the core library | 
|---|
| [166] | 82 | #       perl -pi -e 's|##uselib##|use lib "${libdir}/dnsdb";|;' $(DESTDIR)${sysconfdir}/ipdb/MyIPDB.pm | 
|---|
| [114] | 83 |  | 
|---|
|  | 84 | #clean: | 
|---|
|  | 85 | #       @for i in $(DIRS) ; do \ | 
|---|
|  | 86 | #               $(MAKE) -C $$i clean ; \ | 
|---|
|  | 87 | #       done | 
|---|
|  | 88 |  | 
|---|
|  | 89 | dist: | 
|---|
|  | 90 | mkdir $(PKGNAME)-$(VERSION) | 
|---|
|  | 91 | tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -) | 
|---|
| [170] | 92 | #/usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec | 
|---|
| [114] | 93 | /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < INSTALL > $(PKGNAME)-$(VERSION)/INSTALL | 
|---|
|  | 94 | perl -pi -e 's/[\d.]+;\s*##VERSION##/$(VERSION);/;' $(PKGNAME)-$(VERSION)/cgi-bin/IPDB.pm | 
|---|
|  | 95 | tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION) | 
|---|
|  | 96 | gzip -v -f -9 $(PKGNAME)-$(VERSION).tar | 
|---|
|  | 97 | rm -rf $(PKGNAME)-$(VERSION) | 
|---|
|  | 98 | # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz | 
|---|