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