--- tinydnssec-1.1.0.orig/debian/changelog
+++ tinydnssec-1.1.0/debian/changelog
@@ -0,0 +1,67 @@
+tinydnssec (1.1.0-1.1+9.8) stable; urgency=low
+
+  * version number update by debtransform
+
+ -- debtransform <build@opensuse.org>  Sat, 11 Jul 2026 13:58:43 +0000
+
+tinydnssec (1.1.0-1.1) stable; urgency=low
+
+  * Added dnsgetroot
+  * added str_diffn()
+  * added comments for dempsky's patch djbdns<=1.05 lets AXFRed subdomains overwrite domains
+  * fixed debian/prerm script
+  * added selinux rules for tinydns
+  * added Pre-Depends daemontools
+  * remove tinydns, dnscache service on uninstall
+  * shutdown tinydns, dnsccache service on uninstall
+  * added compile time option to add dnssec support
+  * tinydnssec - added SRV patch
+  * added native SRV type to tinydns-data
+  * makes axfr-get decompose SRV and PTR records and write them out in native format
+  * added curvedns
+  * fixed typo in debian/postrm.in
+  * (rpm, debian) - create tinydnssec, dqcache, curvedns service config
+  * added dqcache-conf, curvedns-conf programs
+  * added compile time option to add dnssec, curvedns support
+  * added djbdns.7 man page
+  * Changed dns accounts to Gtinydns, Gdnslog, Gdnscache
+  * added man page for random-ip, dnsgetroot
+  * use qmaill for loguser
+  * upgraded dnscurve to version 0.88
+  * added call to setgroups(0, 0) to drop supplementary groups
+  * fixed tryshsgr.c
+  * create/delete UNSHARE variable during installation/uninstallation
+  * turn on/off executable bit on svscan run file on install/removal of tinydnssec
+  * tinydnssec.spec, debian/preinst.in debian/postinst.in - fixes for service shutdown startup on upgrade
+  * query.[c,h]: Increase QUERY_MAXLEVEL to 10 from 5 to fix dnscache CNAME chain lookup problem with gluelessness & improve short ttl cname resolution and glueless answer from akadnsk
+  * query.c, dnscache.c: use env variable QUERY_MAXNS, QUERY_MAXALIAS, QUERY_MAXLOOP, QUERY_MAXLEVEL to set maxns, max alias, max iteration and max level
+  * dnscaache-conf: create env/QUERY_MAXLOOP
+  * use libqmail for common functions
+  * Makefile: added iopause.h depdendency for dns.h
+  * Makefile: use -lssl -lcrypto for programs using sha1.o
+  * fixed warnings from -Warray-parameter
+  * Use internal SHA1 functions and remove -lssl -lcrypto from linker command line
+  * postinstall/postremove: update code to set/unset resolvconf in svscan if running under supervise
+  * Makefile: made prefix, sysconfdir, servicedir configureable using Makevars
+  * updated svscan resolvconf service if dnscache is configured
+  * added dnssvc tool to configure dnscache setup for source installs
+  * updated service/resolvconf/variables/.options when updating service/.svscan/variables/.options
+  * postinst scripts: create /service/dnscache link if missing
+  * dnscache.c: added SIGTERM handler to exit 0. Elminates crashed messages in supervise logs
+  * replaced setup with installer to make installation more configurable
+  * PKGBUILD: fixed variables
+  * PKGBUILD: change sbin to bin in installer input file SBIN, DIRS.in
+  * changed dns account names to dnscache, tinydns
+  * PKGBUILD: fix permissions of installed files in destdir
+  * PKGBUILD: replaced DESTDIR with pkgdir
+  * installer.c: set default permissions when mode=-1
+  * added permission files for indimail-mta
+  * autotoolize curvedns and build with libsodium
+  * cache_hashtable.c: function cache_destroy fixed usage of variable 'table' after free
+  * dnsip.c, dnsipq.c, dnsname.c, dnsmx.c, dnstxt.c, dnsqr.c, dnsq.c, dnstrace.c: exit 111 if unable to write to subfdout
+  * dnssvc.in, tinydnssec.in, debian/postinst, debian/postrm: Fixed setting UNSHARE environment variable in /service/.svscan/variables
+  * dnstxt.c: fixed infinite loop
+  * added instcheck-tinydnssec man page
+  * fixed compiler warnings for gcc14
+
+ -- Manvendra Bhangui <tinydnssec@indimail.org>  Mon, 24 Mar 2025 13:46:27 +0000
--- tinydnssec-1.1.0.orig/debian/compat
+++ tinydnssec-1.1.0/debian/compat
@@ -0,0 +1 @@
+10
--- tinydnssec-1.1.0.orig/debian/control
+++ tinydnssec-1.1.0/debian/control
@@ -0,0 +1,71 @@
+Source: tinydnssec
+Section: misc
+Priority: optional
+Maintainer: Manvendra Bhangui <tinydnssec@indimail.org>
+Standards-Version: 3.9.1
+Build-Depends: cdbs, debhelper (>= 9), m4, autotools-dev, binutils, coreutils, libev-dev, libqmail-dev
+Homepage: http://indimail.sourceforge.net
+
+Package: tinydnssec
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, net-tools, coreutils, binutils
+Pre-Depends: daemontools
+Recommends: daemontools, ucspi-tcp
+Description: a collection of Domain Name System tools
+ This package includes software for all the fundamental DNS operations:
+ .
+ DNS cache: finding addresses of Internet hosts.  When a browser wants to
+ contact www.yahoo.com, it first asks a DNS cache, such as djbdns's
+ dnscache, to find the IP address of www.yahoo.com.  Internet service
+ providers run dnscache to find IP addresses requested by their customers.
+ If you're running a home computer or a workstation, you can run your own
+ dnscache to speed up your web browsing.
+ .
+ DNS server: publishing addresses of Internet hosts.  The IP address of
+ www.yahoo.com is published by Yahoo's DNS servers.  djbdns includes
+ a general-purpose DNS server, tinydns; network administrators run tinydns
+ to publish the IP addresses of their computers.  djbdns also includes
+ special-purpose servers for publishing DNS walls and RBLs.
+ .
+ DNS client: talking to a DNS cache.  djbdns includes a DNS client C
+ library and several command-line DNS client utilities.  Programmers use
+ these tools to send requests to DNS caches.
+ .
+ djbdns also includes several DNS debugging tools, notably dnstrace, which
+ administrators use to diagnose misconfigured remote servers.
+ .
+ See http://cr.yp.to/djbdns.html
+ .
+ DQ: a package with DNS/DNSCurve related software.
+ It contains a recursive DNS server with DNSCurve support called
+ dqcache and also a commandline tool to debug DNS/DNScurve called dq.
+ .
+ See https://mojzis.com/software/dq/
+ .
+ CurveDNS: CurveDNS is the first publicly released forwarding implementation
+ that implements the DNSCurve protocol.  DNSCurve uses high-speed
+ high-security elliptic-curve cryptography to drastically improve every
+ dimension of DNS security.
+ .
+ See http://dnscurve.org/ for protocol details.
+ .
+ curvedns allows any authoritative DNS name server to act as a DNSCurve
+ capable one, without changing anything on your current DNS environment.
+ The only thing a DNS data manager (that is probably you) has to do is
+ to install CurveDNS on a machine, generate a keypair, and update NS
+ type records that were pointing towards your authoritative name server
+ and let them point to this machine running CurveDNS. Indeed, it is that
+ easy to become fully protected against almost any of the currently known
+ DNS flaws, such as active and passive cache poisoning.
+ .
+ CurveDNS supports:
+  * Forwarding of regular (non-protected) DNS packets;
+  * Unboxing of DNSCurve queries and forwarding the regular DNS packets
+  * Boxing of regular DNS responses to DNSCurve responses;
+  * Both DNSCurve's streamlined- and TXT-format;
+  * Caching of shared secrets;
+  * Both UDP and TCP;
+  * Both IPv4 and IPv6.
+ .
+ See http://curvedns.on2it.net/
+ .
--- tinydnssec-1.1.0.orig/debian/copyright
+++ tinydnssec-1.1.0/debian/copyright
@@ -0,0 +1,44 @@
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Name: IndiMail
+Maintainer: Manvendra Bhangui <tinydnssec@indimail.org>
+Source: http://cr.yp.to/djbdns.html
+
+Copyright: 2008-2020, Manvendra Bhangui <mbhangui@gmail.com>
+Copyright: And many others
+License: GPL-3+
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 3 can be found in the file
+ `/usr/share/common-licenses/GPL-3'.
+
+License: LGPL-3+
+ This library is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the full text of the GNU Lesser General Public
+ License version 3 can be found in the file
+ `/usr/share/common-licenses/LGPL-3'.
--- tinydnssec-1.1.0.orig/debian/postinst
+++ tinydnssec-1.1.0/debian/postinst
@@ -0,0 +1,180 @@
+#!/bin/sh
+set -e
+
+prefix=/usr
+sysconfdir=/etc/indimail
+servicedir=/service
+
+ID=`id -u`
+if [ $ID -ne 0 ] ; then
+  echo "You are not root" >&2
+  exit 1
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+# we are doing upgrade or removal
+
+upgrade=0
+case "$1" in
+  configure)
+  if [ -f /tmp/tinydnssec/.install ] ; then
+    /bin/rm -rf /tmp/tinydnssec
+    upgrade=0
+  else
+    if [ -n "$2" ] ; then
+      upgrade=1
+    fi
+  fi
+  ;;
+
+  abort-upgrade|abort-remove|abort-deconfigure)
+  exit 0
+  ;;
+
+  *)
+  echo "postinst called with unknown argument \`$1'" >&2
+  exit 1
+  ;;
+esac
+
+configure_resolvconf()
+{
+dnscache_configured=0
+if [ -d ${sysconfdir}/dnscache ] ; then
+  dnscache_configured=1
+  if [ -d ${servicedir} ] ; then
+    if [ ! -h ${servicedir}/dnscache ] ; then
+      ln -sf ${sysconfdir}/dnscache ${servicedir}/dnscache || true
+      if [ $? -ne 0 ] ; then
+        dnscache_configured=0
+      fi
+    fi
+  elif [ -h ${servicedir} ] ; then
+    dir=`readlink ${servicedir}`
+    if [ -d $dir ] ; then
+      if [ ! -h $dir/dnscache ] ; then
+        ln -sf ${sysconfdir}/dnscache $dir/dnscache || true
+        if [ $? -ne 0 ] ; then
+          dnscache_configured=0
+        fi
+      fi
+    fi
+  fi
+fi
+if [ $dnscache_configured -eq 1 ] ; then
+  if [ -d ${servicedir}/.svscan ] ; then
+    mkdir -p ${servicedir}/.svscan/variables
+    if [ ! -f ${servicedir}/.svscan/variables/UNSHARE ] ; then
+      echo > ${servicedir}/.svscan/variables/UNSHARE # used by svscanboot
+    fi
+    if [ -x /usr/bin/unshare -a -x ${servicedir}/dnscache/run ] ; then
+      if [ -f ${servicedir}/.svscan/run ] ; then
+        /bin/chmod +x ${servicedir}/.svscan/run
+      fi
+    fi
+    grep resolvconf ${servicedir}/.svscan/variables/.options > /dev/null 2>&1
+    if [ $? -ne 0 -a -f ${servicedir}/.svscan/variables/.options ] ; then
+      options="`cat ${servicedir}/.svscan/variables/.options`"
+      options="$options --resolvconf"
+      mv ${servicedir}/.svscan/variables/.options \
+        ${servicedir}/.svscan/variables/.options.noresolvconf
+      echo $options > ${servicedir}/.svscan/variables/.options
+      if [ -d ${servicedir}/resolvconf/variables ] ; then
+       echo $options > ${servicedir}/resolvconf/variables/.options
+      fi
+      if [ -x ${prefix}/sbin/minisvc ] ; then
+        ${prefix}/sbin/minisvc --refreshsvc=/service/.svscan --force
+      fi
+    fi
+  fi
+fi
+}
+
+if [ $upgrade -eq 1 ] ; then
+  set +e
+  configure_resolvconf
+  # end of of resolvconf config
+  if [ -f ${prefix}/bin/svok ] ; then
+    for i in tinydns tinydns/log dnscache dnscache/log curvedns curvedns/log dqcache dqcache/log
+    do
+      ${prefix}/bin/svok ${sysconfdir}/$i >/dev/null 2>&1
+      if [ $? -eq 0 -a -f ${sysconfdir}/$i/.down ] ; then
+        /bin/rm -f ${sysconfdir}/$i/.down
+        ${prefix}/bin/svc -u ${sysconfdir}/$i >/dev/null 2>&1
+      fi
+    done
+  fi
+  set -e
+  exit 0
+fi
+
+/bin/rmdir --ignore-fail-on-non-empty ${sysconfdir}/dnscache 2>/dev/null
+/bin/rmdir --ignore-fail-on-non-empty ${sysconfdir}/tinydns 2>/dev/null
+
+dnscache_configured=0
+if [ ! -d ${sysconfdir}/dnscache ] ; then
+  set +e
+  ${prefix}/sbin/dnscache-conf dnscache qmaill ${sysconfdir}/dnscache 127.0.0.1 || true
+  if [ $? -eq 0 ] ; then
+    dnscache_configured=1
+    if [ -d ${servicedir} ] ; then
+      if [ ! -h ${servicedir}/dnscache ] ; then
+        ln -sf ${sysconfdir}/dnscache ${servicedir}/dnscache || true
+        if [ $? -ne 0 ] ; then
+          dnscache_configured=0
+        fi
+      fi
+    elif [ -h ${servicedir} ] ; then
+      dir=`readlink ${servicedir}`
+      if [ -d $dir ] ; then
+        if [ ! -h ${servicedir}/dnscache ] ; then
+          ln -sf ${sysconfdir}/dnscache ${servicedir}/dnscache || true
+          if [ $? -ne 0 ] ; then
+            dnscache_configured=0
+          fi
+        fi
+      fi
+    fi
+  else
+    echo "${prefix}/sbin/dnscache-conf dnscache qmaill ${sysconfdir}/dnscache 127.0.0.1: failed"
+  fi
+else
+  dnscache_configured=1
+  if [ ! -h /service/dnscache ] ; then
+    ln -s ${_sysconfdir}/dnscache /service/dnscache
+  fi
+fi
+configure_resolvconf
+set -e
+
+for i in tinydns dqcache curvedns
+do
+  if [ " $i" = " dqcache" ] ; then
+    acct=dnscache
+  else
+    acct=tinydns
+  fi
+  if [ " $i" = " curvedns" ] ; then
+    ip=x.x.x.x
+  else
+    ip=127.0.0.1
+  fi
+  if [ ! -d ${sysconfdir}/$i ] ; then
+    ${prefix}/sbin/$i-conf $acct qmaill ${sysconfdir}/$i $ip || true
+    if [ ! " $i" = " curvedns" ] ; then
+      continue
+    fi
+    if [ -d ${sysconfdir}/$i ] ; then
+      mask=`umask`
+      umask 077
+      # Generate private key
+      sed -n \$p ${sysconfdir}/curvedns/private.key > ${sysconfdir}/$i/curvedns.keygen
+      /bin/sh ${sysconfdir}/$i/curvedns.keygen && /bin/rm -f ${_sysconfdir}/$i/curvedns.keygen
+      umask $mask
+    fi
+  fi
+done
--- tinydnssec-1.1.0.orig/debian/postrm
+++ tinydnssec-1.1.0/debian/postrm
@@ -0,0 +1,88 @@
+#!/bin/sh
+# postrm script for indimail
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+prefix=/usr
+sysconfdir=/etc/indimail
+servicedir=/service
+rm=/bin/rm
+rmdir=/bin/rmdir
+####################################
+default_domain=indimail.org
+
+ID=`id -u`
+if [ $ID -ne 0 ] ; then
+	echo "You are not root" >&2
+	exit 1
+fi
+
+case "$1" in
+    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+# we are doing upgrade or removal
+if [ " $1" = " upgrade" ] ; then
+	exit 0
+fi
+
+case "$1" in
+    failed-upgrade|abort-install|abort-upgrade|disappear)
+	exit 0
+    ;;
+esac
+if [ -d ${servicedir}/.svscan -a -d ${servicedir}/.svscan/variables ] ; then
+  if [ -s ${servicedir}/.svscan/variables/UNSHARE ] ; then
+    /bin/rm -f ${servicedir}/.svscan/variables/UNSHARE
+  fi
+  if [ -x /usr/bin/unshare -a -x ${servicedir}/dnscache/run -a -f ${servicedir}/.svscan/run ] ; then
+    /bin/chmod -x ${servicedir}/.svscan/run
+  fi
+fi
+if [ " $1" = " purge" ] ; then
+	for i in dnscache tinydns
+	do
+		echo "removing user $i"
+		/usr/bin/getent passwd $i > /dev/null && /usr/sbin/userdel $i >/dev/null || true
+		${rm} -f /var/spool/mail/$i
+	done
+	sleep 5
+
+	echo "removing configuration"
+	${rm} -f ${servicedir}/dnscache ${servicedir}/tinydns ${servicedir}/curvedns ${servicedir}/dqcache
+	for i in tinydns dnscache dqcache dnscurve
+	do
+		${rm} -rf ${sysconfdir}/$i
+	done
+	${rm} -f ${sysconfdir}/dnsroots.global
+	${rm} -f ${sysconfdir}/dnsroots.local
+	${rm} -f ${sysconfdir}/dnsroots.local
+fi
+exit 0
--- tinydnssec-1.1.0.orig/debian/preinst
+++ tinydnssec-1.1.0/debian/preinst
@@ -0,0 +1,71 @@
+#!/bin/sh
+# preinst script for indimail
+#
+# see: dh_installdeb(1)
+
+set -e
+prefix=/usr
+sysconfdir=/etc/indimail
+rm=/bin/rm
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+ID=`id -u`
+if [ $ID -ne 0 ] ; then
+	echo "You are not root" >&2
+	exit 1
+fi
+
+case "$1" in
+    upgrade)
+	set +e
+	if [ -f ${prefix}/bin/svstat ] ; then
+		for i in tinydns tinydns/log dnscache dnscache/log curvedns curvedns/log dqcache dqcache/log
+		do
+			${prefix}/bin/svstat ${sysconfdir}/$i >/dev/null 2>&1
+			if [ $? -eq 0 ] ; then
+				touch ${ssysconfdir}/$i/.down
+				${prefix}/bin/svc -d ${sysconfdir}/$i >/dev/null 2>&1
+			fi
+		done
+	fi
+	set -e
+	;;
+    install)
+	mkdir -p /tmp/tinydnssec
+	chmod 700 /tmp/tinydnssec
+	touch /tmp/tinydnssec/.install
+	#
+	# Create a users and groups. Do not report any problems if they already
+	# exists.
+	#
+	for i in Gdnscache Gtinydns
+	do
+		${rm} -f /var/spool/mail/$i
+		/usr/bin/getent passwd $i > /dev/null || ( echo "Adding tinydns users/groups" && \
+			/usr/sbin/useradd -l -M -g nofiles  -d ${sysconfdir} -s /sbin/nologin $i)
+	done
+	
+	;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- tinydnssec-1.1.0.orig/debian/prerm
+++ tinydnssec-1.1.0/debian/prerm
@@ -0,0 +1,66 @@
+#!/bin/sh
+# prerm script for indimail
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+prefix=/usr
+sysconfdir=/etc/indimail
+rm=/bin/rm
+mv=/bin/mv
+
+ID=`id -u`
+if [ $ID -ne 0 ] ; then
+	echo "You are not root" >&2
+	exit 1
+fi
+
+case "$1" in
+    remove|deconfigure)
+	echo "Giving dns services exactly 5 seconds to exit nicely" 1>&2
+	for i in tinydns dnscache curvedns dqcache
+	do
+		/usr/bin/svc -dx ${sysconfdir}/$i ${sysconfdir}/$i/log >/dev/null 2>&1|| true
+	done
+	sleep 5
+	;;
+    upgrade)
+	for i in tinydns dnscache curvedns dqcache
+	do
+		/usr/bin/svc -dx ${sysconfdir}/$i ${sysconfdir}/$i/log >/dev/null 2>&1|| true
+	done
+	sleep 5
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+# we are doing upgrade
+if [ " $1" = " upgrade" -o " $1" = " deconfigure" ] ; then
+	exit 0
+fi
+
+exit 0
--- tinydnssec-1.1.0.orig/debian/rules
+++ tinydnssec-1.1.0/debian/rules
@@ -0,0 +1,102 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+# export DH_COMPAT=10
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+prefix=/usr
+sysconfdir=/etc/indimail
+version=1.05
+curvedns_version=0.88
+#
+DESTDIR=$(CURDIR)/debian/tinydnssec.tmp
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+	#
+	# Extract source archives
+	#
+	# run make
+	#
+	./default.configure
+	$(MAKE) -s
+	pod2man -s 8 -c '' "tinydns-sign" >tinydns-sign.8
+	if [ -d dq-20161210 ] ; then \
+		cd dq-20161210; \
+		$(MAKE) -s; \
+		cd ..; \
+	fi
+	if [ -d curvedns-$(curvedns_version) ] ; then \
+    	echo "configuring curvedns"; \
+  		cd curvedns-$(curvedns_version); \
+		./default.configure; \
+		$(MAKE) -s; \
+		cd ..; \
+	fi
+	( \
+	echo NAME=tinydnssec; \
+	echo Description=\"A collection of Domain Name System tools\"; \
+	echo ezmlm-idx_version=$(version)-$(release); \
+	echo ID=tinydnssec; \
+	echo HOME_URL="https://github.com/mbhangui/tinydnssec"; \
+	echo PACKAGE_BUGREPORT=\"'@email@'\"; \
+	) > tinydnssec-release
+	touch build-stamp
+
+clean:
+	rm -f build-stamp configure-stamp
+	/bin/rm -rf $(DESTDIR)
+	$(MAKE) -s clean; $(MAKE) -s distclean || true
+	dh_testdir
+	dh_testroot
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep || dh_clean -k
+	dh_installdirs
+	$(MAKE) DESTDIR=$(DESTDIR) -s install
+	if [ -d dq-20161210 ] ; then \
+		cd dq-20161210; \
+  		sh make-install.sh $(DESTDIR); \
+		cd ..; \
+	fi
+	if [ -d curvedns-$(curvedns_version) ] ; then \
+		cd curvedns-$(curvedns_version); \
+	    $(MAKE) DESTDIR=$(DESTDIR) -s install; \
+		cd ..; \
+	fi
+	install -m 0644 tinydnssec-release "$(DESTDIR)$(sysconfdir)"/tinydnssec-release
+	/bin/rm -f tinydnssec-release
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_install --sourcedir=$(DESTDIR) -ptinydnssec
+	dh_installchangelogs
+	dh_installdocs doc dq-20161210/README-dq.md dq-20161210/INSTALL-dq.md doc doc/README-ipv6.tinydnssec \
+		doc/djbdnsFAQ.pdf doc/HOWTO doc/README-tinydnssec.md curvedns-$(curvedns_version)/INSTALL-curvedns.md \
+		curvedns-$(curvedns_version)/README-curvedns.md doc/LifeWithdjbdns.pdf \
+		doc/README.dnstransmit.bug doc/Thedjbway_djbdns.pdf dq-20161210/LICENCE-dq.md \
+		curvedns-$(curvedns_version)/LICENSE.curvedns doc/COPYING.tinydnssec README.md
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here. 
+binary-arch: build install
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- tinydnssec-1.1.0.orig/debian/tinydnssec.install
+++ tinydnssec-1.1.0/debian/tinydnssec.install
@@ -0,0 +1,4 @@
+etc/indimail /etc
+usr/bin /usr
+usr/share /usr
+usr/libexec/indimail /usr/libexec
