#!/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/dpatch/dpatch.make
+export DEB_BUILD_MAINT_OPTIONS := hardening=+pie,+bindnow
-CFLAGS = -Wall -g
+%:
+ dh $@ --with systemd
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
+override_dh_auto_clean:
+ debconf-updatepo
+ dh_auto_clean
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- touch configure-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: build-stamp
+override_dh_auto_install:
+ dh_auto_install -- DESTDIR=$(TMP) prefix=/usr
-build-stamp: configure-stamp
- dh_testdir
- $(MAKE)
- $(MAKE) test
- touch $@
-
-clean: unpatch
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
- $(MAKE) clean
- dh_clean
-
-install: build patch
- dh_testdir
- dh_testroot
- $(MAKE) install PREFIX=debian/iodine/usr
-
-
-# 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
+override_dh_installinit:
dh_installinit --name=iodined
-# dh_installcron
-# dh_installinfo
-# dh_installman
- dh_link usr/share/man/man8/iodine.8 usr/share/man/man8/iodined.8
- 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