Changeset 216 for trunk/Makefile


Ignore:
Timestamp:
01/04/12 23:25:56 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Found some not-so-little things missing for a tarball

  • munging of @INC via "use lib" needs to be pointed to the right path on install
  • session dir should be configurable (eg, to put it in /var/lib/dnsdb when packaged scripts + templates all go in /usr/share/dnsdb)
  • Finally remove lingering unused viadns.css
  • Remember to install template files on 'make install'
  • Get a good start on filling out INSTALL halfway properly by copy-pasting the IPDB version
  • Add all-commented example config file to be installed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r210 r216  
    4747        templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \
    4848        templates/soadata.tmpl templates/template.tmpl templates/updatesoa.tmpl templates/useradmin.tmpl \
    49         templates/user.tmpl templates/viadns.css templates/whoisq.tmpl \
     49        templates/user.tmpl templates/whoisq.tmpl \
     50        \
     51        dnsdb.conf
    5052
    5153DIRS = \
     
    6163MODULES = DNSDB.pm
    6264
    63 #CONFIGMODULES = MyDNSDB.pm
     65TEMPLATES = \
     66        templates/adddomain.tmpl templates/addgroup.tmpl templates/addrec.tmpl templates/adduser.tmpl \
     67        templates/axfr.tmpl templates/bulkchange.tmpl templates/bulkdomain.tmpl templates/dberr.tmpl \
     68        templates/deldom.tmpl templates/delgrp.tmpl templates/delrec.tmpl templates/deluser.tmpl \
     69        templates/dns.css templates/dnsq.tmpl templates/domlist.tmpl templates/edgroup.tmpl \
     70        templates/editsoa.tmpl templates/footer.tmpl templates/fpnla.tmpl templates/grouptree.css \
     71        templates/grouptree-ie.css templates/grpman.tmpl templates/grptree.tmpl templates/header.tmpl \
     72        templates/lettsearch.tmpl templates/login.tmpl templates/log.tmpl templates/menu.tmpl \
     73        templates/newdomain.tmpl templates/newgrp.tmpl templates/permlist_enabled.tmpl templates/permlist.tmpl \
     74        templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \
     75        templates/soadata.tmpl templates/template.tmpl templates/updatesoa.tmpl templates/useradmin.tmpl \
     76        templates/user.tmpl templates/whoisq.tmpl
     77
     78CONFIGFILES = dnsdb.conf
    6479
    6580all:
     
    6782
    6883install:
    69         @for i in $(HTML) $(IMAGES); do \
    70                 $(INSTALL_DATA) -D $$i $(DESTDIR)${libdir}/dnsdb/$$i ; \
     84        @for i in $(IMAGES) $(TEMPLATES); do \
     85                $(INSTALL_DATA) -D $$i $(DESTDIR)${datadir}/dnsdb-$(VERSION)/$$i ; \
    7186        done
    72         # munge in necessary 'use lib ...' bits so scripts can find MyDNSDB.pm...
     87        @# munge in necessary 'use lib ...' bits so scripts can find libs and config...
     88        @# datadir is correct;  no arch-specific files
    7389        @for i in $(SCRIPTS) $(MODULES); do \
    74                 $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/dnsdb/$$i ; \
    75                 perl -pi -e 's|##uselib##|use lib "${sysconfdir}/dnsdb/";|;' $(DESTDIR)${libdir}/dnsdb/$$i ; \
     90                $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${datadir}/dnsdb-$(VERSION)/$$i ; \
     91                perl -pi -e 's|use lib '.';     ##uselib##|use lib "${datadir}/dnsdb-$(VERSION)/";|;' $(DESTDIR)${datadir}/dnsdb-$(VERSION)/$$i ; \
     92                perl -pi -e 's|use lib '.';     ##uselib##|use lib "${datadir}/dnsdb-$(VERSION)/";|;' $(DESTDIR)${datadir}/dnsdb-$(VERSION)/$$i ; \
    7693        done
    77         $(INSTALL) -d $(DESTDIR)${sysconfdir}/dnsdb/
    78         @for i in $(CONFIGMODULES) ; do \
    79                 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/dnsdb/ ; \
     94        @$(INSTALL) -d $(DESTDIR)${sysconfdir}/dnsdb/
     95        @# install an example config file with all known settings
     96        @for i in $(CONFIGFILES) ; do \
     97                if [ -e $(DESTDIR)${sysconfdir}/dnsdb/$$i ]; then \
     98                        echo "refusing to overwrite existing config file, created as $$i.new" ; \
     99                        $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/dnsdb/$$i.new ; \
     100                else \
     101                        $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/dnsdb/ ; \
     102                fi \
    80103        done
    81104#       # and now munge MyDNSDB.pm so it can find the core library
     
    96119        gzip -v -f -9 $(PKGNAME)-$(VERSION).tar
    97120        rm -rf $(PKGNAME)-$(VERSION)
    98         # gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz
     121        gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz
Note: See TracChangeset for help on using the changeset viewer.