source: branches/htmlform/Makefile@ 892

Last change on this file since 892 was 516, checked in by Kris Deugau, 12 years ago

/branches/htmlform

Update and shuffle the file listings in the Makefile to match all
the new templates. MANIFEST is now constructed from the other
lists, rather duplicating things.
Make sure "make install" actually installs all current files.
See #3.

  • Property svn:keywords set to Id
File size: 4.1 KB
RevLine 
[417]1# $Id: Makefile 516 2012-10-17 21:19:50Z kdeugau $
2# IPDB makefile
3
4PKGNAME=ipdb
5VERSION=2.6
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
30HTML = \
[516]31 alloctypes.html help.html index.shtml ipdb.css
[417]32
[516]33JS = templates/widgets.js
34
[417]35IMAGES = images/logo.png
36
[516]37TEMPLATES = \
38 templates/aclerror.tmpl templates/addmaster.tmpl templates/assign.tmpl templates/confirm.tmpl \
39 templates/dberr.tmpl templates/delete.tmpl templates/dunno.tmpl templates/edit.tmpl \
40 templates/finaldelete.tmpl templates/footer.tmpl templates/header.tmpl templates/index.tmpl \
41 templates/insert.tmpl templates/listpool.tmpl templates/newcity.tmpl templates/newmaster.tmpl \
42 templates/newnode.tmpl templates/nodesearch.tmpl templates/showmaster.tmpl templates/showrouted.tmpl \
43 templates/subnet-calc.tmpl templates/update.tmpl \
44 \
45 templates/admin/aclerr.tmpl templates/admin/addnotice.tmpl templates/admin/alloc.tmpl \
46 templates/admin/alloctweak.tmpl templates/admin/confirm.tmpl templates/admin/dberr.tmpl \
47 templates/admin/delnotice.tmpl templates/admin/deluser.tmpl templates/admin/dunno.tmpl \
48 templates/admin/edcust.tmpl templates/admin/ednotice.tmpl templates/admin/emailnotice.tmpl \
49 templates/admin/header.tmpl templates/admin/listcust.tmpl templates/admin/main.tmpl \
50 templates/admin/newuser.tmpl templates/admin/showallocs.tmpl templates/admin/showpools.tmpl \
51 templates/admin/showusers.tmpl templates/admin/touch.tmpl templates/admin/tweakpool.tmpl \
52 templates/admin/updacl.tmpl templates/admin/updatepool.tmpl templates/admin/update.tmpl \
53 templates/admin/updcust.tmpl templates/admin/updnotice.tmpl \
54 \
55 templates/search/compsearch.tmpl templates/search/sresults.tmpl
56
[417]57SCRIPTS = \
58 cgi-bin/extras/db2rwhois.pl cgi-bin/combineblocks.pl cgi-bin/access-pwd-update.pl \
59 cgi-bin/newnode.cgi cgi-bin/freespace.pl cgi-bin/admin.cgi \
60 cgi-bin/main.cgi cgi-bin/newcity.cgi cgi-bin/allocate.pl \
61 cgi-bin/search.cgi cgi-bin/consistency-check.pl
62
63MODULES = cgi-bin/IPDB.pm
64
65CONFIGMODULES = cgi-bin/MyIPDB.pm cgi-bin/CustIDCK.pm
66
67RWHOIS = \
[516]68 cgi-bin/extras/rwhois-net-skel.tar.gz cgi-bin/extras/rwhois-config \
[417]69 cgi-bin/extras/network.tmpl
70
[516]71DIRS = images templates cgi-bin cgi-bin/extras
[417]72
[516]73MANIFEST = \
74 $(HTML) \
75 $(JS) \
76 $(IMAGES) \
77 $(TEMPLATES) \
78 $(SCRIPTS) \
79 $(MODULES) \
80 $(CONFIGMODULES) \
81 $(RWHOIS)
[417]82
83all:
84 # nullop
85
86install:
[516]87 @for i in $(HTML) $(IMAGES) $(JS) $(TEMPLATES); do \
[433]88 $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \
[417]89 done
90 # munge in necessary 'use lib ...' bits so scripts can find MyIPDB.pm...
91 @for i in $(SCRIPTS) $(MODULES) $(RWHOIS); do \
[433]92 $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \
93 perl -pi -e 's|##uselib##|use lib "${sysconfdir}/ipdb-$(VERSION)/";|;' $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \
[417]94 done
[433]95 $(INSTALL) -d $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/
[417]96 @for i in $(CONFIGMODULES) ; do \
[433]97 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/ ; \
[417]98 done
99 # and now munge MyIPDB.pm so it can find the core library
[433]100 perl -pi -e 's|##uselib##|use lib "${libdir}/ipdb-$(VERSION)";|;' $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/MyIPDB.pm
[417]101
102#clean:
103# @for i in $(DIRS) ; do \
104# $(MAKE) -C $$i clean ; \
105# done
106
107dist:
108 mkdir $(PKGNAME)-$(VERSION)
109 tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -)
110 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec
[433]111 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/;s/#RELEASE#/$(RELEASE)/;s/#BETA#//g' < INSTALL > $(PKGNAME)-$(VERSION)/INSTALL
[417]112 perl -pi -e 's/[\d.]+;\s*##VERSION##/$(VERSION);/;' $(PKGNAME)-$(VERSION)/cgi-bin/IPDB.pm
113 tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
114 gzip -v -f -9 $(PKGNAME)-$(VERSION).tar
115 rm -rf $(PKGNAME)-$(VERSION)
116 # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz
Note: See TracBrowser for help on using the repository browser.