source: trunk/Makefile@ 843

Last change on this file since 843 was 843, checked in by Kris Deugau, 9 years ago

/trunk

More missing pieces for the Makefile manifest

  • Property svn:keywords set to Id
File size: 4.5 KB
RevLine 
[417]1# $Id: Makefile 843 2016-04-12 22:18:23Z 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 = \
[517]31 alloctypes.html help.html index.shtml ipdb.css
[417]32
[517]33JS = templates/widgets.js
34
[417]35IMAGES = images/logo.png
36
[517]37TEMPLATES = \
[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]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 \
[840]64 cgi-bin/search.cgi cgi-bin/consistency-check.pl cgi-bin/db-update.pl
[417]65
[843]66SQL = cgi-bin/ipdb.psql cgi-bin/ipdb-2.7-3.0.sql
67
[417]68MODULES = cgi-bin/IPDB.pm
69
70CONFIGMODULES = cgi-bin/MyIPDB.pm cgi-bin/CustIDCK.pm
71
72RWHOIS = \
[517]73 cgi-bin/extras/rwhois-net-skel.tar.gz cgi-bin/extras/rwhois-config \
[417]74 cgi-bin/extras/network.tmpl
75
[517]76DIRS = images templates cgi-bin cgi-bin/extras
[417]77
[517]78MANIFEST = \
79 $(HTML) \
80 $(JS) \
81 $(IMAGES) \
82 $(TEMPLATES) \
83 $(SCRIPTS) \
[843]84 $(SQL) \
[517]85 $(MODULES) \
86 $(CONFIGMODULES) \
87 $(RWHOIS)
[417]88
89all:
90 # nullop
91
92install:
[517]93 @for i in $(HTML) $(IMAGES) $(JS) $(TEMPLATES); do \
[433]94 $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \
[417]95 done
96 # munge in necessary 'use lib ...' bits so scripts can find MyIPDB.pm...
97 @for i in $(SCRIPTS) $(MODULES) $(RWHOIS); do \
[433]98 $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \
99 perl -pi -e 's|##uselib##|use lib "${sysconfdir}/ipdb-$(VERSION)/";|;' $(DESTDIR)${libdir}/ipdb-$(VERSION)/$$i ; \
[417]100 done
[433]101 $(INSTALL) -d $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/
[417]102 @for i in $(CONFIGMODULES) ; do \
[433]103 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/ ; \
[417]104 done
105 # and now munge MyIPDB.pm so it can find the core library
[433]106 perl -pi -e 's|##uselib##|use lib "${libdir}/ipdb-$(VERSION)";|;' $(DESTDIR)${sysconfdir}/ipdb-$(VERSION)/MyIPDB.pm
[417]107
108#clean:
109# @for i in $(DIRS) ; do \
110# $(MAKE) -C $$i clean ; \
111# done
112
113dist:
114 mkdir $(PKGNAME)-$(VERSION)
115 tar cf - $(MANIFEST) | (cd $(PKGNAME)-$(VERSION); tar xf -)
[607]116 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/g;s/#RELEASE#/$(RELEASE)/g;s/#BETA#//g' < $(PKGNAME).spec > $(PKGNAME)-$(VERSION)/$(PKGNAME).spec
117 /usr/bin/perl -p -e 's/#VERSION#/$(VERSION)/g;s/#RELEASE#/$(RELEASE)/g;s/#BETA#//g' < INSTALL > $(PKGNAME)-$(VERSION)/INSTALL
118 perl -pi -e 's/[\d.]+;\s*##VERSION##/"$(VERSION)";/;' $(PKGNAME)-$(VERSION)/cgi-bin/IPDB.pm
[417]119 tar cf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
120 gzip -v -f -9 $(PKGNAME)-$(VERSION).tar
121 rm -rf $(PKGNAME)-$(VERSION)
122 # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz
Note: See TracBrowser for help on using the repository browser.