]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
add pdns-tools deb
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Tue, 25 Jun 2013 14:27:43 +0000 (16:27 +0200)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Wed, 26 Jun 2013 07:25:41 +0000 (09:25 +0200)
debian-pdns/control
debian-pdns/rules

index 1edbe7a5864d999c9b2ac8f575832ad484bf0ffe..154102be88050998df44193384218eab159dad07 100644 (file)
@@ -28,6 +28,18 @@ Description: static version of pDNS
  can be used on older Debian releases for which no dynamic version
  is available.
 
+Package: pdns-tools
+Architecture: any
+Recommends: pdns-doc
+Conflicts: pdns-server
+Description: static version of pDNS tools
+ PowerDNS is a versatile nameserver which supports a large number
+ of different backends ranging from simple zonefiles to relational
+ databases and load balancing/failover algorithms.
+ .
+ This package contains a collection of tools based on the core
+ PowerDNS libraries.
+
 Package: pdns-doc
 Section: doc
 Architecture: all
index daf06d7e3a6766e3da6b071ce3680c59506aeaef..9b585d9755d6f917d4563eef193c9e81ac537af2 100755 (executable)
@@ -2,6 +2,7 @@
 
 tmpdir         := $(shell pwd)/debian-pdns/tmp
 be_tmpdir      := $(shell pwd)/debian-pdns/tmp-backend
+tools_tmpdir:= $(shell pwd)/debian-pdns/tmp-tools
 backends       := opendbx ldap pipe gmysql gpgsql gsqlite3
 debs           := opendbx ldap pipe pgsql sqlite sqlite3
 
@@ -53,8 +54,10 @@ build-static stamp-build-static:
                --with-modules="gmysql gpgsql pipe gsqlite3 lua geo tinydns mydns opendbx remote" \
                --with-dynmodules="" \
                --enable-botan1.10 --enable-cryptopp \
-               --enable-static-binaries 
+               --enable-static-binaries \
+               --enable-tools
        make -j4
+
        touch stamp-build-static
 
 
@@ -75,13 +78,15 @@ build stamp-build: configure
 binary-main-prepare: 
        rm -f debian-pdns/substvars
        rm -rf "$(tmpdir)" "$(tmpdir)"-*
+       rm -rf "$(tools_tmpdir)" "$(tools_tmpdir)"-*
        install -d -m 755 -o root -g root "$(tmpdir)"
+       install -d -m 755 -o root -g root "$(tools_tmpdir)"
        make DESTDIR="$(tmpdir)" install
 
        rm -f "$(tmpdir)"/usr/bin/binpatch
        rm -f "$(tmpdir)"/usr/bin/zone2ldap
        rm -rf "$(tmpdir)"/usr/lib
-
+       rm -f "$(tmpdir)"/usr/share/man/man8/zone2ldap.8
        strip --remove-section=.comment --remove-section=.note \
                --strip-unneeded \
                "$(tmpdir)"/usr/bin/zone2sql \
@@ -112,6 +117,31 @@ binary-main-prepare:
                        "$(tmpdir)"/DEBIAN/conffiles
 
 
+       install -d -m 755 -o root -g root \
+               "$(tools_tmpdir)"/usr/bin
+       install -d -m 755 -o root -g root \
+               "$(tools_tmpdir)"/usr/share/man/man8
+       install -d -m 755 -o root -g root \
+               "$(tools_tmpdir)"/usr/share/doc/pdns-tools
+       install -p -m 644 -o root -g root debian-pdns/changelog \
+                       "$(tools_tmpdir)"/usr/share/doc/pdns-tools/changelog.Debian
+       gzip -9 "$(tools_tmpdir)"/usr/share/doc/pdns-tools/c*
+       install -p -m 644 -o root -g root debian-pdns/copyright \
+                       "$(tools_tmpdir)"/usr/share/doc/pdns-tools/
+
+       install -d -m 755 -o root -g root "$(tools_tmpdir)"/DEBIAN
+
+       for prog in dnsbulktest dnsreplay dnsscan dnsscope dnstcpbench dnswasher nproxy nsec3dig ; do \
+               mv "$(tmpdir)"/usr/bin/$$prog "$(tools_tmpdir)"/usr/bin ; \
+               [ -e "$(tmpdir)"/usr/share/man/man8/"$$prog".8 ] && \
+                       mv "$(tmpdir)"/usr/share/man/man8/"$$prog".8 "$(tools_tmpdir)"/usr/share/man/man8/ ; \
+               strip --remove-section=.comment --remove-section=.note \
+                       --strip-unneeded \
+                       "$(tools_tmpdir)"/usr/bin/"$$prog" ; \
+       done
+
+
+
 binary-main: stamp-build binary-main-prepare
        dpkg-shlibdeps -Tdebian-pdns/substvars "$(tmpdir)"/usr/bin/zone2sql \
                "$(tmpdir)"/usr/sbin/pdns_server \
@@ -122,8 +152,9 @@ binary-main: stamp-build binary-main-prepare
 
 binary-static: stamp-build-static binary-main-prepare
        dpkg-gencontrol -fdebian-pdns/files -cdebian-pdns/control -ldebian-pdns/changelog  -isp -ppdns-static -P"$(tmpdir)"
+       dpkg-gencontrol -fdebian-pdns/files -cdebian-pdns/control -ldebian-pdns/changelog  -isp -ppdns-tools -P"$(tools_tmpdir)"
        dpkg --build "$(tmpdir)" ..
-
+       dpkg --build "$(tools_tmpdir)" ..
 
 binary-backend: stamp-build
        rm -rf "$(tmpdir)"