| [417] | 1 | # $Id: Makefile 933 2022-12-08 18:44:35Z kdeugau $ | 
|---|
|  | 2 | # IPDB makefile | 
|---|
|  | 3 |  | 
|---|
|  | 4 | PKGNAME=ipdb | 
|---|
| [894] | 5 | VERSION=3.0 | 
|---|
| [417] | 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 |  | 
|---|
| [910] | 30 | GENDOCS = \ | 
|---|
|  | 31 | docs/search-rpc.html | 
|---|
|  | 32 |  | 
|---|
| [417] | 33 | HTML = \ | 
|---|
| [933] | 34 | alloctypes.html help.html index.shtml ipdb.css rDNS.html htaccess.example | 
|---|
| [417] | 35 |  | 
|---|
| [517] | 36 | JS = templates/widgets.js | 
|---|
|  | 37 |  | 
|---|
| [848] | 38 | IMAGES = images/logo.png images/tree_closed.png images/tree_open.png | 
|---|
| [417] | 39 |  | 
|---|
| [517] | 40 | TEMPLATES = \ | 
|---|
| [843] | 41 | templates/aclerror.tmpl templates/addmaster.tmpl templates/addvrf.tmpl templates/assign.tmpl \ | 
|---|
|  | 42 | templates/confirm.tmpl templates/confmerge.tmpl templates/dberr.tmpl templates/delete.tmpl \ | 
|---|
|  | 43 | templates/delvrf.tmpl templates/domerge.tmpl templates/dosplit.tmpl templates/dunno.tmpl \ | 
|---|
|  | 44 | templates/edit.tmpl templates/finaldelete.tmpl templates/finaldelvrf.tmpl templates/footer.tmpl \ | 
|---|
|  | 45 | templates/header.tmpl templates/index2.tmpl templates/index.tmpl templates/insert.tmpl \ | 
|---|
|  | 46 | templates/listpool.tmpl templates/merge.tmpl templates/newcity.tmpl templates/newmaster.tmpl \ | 
|---|
|  | 47 | templates/newnode.tmpl templates/newvrf.tmpl templates/nodesearch.tmpl templates/showsubs2.tmpl \ | 
|---|
|  | 48 | templates/showsubs.tmpl templates/showvrf.tmpl templates/split.tmpl templates/subnet-calc.tmpl \ | 
|---|
|  | 49 | templates/update.tmpl templates/utilbar.tmpl \ | 
|---|
| [517] | 50 | \ | 
|---|
|  | 51 | templates/admin/aclerr.tmpl templates/admin/addnotice.tmpl templates/admin/alloc.tmpl \ | 
|---|
|  | 52 | templates/admin/alloctweak.tmpl templates/admin/confirm.tmpl templates/admin/dberr.tmpl \ | 
|---|
|  | 53 | templates/admin/delnotice.tmpl templates/admin/deluser.tmpl templates/admin/dunno.tmpl \ | 
|---|
|  | 54 | templates/admin/edcust.tmpl templates/admin/ednotice.tmpl templates/admin/emailnotice.tmpl \ | 
|---|
|  | 55 | templates/admin/header.tmpl templates/admin/listcust.tmpl templates/admin/main.tmpl \ | 
|---|
|  | 56 | templates/admin/newuser.tmpl templates/admin/showallocs.tmpl templates/admin/showpools.tmpl \ | 
|---|
|  | 57 | templates/admin/showusers.tmpl templates/admin/touch.tmpl templates/admin/tweakpool.tmpl \ | 
|---|
|  | 58 | templates/admin/updacl.tmpl templates/admin/updatepool.tmpl templates/admin/update.tmpl \ | 
|---|
|  | 59 | templates/admin/updcust.tmpl templates/admin/updnotice.tmpl \ | 
|---|
|  | 60 | \ | 
|---|
|  | 61 | templates/search/compsearch.tmpl templates/search/sresults.tmpl | 
|---|
|  | 62 |  | 
|---|
| [417] | 63 | SCRIPTS = \ | 
|---|
| [846] | 64 | cgi-bin/access-pwd-update.pl cgi-bin/allocate.pl cgi-bin/combineblocks.pl \ | 
|---|
| [933] | 65 | cgi-bin/consistency-check.pl cgi-bin/db-update.pl cgi-bin/freespace.pl cgi-bin/pool2csv.pl \ | 
|---|
| [846] | 66 | \ | 
|---|
|  | 67 | cgi-bin/admin.cgi cgi-bin/ipdb-rpc.cgi cgi-bin/main.cgi cgi-bin/newcity.cgi cgi-bin/newnode.cgi \ | 
|---|
| [904] | 68 | cgi-bin/search-rpc.cgi cgi-bin/search.cgi cgi-bin/snCalc.cgi \ | 
|---|
| [846] | 69 | \ | 
|---|
|  | 70 | cgi-bin/extras/db2rwhois.pl | 
|---|
| [417] | 71 |  | 
|---|
| [843] | 72 | SQL = cgi-bin/ipdb.psql cgi-bin/ipdb-2.7-3.0.sql | 
|---|
|  | 73 |  | 
|---|
| [417] | 74 | MODULES = cgi-bin/IPDB.pm | 
|---|
|  | 75 |  | 
|---|
|  | 76 | CONFIGMODULES = cgi-bin/MyIPDB.pm cgi-bin/CustIDCK.pm | 
|---|
|  | 77 |  | 
|---|
|  | 78 | RWHOIS = \ | 
|---|
| [517] | 79 | cgi-bin/extras/rwhois-net-skel.tar.gz cgi-bin/extras/rwhois-config \ | 
|---|
| [417] | 80 | cgi-bin/extras/network.tmpl | 
|---|
|  | 81 |  | 
|---|
| [910] | 82 | DIRS = docs images templates cgi-bin cgi-bin/extras | 
|---|
| [417] | 83 |  | 
|---|
| [897] | 84 | MANIFEST = Makefile COPYING \ | 
|---|
| [910] | 85 | $(GENDOCS) \ | 
|---|
| [517] | 86 | $(HTML) \ | 
|---|
|  | 87 | $(JS) \ | 
|---|
|  | 88 | $(IMAGES) \ | 
|---|
|  | 89 | $(TEMPLATES) \ | 
|---|
|  | 90 | $(SCRIPTS) \ | 
|---|
| [843] | 91 | $(SQL) \ | 
|---|
| [517] | 92 | $(MODULES) \ | 
|---|
|  | 93 | $(CONFIGMODULES) \ | 
|---|
|  | 94 | $(RWHOIS) | 
|---|
| [417] | 95 |  | 
|---|
|  | 96 | all: | 
|---|
|  | 97 | # nullop | 
|---|
|  | 98 |  | 
|---|
| [894] | 99 | list: | 
|---|
| [910] | 100 | echo Makefile COPYING \ | 
|---|
|  | 101 | $(GENDOCS) \ | 
|---|
| [894] | 102 | $(HTML) \ | 
|---|
|  | 103 | $(JS) \ | 
|---|
|  | 104 | $(IMAGES) \ | 
|---|
|  | 105 | $(TEMPLATES) \ | 
|---|
|  | 106 | $(SCRIPTS) \ | 
|---|
|  | 107 | $(SQL) \ | 
|---|
|  | 108 | $(MODULES) \ | 
|---|
|  | 109 | $(CONFIGMODULES) \ | 
|---|
|  | 110 | $(RWHOIS) | 
|---|
|  | 111 |  | 
|---|
| [417] | 112 | install: | 
|---|
| [517] | 113 | @for i in $(HTML) $(IMAGES) $(JS) $(TEMPLATES); do \ | 
|---|
| [433] | 114 | $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \ | 
|---|
| [417] | 115 | done | 
|---|
|  | 116 | # munge in necessary 'use lib ...' bits so scripts can find MyIPDB.pm... | 
|---|
|  | 117 | @for i in $(SCRIPTS) $(MODULES) $(RWHOIS); do \ | 
|---|
| [433] | 118 | $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \ | 
|---|
|  | 119 | perl -pi -e 's|##uselib##|use lib "${sysconfdir}/ipdb-$(VERSION)/";|;' $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \ | 
|---|
| [417] | 120 | done | 
|---|
| [433] | 121 | $(INSTALL) -d $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/ | 
|---|
| [417] | 122 | @for i in $(CONFIGMODULES) ; do \ | 
|---|
| [433] | 123 | $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/ ; \ | 
|---|
| [417] | 124 | done | 
|---|
|  | 125 | # and now munge MyIPDB.pm so it can find the core library | 
|---|
| [433] | 126 | perl -pi -e 's|##uselib##|use lib "${libdir}/ipdb-$(VERSION)";|;' $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/MyIPDB.pm | 
|---|
| [417] | 127 |  | 
|---|
|  | 128 | #clean: | 
|---|
|  | 129 | #       @for i in $(DIRS) ; do \ | 
|---|
|  | 130 | #               $(MAKE) -C $$i clean ; \ | 
|---|
|  | 131 | #       done | 
|---|
|  | 132 |  | 
|---|
|  | 133 | dist: | 
|---|
|  | 134 | mkdir $(PKGNAME)-$(VERSION) | 
|---|
| [910] | 135 | pod2html cgi-bin/search-rpc.cgi > docs/search-rpc.html | 
|---|
| [417] | 136 | tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -) | 
|---|
| [607] | 137 | /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/g;s/#RELEASE#/$(RELEASE)/g;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec | 
|---|
|  | 138 | /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/g;s/#RELEASE#/$(RELEASE)/g;s/#BETA#//g' < INSTALL > $(PKGNAME)-$(VERSION)/INSTALL | 
|---|
|  | 139 | perl -pi -e 's/[\d.]+;\s*##VERSION##/"$(VERSION)";/;' $(PKGNAME)-$(VERSION)/cgi-bin/IPDB.pm | 
|---|
| [417] | 140 | tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION) | 
|---|
|  | 141 | gzip -v -f -9 $(PKGNAME)-$(VERSION).tar | 
|---|
|  | 142 | rm -rf $(PKGNAME)-$(VERSION) | 
|---|
|  | 143 | # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz | 
|---|