#!/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)
-CFLAGS = -Wall -g
+export DEB_BUILD_MAINT_OPTIONS := hardening=+pie,+bindnow
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
+%:
+ dh $@ --with systemd
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- touch configure-stamp
+override_dh_auto_clean:
+ debconf-updatepo
+ dh_auto_clean
-build: build-stamp
+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-stamp: configure-stamp
- dh_testdir
- $(MAKE)
- help2man ./iodine --name="IP over DNS tunneling client" --section=8 --source=iodine --no-info --help-option=-h --version-option=-v --output=debian/iodine.8
- help2man ./iodined --name="IP over DNS tunneling server" --section=8 --source=iodined --no-info --help-option=-h --version-option=-v --output=debian/iodined.8
- touch $@
+override_dh_auto_install:
+ dh_auto_install -- DESTDIR=$(TMP) prefix=/usr
-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 debian/iodine.8 debian/iodined.8
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs CHANGELOG
- dh_installdocs
-# dh_installexamples
- dh_install
-# dh_installmenu
- dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_python
- dh_installinit --name=iodine
+override_dh_installinit:
dh_installinit --name=iodined
-# dh_installcron
-# dh_installinfo
- dh_installman debian/iodine.8 debian/iodined.8
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
-# dh_perl
-# dh_makeshlibs
- 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