# $Id: Makefile 441 2010-07-20 21:30:46Z kdeugau $ # IPDB makefile PKGNAME=ipdb VERSION=2.6 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 Makefile ipdb.spec \ \ addmaster.html alloctypes.html assign.html compsearch.html \ confirm.html confirmRemove.html editDisplay.html fb-assign.html footer.inc \ header.inc help.html index.shtml ipdb.css \ newcity.html newnode.html nodesearch.html startsn.html updated.html \ images/logo.png \ \ cgi-bin/combineblocks.pl cgi-bin/access-pwd-update.pl \ cgi-bin/newnode.cgi cgi-bin/CustIDCK.pm cgi-bin/freespace.pl \ cgi-bin/admin.cgi cgi-bin/MyIPDB.pm cgi-bin/IPDB.pm \ cgi-bin/main.cgi cgi-bin/checkcusts.pl cgi-bin/newcity.cgi \ cgi-bin/allocate.pl cgi-bin/search.cgi \ cgi-bin/snCalc.cgi cgi-bin/CommonWeb.pm cgi-bin/ipdb.psql \ cgi-bin/consistency-check.pl \ \ cgi-bin/extras/db2rwhois.pl cgi-bin/extras/rwhois-net-skel.tar.gz cgi-bin/extras/rwhois-config \ cgi-bin/extras/network.tmpl HTML = \ addmaster.html alloctypes.html assign.html changes.html compsearch.html \ confirm.html confirmRemove.html editDisplay.html fb-assign.html footer.inc \ header.inc help.html index.shtml ipdb.css \ newcity.html newnode.html nodesearch.html startsn.html updated.html IMAGES = images/logo.png SCRIPTS = \ cgi-bin/extras/db2rwhois.pl cgi-bin/combineblocks.pl cgi-bin/access-pwd-update.pl \ cgi-bin/newnode.cgi cgi-bin/freespace.pl cgi-bin/admin.cgi \ cgi-bin/main.cgi cgi-bin/newcity.cgi cgi-bin/allocate.pl \ cgi-bin/search.cgi cgi-bin/consistency-check.pl MODULES = cgi-bin/IPDB.pm CONFIGMODULES = cgi-bin/MyIPDB.pm cgi-bin/CustIDCK.pm RWHOIS = \ cgi-bin/extras/db2rwhois.pl cgi-bin/extras/rwhois-net-skel.tar.gz cgi-bin/extras/rwhois-config \ cgi-bin/extras/network.tmpl DIRS = images cgi-bin cgi-bin/extras # hmm. not sure what do do about you, m'friend... #ip@ all: # nullop install: @for i in $(HTML) $(IMAGES); do \ $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \ done # munge in necessary 'use lib ...' bits so scripts can find MyIPDB.pm... @for i in $(SCRIPTS) $(MODULES) $(RWHOIS); do \ $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \ perl -pi -e 's|##uselib##|use lib "${sysconfdir}/ipdb-$(VERSION)/";|;' $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \ done $(INSTALL) -d $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/ @for i in $(CONFIGMODULES) ; do \ $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/ ; \ done # and now munge MyIPDB.pm so it can find the core library perl -pi -e 's|##uselib##|use lib "${libdir}/ipdb-$(VERSION)";|;' $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/MyIPDB.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)/cgi-bin/IPDB.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