#!/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
+PACKAGE = $(shell dh_listpackages)
+TMP = $(CURDIR)/debian/$(PACKAGE)
-include /usr/share/quilt/quilt.make
+export DEB_BUILD_MAINT_OPTIONS := hardening=+pie,+bindnow
-CFLAGS = -Wall -g
+%:
+ dh $@
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-configure: configure-stamp
-configure-stamp: $(QUILT_STAMPFN)
- dh_testdir
- touch $@
-
-build: build-stamp
-build-stamp: configure-stamp
- dh_testdir
- CFLAGS="$(CFLAGS)" $(MAKE)
- CFLAGS="$(CFLAGS)" $(MAKE) test
- touch $@
-
-clean: unpatch
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp install-stamp
- $(MAKE) clean
+override_dh_auto_clean:
debconf-updatepo
- dh_clean
-
-install: install-stamp
-install-stamp: build-stamp
- dh_testdir
- dh_testroot
- $(MAKE) install prefix=debian/iodine/usr
- touch $@
+ dh_auto_clean
+override_dh_auto_build:
+ dh_auto_build
+ [ -x $(CURDIR)/debian/iodine-client-start ] || chmod +x $(CURDIR)/debian/iodine-client-start
+ help2man --output=$(CURDIR)/debian/iodine-client-start.8 \
+ --no-info --section=8 --name="start an iodine IPv4-over-DNS tunnel" \
+ $(CURDIR)/debian/iodine-client-start
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
+override_dh_auto_install:
+ dh_auto_install -- DESTDIR=$(TMP) prefix=/usr
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs CHANGELOG
- dh_installdocs README
- dh_installexamples debian/iodine-jigger
- dh_installdebconf
+override_dh_installinit:
dh_installinit --name=iodined
- dh_link usr/share/man/man8/iodine.8 usr/share/man/man8/iodined.8
- dh_strip
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+override_dh_installlogcheck:
+ dh_installlogcheck
+ mv $(TMP)/etc/logcheck/ignore.d.server/iodine $(TMP)/etc/logcheck/ignore.d.server/iodined