Source code of /package/debian/rules

Last modified: 2015-09-20 05:29:29

Download

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1


CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif

configure: configure-stamp
configure-stamp:
        dh_testdir
        # Add here commands to configure the package.

        touch configure-stamp


build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

build-stamp: configure-stamp 
        dh_testdir

        # Add here commands to compile the package.
#        $(MAKE)
        #docbook-to-man debian/gwhois.sgml > man/man1/gwhois.1

        touch build-stamp

clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp

        # Add here commands to clean up after the build process.
#        -$(MAKE) clean

        dh_clean 
        debconf-updatepo

install: build
        dh_testdir
        dh_testroot
        dh_prep
        dh_installdirs

        # Add here commands to install the package into debian/gwhois.

        # MAIN PROGRAM

        install -oroot -gstaff -m0755 bin/gwhois debian/gwhois/usr/bin/

        # PATTERN FILES

        install -d debian/gwhois/etc/gwhois
        install -d debian/gwhois/etc/gwhois/maintenance
        install -d debian/gwhois/etc/gwhois/pattern.d

        install -oroot -gstaff -m0644 etc/pattern.d/ipv4_afrinic debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv4_apnic debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv4_arin debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv4_lacnic debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv4_ripencc debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv6_afrinic debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv6_apnic debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv6_arin debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv6_lacnic debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv6_ripencc debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/asn debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/tld debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/domains debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/vendors debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv4 debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/001_subdomains debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/oid debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/ipv6 debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/.changelog debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/redirect debian/gwhois/etc/gwhois/pattern.d/
        install -oroot -gstaff -m0644 etc/pattern.d/handles debian/gwhois/etc/gwhois/pattern.d/

        # QA Monitor
        install -oroot -gstaff -m0644 etc/maintenance/qa-monitor.conf debian/gwhois/etc/gwhois/maintenance/

        # Pattern Generator
        install -oroot -gstaff -m0644 etc/maintenance/gwhois-pattern-update.conf debian/gwhois/etc/gwhois/maintenance/

        # Shared between QA Monitor and Pattern Generator
        install -oroot -gstaff -m0644 etc/maintenance/urls.conf debian/gwhois/etc/gwhois/maintenance/

        # Whois Server Ping
        install -oroot -gstaff -m0644 etc/maintenance/dead-servers.list debian/gwhois/etc/gwhois/maintenance/

        # Testcases
        install -oroot -gstaff -m0644 etc/maintenance/testcases.conf debian/gwhois/etc/gwhois/maintenance/
        install -oroot -gstaff -m0644 etc/maintenance/testcases.list debian/gwhois/etc/gwhois/maintenance/
        install -oroot -gstaff -m0644 etc/maintenance/testcases.annot debian/gwhois/etc/gwhois/maintenance/

        # SUB PROGRAMS

        install -d debian/gwhois/usr/share/gwhois/subprograms

        install -oroot -gstaff -m0755 share/subprograms/bi debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/bm debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/pe debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/cu debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/ac debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/pa debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/oid debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/6to4_decoder debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/teredo_decoder debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/gt debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/gov debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/gu debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/vi debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/vu debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/sh debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/tt debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/pk debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/sn debian/gwhois/usr/share/gwhois/subprograms/
        install -oroot -gstaff -m0755 share/subprograms/mq_gf_gp debian/gwhois/usr/share/gwhois/subprograms/

        install -d debian/gwhois/usr/share/gwhois/includes
        install -oroot -gstaff -m0644 share/includes/config_functions.inc.php debian/gwhois/usr/share/gwhois/includes/
        install -oroot -gstaff -m0644 share/includes/common_functions.inc.php debian/gwhois/usr/share/gwhois/includes/
        install -oroot -gstaff -m0644 share/includes/gwi_functions.inc.php debian/gwhois/usr/share/gwhois/includes/
        install -oroot -gstaff -m0644 share/includes/grep_functions.inc.php debian/gwhois/usr/share/gwhois/includes/
        install -oroot -gstaff -m0644 share/includes/ipv4_functions.inc.php debian/gwhois/usr/share/gwhois/includes/
        install -oroot -gstaff -m0644 share/includes/ipv6_functions.inc.php debian/gwhois/usr/share/gwhois/includes/
        install -oroot -gstaff -m0644 share/includes/idna_convert.class.php debian/gwhois/usr/share/gwhois/includes/

        install -d debian/gwhois/usr/share/gwhois/includes/GWhoIs
        install -oroot -gstaff -m0644 share/includes/GWhoIs/Core.pm debian/gwhois/usr/share/gwhois/includes/GWhoIs/
        install -oroot -gstaff -m0644 share/includes/GWhoIs/Utils.pm debian/gwhois/usr/share/gwhois/includes/GWhoIs/
        install -oroot -gstaff -m0644 share/includes/GWhoIs/OID.pm debian/gwhois/usr/share/gwhois/includes/GWhoIs/
        install -oroot -gstaff -m0644 share/includes/GWhoIs/IPv4.pm debian/gwhois/usr/share/gwhois/includes/GWhoIs/
        install -oroot -gstaff -m0644 share/includes/GWhoIs/IPv6.pm debian/gwhois/usr/share/gwhois/includes/GWhoIs/

        # MAINTENANCE FRAMEWORK

        install -d debian/gwhois/usr/share/gwhois/maintenance
        install -oroot -gstaff -m0755 share/maintenance/qa-audit debian/gwhois/usr/share/gwhois/maintenance/
        install -oroot -gstaff -m0755 share/maintenance/global-syntax-check debian/gwhois/usr/share/gwhois/maintenance/

        # WHOIS SERVER PING

        install -d debian/gwhois/usr/share/gwhois/maintenance/whois-ping

        install -oroot -gstaff -m0755 share/maintenance/whois-ping/whoisping_cronrun debian/gwhois/usr/share/gwhois/maintenance/whois-ping/
        install -oroot -gstaff -m0755 share/maintenance/whois-ping/whoisping debian/gwhois/usr/share/gwhois/maintenance/whois-ping/
        install -oroot -gstaff -m0644 share/maintenance/whois-ping/config.inc.php debian/gwhois/usr/share/gwhois/maintenance/whois-ping/
        install -oroot -gstaff -m0644 share/maintenance/whois-ping/whoisping_functions.inc.php debian/gwhois/usr/share/gwhois/maintenance/whois-ping/
        install -oroot -gstaff -m0755 share/maintenance/whois-ping/showerrors debian/gwhois/usr/share/gwhois/maintenance/whois-ping/

        # QA MONITOR

        install -d debian/gwhois/usr/share/gwhois/maintenance/qa-monitor

        install -oroot -gstaff -m0644 share/maintenance/qa-monitor/config.inc.php debian/gwhois/usr/share/gwhois/maintenance/qa-monitor/
        install -oroot -gstaff -m0755 share/maintenance/qa-monitor/run debian/gwhois/usr/share/gwhois/maintenance/qa-monitor/

        # PATTERN GENERATOR

        install -d debian/gwhois/usr/share/gwhois/maintenance/pattern-generator

        install -oroot -gstaff -m0755 share/maintenance/pattern-generator/generate_asn debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0755 share/maintenance/pattern-generator/generate_tld debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0755 share/maintenance/pattern-generator/generate_domains debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0755 share/maintenance/pattern-generator/generate_ipv4 debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0755 share/maintenance/pattern-generator/generate_ipv6 debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0755 share/maintenance/pattern-generator/gwhois-pattern-update debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0755 share/maintenance/pattern-generator/sync_rir_stats debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/

        install -oroot -gstaff -m0644 share/maintenance/pattern-generator/rirs.inc.php debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0644 share/maintenance/pattern-generator/iana_functions.inc.php debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0644 share/maintenance/pattern-generator/config.inc.php debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0644 share/maintenance/pattern-generator/info debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/
        install -oroot -gstaff -m0644 share/maintenance/pattern-generator/rir_bugs.info debian/gwhois/usr/share/gwhois/maintenance/pattern-generator/

        # TESTCASES

        install -d debian/gwhois/usr/share/gwhois/maintenance/testcases

        install -oroot -gstaff -m0644 share/maintenance/testcases/todo debian/gwhois/usr/share/gwhois/maintenance/testcases/
        install -oroot -gstaff -m0755 share/maintenance/testcases/batch debian/gwhois/usr/share/gwhois/maintenance/testcases/
        install -oroot -gstaff -m0755 share/maintenance/testcases/single debian/gwhois/usr/share/gwhois/maintenance/testcases/
        install -oroot -gstaff -m0755 share/maintenance/testcases/status debian/gwhois/usr/share/gwhois/maintenance/testcases/
        install -oroot -gstaff -m0755 share/maintenance/testcases/status_short debian/gwhois/usr/share/gwhois/maintenance/testcases/
        install -oroot -gstaff -m0755 share/maintenance/testcases/testcases_cronrun debian/gwhois/usr/share/gwhois/maintenance/testcases/
        install -oroot -gstaff -m0755 share/maintenance/testcases/allpatterns debian/gwhois/usr/share/gwhois/maintenance/testcases/
        install -oroot -gstaff -m0755 share/maintenance/testcases/loc_gwhois debian/gwhois/usr/share/gwhois/maintenance/testcases/
        install -oroot -gstaff -m0755 share/maintenance/testcases/highlighter debian/gwhois/usr/share/gwhois/maintenance/testcases/
        install -oroot -gstaff -m0755 share/maintenance/testcases/coverage debian/gwhois/usr/share/gwhois/maintenance/testcases/

        # CACHE DIRECTORY (for maintenance tools)

        install -d debian/gwhois/var/cache/gwhois
        install -d debian/gwhois/var/cache/gwhois/maintenance
        install -d debian/gwhois/var/cache/gwhois/maintenance/whois-server-ping
        install -d debian/gwhois/var/cache/gwhois/maintenance/pattern-generator
        install -d debian/gwhois/var/cache/gwhois/maintenance/pattern-generator/rirstats
        install -d debian/gwhois/var/cache/gwhois/maintenance/pattern-generator/iana
        install -d debian/gwhois/var/cache/gwhois/maintenance/cache
        install -d debian/gwhois/var/cache/gwhois/maintenance/testcases
        install -d debian/gwhois/var/cache/gwhois/maintenance/testcases/checktimestamps
        install -d debian/gwhois/var/cache/gwhois/maintenance/testcases/problems
        install -d debian/gwhois/var/cache/gwhois/maintenance/testcases/expected

        # LINTIAN

        install -oroot -groot -m0644 debian/lintian debian/gwhois/usr/share/lintian/overrides/gwhois

# Build architecture-independent files here.
binary-indep: build install
        dh_testdir
        dh_testroot
        dh_installchangelogs 
        dh_installdocs
        dh_installexamples
#        dh_install
#        dh_installmenu
        dh_installdebconf
#        dh_installlogrotate
#        dh_installemacsen
#        dh_installpam
#        dh_installmime
#        dh_installinit
        dh_installcron
#        dh_installinfo
        dh_installman man/man1/gwhois.1
        dh_link
        dh_strip
        dh_compress
        dh_fixperms
#        dh_perl
#        dh_python
#        dh_makeshlibs
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
        dh_md5sums
        dh_builddeb

binary-arch: build install
# We have nothing to do 

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure