source: trunk/Makefile@ 114

Last change on this file since 114 was 114, checked in by Kris Deugau, 13 years ago

/trunk

Complete core functionality for bulk domain operations. May
still need some UI polish.

File size: 7.2 KB
Line 
1# $Id$
2# DNS Admin makefile
3
4PKGNAME=dnsadmin
5VERSION=0
6RELEASE=1
7
8# Include some boilerplate Gnu makefile definitions.
9prefix = /usr/local
10
11exec_prefix = ${prefix}
12bindir = ${exec_prefix}/bin
13libdir = ${exec_prefix}/lib
14infodir = ${prefix}/info
15includedir = ${prefix}/include
16datadir = ${prefix}/share
17localedir = $(datadir)/locale
18sysconfdir = ${prefix}/etc
19mandir = ${prefix}/man
20
21INSTALL = /usr/bin/install -c
22INSTALL_PROGRAM = ${INSTALL}
23INSTALL_SCRIPT = ${INSTALL}
24INSTALL_DATA = ${INSTALL} -m 644
25INSTALLMODE= -m 0755
26INSTALLMODE2 = -m 0555
27
28DESTDIR =
29
30MANIFEST = \
31 INSTALL COPYING TODO Makefile dnsadmin.spec new-dns.sql dns.sql dns.cgi DNSDB.pm \
32 \
33 index.shtml
34 \
35 images/trash2.png images/fwd.png images/ffwd.png images/frev.png \
36 images/rev.png images/DESC.png images/ASC.png \
37 \
38 templates/fpnla.tmpl templates/updatesoa.tmpl templates/log.tmpl templates/newgrp.tmpl \
39 templates/lettsearch.tmpl templates/delgrp.tmpl templates/deldom.tmpl templates/footer.tmpl \
40 templates/header.tmpl templates/reclist.tmpl templates/adddomain.tmpl templates/deluser.tmpl \
41 templates/editsoa.tmpl templates/pgcount.tmpl templates/dns.css templates/dnsq.tmpl \
42 templates/grptree.tmpl templates/addgroup.tmpl templates/useradmin.tmpl templates/addrec.tmpl \
43 templates/login.tmpl templates/adduser.tmpl templates/sbox.tmpl templates/record.tmpl \
44 templates/whoisq.tmpl templates/domlist.tmpl templates/menu.tmpl \
45 templates/soadata.tmpl templates/newdomain.tmpl templates/grpman.tmpl templates/axfr.tmpl \
46 templates/newuser.tmpl templates/delrec.tmpl
47
48DIRS = \
49 images templates
50
51##work
52HTML = \
53 addmaster.html alloctypes.html assign.html changes.html compsearch.html \
54 confirm.html confirmRemove.html editDisplay.html fb-assign.html footer.inc \
55 header.inc help.html index.shtml ipdb.css local.css \
56 newcity.html newnode.html nodesearch.html startsn.html updated.html
57
58IMAGES = images/logo.png
59
60SCRIPTS = \
61 cgi-bin/extras/db2rwhois.pl cgi-bin/combineblocks.pl cgi-bin/access-pwd-update.pl \
62 cgi-bin/newnode.cgi cgi-bin/freespace.pl cgi-bin/admin.cgi \
63 cgi-bin/main.cgi cgi-bin/newcity.cgi cgi-bin/allocate.pl \
64 cgi-bin/search.cgi cgi-bin/consistency-check.pl
65
66MODULES = cgi-bin/IPDB.pm
67
68CONFIGMODULES = cgi-bin/MyIPDB.pm cgi-bin/CustIDCK.pm
69
70all:
71 # nullop
72
73install:
74 @for i in $(HTML) $(IMAGES); do \
75 $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/ipdb/$$i ; \
76 done
77 # munge in necessary 'use lib ...' bits so scripts can find MyIPDB.pm...
78 @for i in $(SCRIPTS) $(MODULES); do \
79 $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/ipdb/$$i ; \
80 perl -pi -e 's|##uselib##|use lib "${sysconfdir}/ipdb/";|;' $(DESTDIR)${libdir}/ipdb/$$i ; \
81 done
82 $(INSTALL) -d $(DESTDIR)${sysconfdir}/ipdb/
83 @for i in $(CONFIGMODULES) ; do \
84 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/ipdb/ ; \
85 done
86# # and now munge MyIPDB.pm so it can find the core library
87# perl -pi -e 's|##uselib##|use lib "${libdir}/ipdb";|;' $(DESTDIR)${sysconfdir}/ipdb/MyIPDB.pm
88
89#clean:
90# @for i in $(DIRS) ; do \
91# $(MAKE) -C $$i clean ; \
92# done
93
94dist:
95 mkdir $(PKGNAME)-$(VERSION)
96 tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -)
97 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec
98 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < INSTALL > $(PKGNAME)-$(VERSION)/INSTALL
99 perl -pi -e 's/[\d.]+;\s*##VERSION##/$(VERSION);/;' $(PKGNAME)-$(VERSION)/cgi-bin/IPDB.pm
100 tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
101 gzip -v -f -9 $(PKGNAME)-$(VERSION).tar
102 rm -rf $(PKGNAME)-$(VERSION)
103 # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz
104# $Id: Makefile 417 2010-06-30 21:48:03Z kdeugau $
105# DNS Admin makefile
106
107PKGNAME=dnsadmin
108VERSION=0
109RELEASE=1
110
111# Include some boilerplate Gnu makefile definitions.
112prefix = /usr/local
113
114exec_prefix = ${prefix}
115bindir = ${exec_prefix}/bin
116libdir = ${exec_prefix}/lib
117infodir = ${prefix}/info
118includedir = ${prefix}/include
119datadir = ${prefix}/share
120localedir = $(datadir)/locale
121sysconfdir = ${prefix}/etc
122mandir = ${prefix}/man
123
124INSTALL = /usr/bin/install -c
125INSTALL_PROGRAM = ${INSTALL}
126INSTALL_SCRIPT = ${INSTALL}
127INSTALL_DATA = ${INSTALL} -m 644
128INSTALLMODE= -m 0755
129INSTALLMODE2 = -m 0555
130
131DESTDIR =
132
133MANIFEST = \
134 INSTALL COPYING TODO Makefile dnsadmin.spec new-dns.sql dns.sql dns.cgi DNSDB.pm \
135 \
136 index.shtml
137 \
138 images/trash2.png images/fwd.png images/ffwd.png images/frev.png \
139 images/rev.png images/DESC.png images/ASC.png \
140 \
141 templates/fpnla.tmpl templates/updatesoa.tmpl templates/log.tmpl templates/newgrp.tmpl \
142 templates/lettsearch.tmpl templates/delgrp.tmpl templates/deldom.tmpl templates/footer.tmpl \
143 templates/header.tmpl templates/reclist.tmpl templates/adddomain.tmpl templates/deluser.tmpl \
144 templates/editsoa.tmpl templates/pgcount.tmpl templates/dns.css templates/dnsq.tmpl \
145 templates/grptree.tmpl templates/addgroup.tmpl templates/useradmin.tmpl templates/addrec.tmpl \
146 templates/login.tmpl templates/adduser.tmpl templates/sbox.tmpl templates/record.tmpl \
147 templates/whoisq.tmpl templates/domlist.tmpl templates/menu.tmpl \
148 templates/soadata.tmpl templates/newdomain.tmpl templates/grpman.tmpl templates/axfr.tmpl \
149 templates/newuser.tmpl templates/delrec.tmpl
150
151DIRS = \
152 images templates
153
154##work
155HTML = \
156 addmaster.html alloctypes.html assign.html changes.html compsearch.html \
157 confirm.html confirmRemove.html editDisplay.html fb-assign.html footer.inc \
158 header.inc help.html index.shtml ipdb.css local.css \
159 newcity.html newnode.html nodesearch.html startsn.html updated.html
160
161IMAGES = images/logo.png
162
163SCRIPTS = \
164 cgi-bin/extras/db2rwhois.pl cgi-bin/combineblocks.pl cgi-bin/access-pwd-update.pl \
165 cgi-bin/newnode.cgi cgi-bin/freespace.pl cgi-bin/admin.cgi \
166 cgi-bin/main.cgi cgi-bin/newcity.cgi cgi-bin/allocate.pl \
167 cgi-bin/search.cgi cgi-bin/consistency-check.pl
168
169MODULES = cgi-bin/IPDB.pm
170
171CONFIGMODULES = cgi-bin/MyIPDB.pm cgi-bin/CustIDCK.pm
172
173all:
174 # nullop
175
176install:
177 @for i in $(HTML) $(IMAGES); do \
178 $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/ipdb/$$i ; \
179 done
180 # munge in necessary 'use lib ...' bits so scripts can find MyIPDB.pm...
181 @for i in $(SCRIPTS) $(MODULES); do \
182 $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/ipdb/$$i ; \
183 perl -pi -e 's|##uselib##|use lib "${sysconfdir}/ipdb/";|;' $(DESTDIR)${libdir}/ipdb/$$i ; \
184 done
185 $(INSTALL) -d $(DESTDIR)${sysconfdir}/ipdb/
186 @for i in $(CONFIGMODULES) ; do \
187 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/ipdb/ ; \
188 done
189# # and now munge MyIPDB.pm so it can find the core library
190# perl -pi -e 's|##uselib##|use lib "${libdir}/ipdb";|;' $(DESTDIR)${sysconfdir}/ipdb/MyIPDB.pm
191
192#clean:
193# @for i in $(DIRS) ; do \
194# $(MAKE) -C $$i clean ; \
195# done
196
197dist:
198 mkdir $(PKGNAME)-$(VERSION)
199 tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -)
200 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec
201 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < INSTALL > $(PKGNAME)-$(VERSION)/INSTALL
202 perl -pi -e 's/[\d.]+;\s*##VERSION##/$(VERSION);/;' $(PKGNAME)-$(VERSION)/cgi-bin/IPDB.pm
203 tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
204 gzip -v -f -9 $(PKGNAME)-$(VERSION).tar
205 rm -rf $(PKGNAME)-$(VERSION)
206 # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz
Note: See TracBrowser for help on using the repository browser.