# $Id: Makefile 417 2010-06-30 21:48:03Z kdeugau $ # DNS Admin makefile PKGNAME=dnsadmin VERSION=1.0 RELEASE=1 # Include some boilerplate Gnu makefile definitions. prefix = /usr/local exec_prefix = ${prefix} bindir = ${exec_prefix}/bin libdir = ${exec_prefix}/lib infodir = ${prefix}/info includedir = ${prefix}/include datadir = ${prefix}/share localedir = $(datadir)/locale sysconfdir = ${prefix}/etc mandir = ${prefix}/man INSTALL = /usr/bin/install -c INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 INSTALLMODE= -m 0755 INSTALLMODE2 = -m 0555 DESTDIR = MANIFEST = \ INSTALL COPYING TODO Makefile new-dns.sql dns.sql dns.cgi dns-rpc.cgi DNSDB.pm \ vega-import.pl \ \ index.shtml \ \ images/trash2.png images/fwd.png images/ffwd.png images/frev.png \ images/rev.png images/DESC.png images/ASC.png images/tree_open.png images/tree_closed.png \ \ templates/adddomain.tmpl templates/addgroup.tmpl templates/addrec.tmpl templates/adduser.tmpl \ templates/axfr.tmpl templates/bulkchange.tmpl templates/bulkdomain.tmpl templates/dberr.tmpl \ templates/deldom.tmpl templates/delgrp.tmpl templates/delrec.tmpl templates/deluser.tmpl \ templates/dns.css templates/dnsq.tmpl templates/domlist.tmpl templates/edgroup.tmpl \ templates/editsoa.tmpl templates/footer.tmpl templates/fpnla.tmpl templates/grouptree.css \ templates/grouptree-ie.css templates/grpman.tmpl templates/grptree.tmpl templates/header.tmpl \ templates/lettsearch.tmpl templates/login.tmpl templates/log.tmpl templates/menu.tmpl \ templates/newdomain.tmpl templates/newgrp.tmpl templates/permlist_enabled.tmpl templates/permlist.tmpl \ templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \ templates/soadata.tmpl templates/template.tmpl templates/updatesoa.tmpl templates/useradmin.tmpl \ templates/user.tmpl templates/viadns.css templates/whoisq.tmpl \ DIRS = \ images templates IMAGES = \ images/trash2.png images/fwd.png images/ffwd.png images/frev.png \ images/rev.png images/DESC.png images/ASC.png SCRIPTS = \ dns.cgi dns-rpc.cgi vega-import.pl MODULES = DNSDB.pm #CONFIGMODULES = MyDNSDB.pm all: # nullop install: @for i in $(HTML) $(IMAGES); do \ $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/dnsdb/$$i ; \ done # munge in necessary 'use lib ...' bits so scripts can find MyDNSDB.pm... @for i in $(SCRIPTS) $(MODULES); do \ $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/dnsdb/$$i ; \ perl -pi -e 's|##uselib##|use lib "${sysconfdir}/dnsdb/";|;' $(DESTDIR)${libdir}/dnsdb/$$i ; \ done $(INSTALL) -d $(DESTDIR)${sysconfdir}/dnsdb/ @for i in $(CONFIGMODULES) ; do \ $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/dnsdb/ ; \ done # # and now munge MyDNSDB.pm so it can find the core library # perl -pi -e 's|##uselib##|use lib "${libdir}/dnsdb";|;' $(DESTDIR)${sysconfdir}/dnsdb/MyDNSDB.pm #clean: # @for i in $(DIRS) ; do \ # $(MAKE) -C $$i clean ; \ # done dist: mkdir $(PKGNAME)-$(VERSION) tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -) #/usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < INSTALL > $(PKGNAME)-$(VERSION)/INSTALL perl -pi -e 's/[\d.]+;\s*##VERSION##/$(VERSION);/;' $(PKGNAME)-$(VERSION)/DNSDB.pm tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION) gzip -v -f -9 $(PKGNAME)-$(VERSION).tar rm -rf $(PKGNAME)-$(VERSION) # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz