1 | # $Id: Makefile 933 2022-12-08 18:44:35Z kdeugau $
|
---|
2 | # IPDB makefile
|
---|
3 |
|
---|
4 | PKGNAME=ipdb
|
---|
5 | VERSION=3.0
|
---|
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 | GENDOCS = \
|
---|
31 | docs/search-rpc.html
|
---|
32 |
|
---|
33 | HTML = \
|
---|
34 | alloctypes.html help.html index.shtml ipdb.css rDNS.html htaccess.example
|
---|
35 |
|
---|
36 | JS = templates/widgets.js
|
---|
37 |
|
---|
38 | IMAGES = images/logo.png images/tree_closed.png images/tree_open.png
|
---|
39 |
|
---|
40 | TEMPLATES = \
|
---|
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 \
|
---|
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 |
|
---|
63 | SCRIPTS = \
|
---|
64 | cgi-bin/access-pwd-update.pl cgi-bin/allocate.pl cgi-bin/combineblocks.pl \
|
---|
65 | cgi-bin/consistency-check.pl cgi-bin/db-update.pl cgi-bin/freespace.pl cgi-bin/pool2csv.pl \
|
---|
66 | \
|
---|
67 | cgi-bin/admin.cgi cgi-bin/ipdb-rpc.cgi cgi-bin/main.cgi cgi-bin/newcity.cgi cgi-bin/newnode.cgi \
|
---|
68 | cgi-bin/search-rpc.cgi cgi-bin/search.cgi cgi-bin/snCalc.cgi \
|
---|
69 | \
|
---|
70 | cgi-bin/extras/db2rwhois.pl
|
---|
71 |
|
---|
72 | SQL = cgi-bin/ipdb.psql cgi-bin/ipdb-2.7-3.0.sql
|
---|
73 |
|
---|
74 | MODULES = cgi-bin/IPDB.pm
|
---|
75 |
|
---|
76 | CONFIGMODULES = cgi-bin/MyIPDB.pm cgi-bin/CustIDCK.pm
|
---|
77 |
|
---|
78 | RWHOIS = \
|
---|
79 | cgi-bin/extras/rwhois-net-skel.tar.gz cgi-bin/extras/rwhois-config \
|
---|
80 | cgi-bin/extras/network.tmpl
|
---|
81 |
|
---|
82 | DIRS = docs images templates cgi-bin cgi-bin/extras
|
---|
83 |
|
---|
84 | MANIFEST = Makefile COPYING \
|
---|
85 | $(GENDOCS) \
|
---|
86 | $(HTML) \
|
---|
87 | $(JS) \
|
---|
88 | $(IMAGES) \
|
---|
89 | $(TEMPLATES) \
|
---|
90 | $(SCRIPTS) \
|
---|
91 | $(SQL) \
|
---|
92 | $(MODULES) \
|
---|
93 | $(CONFIGMODULES) \
|
---|
94 | $(RWHOIS)
|
---|
95 |
|
---|
96 | all:
|
---|
97 | # nullop
|
---|
98 |
|
---|
99 | list:
|
---|
100 | echo Makefile COPYING \
|
---|
101 | $(GENDOCS) \
|
---|
102 | $(HTML) \
|
---|
103 | $(JS) \
|
---|
104 | $(IMAGES) \
|
---|
105 | $(TEMPLATES) \
|
---|
106 | $(SCRIPTS) \
|
---|
107 | $(SQL) \
|
---|
108 | $(MODULES) \
|
---|
109 | $(CONFIGMODULES) \
|
---|
110 | $(RWHOIS)
|
---|
111 |
|
---|
112 | install:
|
---|
113 | @for i in $(HTML) $(IMAGES) $(JS) $(TEMPLATES); do \
|
---|
114 | $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \
|
---|
115 | done
|
---|
116 | # munge in necessary 'use lib ...' bits so scripts can find MyIPDB.pm...
|
---|
117 | @for i in $(SCRIPTS) $(MODULES) $(RWHOIS); do \
|
---|
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 ; \
|
---|
120 | done
|
---|
121 | $(INSTALL) -d $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/
|
---|
122 | @for i in $(CONFIGMODULES) ; do \
|
---|
123 | $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/ ; \
|
---|
124 | done
|
---|
125 | # and now munge MyIPDB.pm so it can find the core library
|
---|
126 | perl -pi -e 's|##uselib##|use lib "${libdir}/ipdb-$(VERSION)";|;' $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/MyIPDB.pm
|
---|
127 |
|
---|
128 | #clean:
|
---|
129 | # @for i in $(DIRS) ; do \
|
---|
130 | # $(MAKE) -C $$i clean ; \
|
---|
131 | # done
|
---|
132 |
|
---|
133 | dist:
|
---|
134 | mkdir $(PKGNAME)-$(VERSION)
|
---|
135 | pod2html cgi-bin/search-rpc.cgi > docs/search-rpc.html
|
---|
136 | tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -)
|
---|
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
|
---|
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
|
---|