[417] | 1 | # $Id: Makefile 417 2010-06-30 21:48:03Z kdeugau $
|
---|
| 2 | # IPDB makefile
|
---|
| 3 |
|
---|
| 4 | PKGNAME=ipdb
|
---|
| 5 | VERSION=2.6
|
---|
| 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 | Makefile ipdb.spec \
|
---|
| 32 | \
|
---|
| 33 | addmaster.html alloctypes.html assign.html changes.html compsearch.html \
|
---|
| 34 | confirm.html confirmRemove.html editDisplay.html fb-assign.html footer.inc \
|
---|
| 35 | header.inc help.html index.shtml ipdb.css local.css \
|
---|
| 36 | newcity.html newnode.html nodesearch.html startsn.html updated.html \
|
---|
| 37 | images/logo.png \
|
---|
| 38 | \
|
---|
| 39 | cgi-bin/updatecust.php cgi-bin/combineblocks.pl cgi-bin/access-pwd-update.pl \
|
---|
| 40 | cgi-bin/newnode.cgi cgi-bin/CustIDCK.pm cgi-bin/freespace.pl \
|
---|
| 41 | cgi-bin/admin.cgi cgi-bin/MyIPDB.pm cgi-bin/IPDB.pm \
|
---|
| 42 | cgi-bin/main.cgi cgi-bin/checkcusts.pl cgi-bin/newcity.cgi \
|
---|
| 43 | cgi-bin/allocate.pl cgi-bin/search.cgi cgi-bin/editcust.php \
|
---|
| 44 | cgi-bin/snCalc.cgi cgi-bin/CommonWeb.pm cgi-bin/ipdb.psql \
|
---|
| 45 | cgi-bin/list-cust.php cgi-bin/consistency-check.pl \
|
---|
| 46 | \
|
---|
| 47 | cgi-bin/extras/db2rwhois.pl cgi-bin/extras/rwhois-net-skel.tar.gz cgi-bin/extras/rwhois-config \
|
---|
| 48 | cgi-bin/extras/network.tmpl
|
---|
| 49 |
|
---|
| 50 | HTML = \
|
---|
| 51 | addmaster.html alloctypes.html assign.html changes.html compsearch.html \
|
---|
| 52 | confirm.html confirmRemove.html editDisplay.html fb-assign.html footer.inc \
|
---|
| 53 | header.inc help.html index.shtml ipdb.css local.css \
|
---|
| 54 | newcity.html newnode.html nodesearch.html startsn.html updated.html
|
---|
| 55 |
|
---|
| 56 | IMAGES = images/logo.png
|
---|
| 57 |
|
---|
| 58 | SCRIPTS = \
|
---|
| 59 | cgi-bin/extras/db2rwhois.pl cgi-bin/combineblocks.pl cgi-bin/access-pwd-update.pl \
|
---|
| 60 | cgi-bin/newnode.cgi cgi-bin/freespace.pl cgi-bin/admin.cgi \
|
---|
| 61 | cgi-bin/main.cgi cgi-bin/newcity.cgi cgi-bin/allocate.pl \
|
---|
| 62 | cgi-bin/search.cgi cgi-bin/consistency-check.pl
|
---|
| 63 |
|
---|
| 64 | MODULES = cgi-bin/IPDB.pm
|
---|
| 65 |
|
---|
| 66 | CONFIGMODULES = cgi-bin/MyIPDB.pm cgi-bin/CustIDCK.pm
|
---|
| 67 |
|
---|
| 68 | RWHOIS = \
|
---|
| 69 | cgi-bin/extras/db2rwhois.pl cgi-bin/extras/rwhois-net-skel.tar.gz cgi-bin/extras/rwhois-config \
|
---|
| 70 | cgi-bin/extras/network.tmpl
|
---|
| 71 |
|
---|
| 72 | DIRS = images cgi-bin cgi-bin/extras
|
---|
| 73 |
|
---|
| 74 | # hmm. not sure what do do about you, m'friend...
|
---|
| 75 | #ip@
|
---|
| 76 |
|
---|
| 77 | all:
|
---|
| 78 | # nullop
|
---|
| 79 |
|
---|
| 80 | install:
|
---|
| 81 | @for i in $(HTML) $(IMAGES); do \
|
---|
| 82 | $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/ipdb/$$i ; \
|
---|
| 83 | done
|
---|
| 84 | # munge in necessary 'use lib ...' bits so scripts can find MyIPDB.pm...
|
---|
| 85 | @for i in $(SCRIPTS) $(MODULES) $(RWHOIS); do \
|
---|
| 86 | $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/ipdb/$$i ; \
|
---|
| 87 | perl -pi -e 's|##uselib##|use lib "${sysconfdir}/ipdb/";|;' $(DESTDIR)${libdir}/ipdb/$$i ; \
|
---|
| 88 | done
|
---|
| 89 | $(INSTALL) -d $(DESTDIR)${sysconfdir}/ipdb/
|
---|
| 90 | @for i in $(CONFIGMODULES) ; do \
|
---|
| 91 | $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/ipdb/ ; \
|
---|
| 92 | done
|
---|
| 93 | # and now munge MyIPDB.pm so it can find the core library
|
---|
| 94 | perl -pi -e 's|##uselib##|use lib "${libdir}/ipdb";|;' $(DESTDIR)${sysconfdir}/ipdb/MyIPDB.pm
|
---|
| 95 |
|
---|
| 96 | #clean:
|
---|
| 97 | # @for i in $(DIRS) ; do \
|
---|
| 98 | # $(MAKE) -C $$i clean ; \
|
---|
| 99 | # done
|
---|
| 100 |
|
---|
| 101 | dist:
|
---|
| 102 | mkdir $(PKGNAME)-$(VERSION)
|
---|
| 103 | tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -)
|
---|
| 104 | /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec
|
---|
| 105 | perl -pi -e 's/[\d.]+;\s*##VERSION##/$(VERSION);/;' $(PKGNAME)-$(VERSION)/cgi-bin/IPDB.pm
|
---|
| 106 | tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
|
---|
| 107 | gzip -v -f -9 $(PKGNAME)-$(VERSION).tar
|
---|
| 108 | rm -rf $(PKGNAME)-$(VERSION)
|
---|
| 109 | # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz
|
---|