Alexander Afanasyev | 469cbcd | 2014-05-08 01:25:11 -0700 | [diff] [blame] | 1 | #!/usr/bin/make -f |
| 2 | # -*- makefile -*- |
| 3 | # Sample debian/rules that uses debhelper. |
| 4 | # This file was originally written by Joey Hess and Craig Small. |
| 5 | # As a special exception, when this file is copied by dh-make into a |
| 6 | # dh-make output file, you may use that output file without restriction. |
| 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. |
| 8 | |
| 9 | # Uncomment this to turn on verbose mode. |
| 10 | # export DH_VERBOSE=1 |
| 11 | |
| 12 | LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) |
Alexander Afanasyev | 1bfc778 | 2014-11-09 17:24:26 -0800 | [diff] [blame] | 13 | CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) |
| 14 | CXXFLAGS += -std=c++11 |
Alexander Afanasyev | 82d638b | 2017-01-26 05:17:47 +0000 | [diff] [blame] | 15 | LIBDIR := /usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) |
Alexander Afanasyev | 469cbcd | 2014-05-08 01:25:11 -0700 | [diff] [blame] | 16 | |
| 17 | %: |
Eric Newberry | 9ab4a66 | 2015-05-28 11:36:41 -0700 | [diff] [blame] | 18 | dh $@ --parallel --with=systemd |
Alexander Afanasyev | 469cbcd | 2014-05-08 01:25:11 -0700 | [diff] [blame] | 19 | |
| 20 | override_dh_auto_configure: |
Alexander Afanasyev | 090287d | 2017-06-12 23:04:34 +0000 | [diff] [blame] | 21 | CXXFLAGS="$(CXXFLAGS)" ./waf configure --without-pch --prefix=/usr --sysconfdir=/etc --localstatedir=/var --boost-libs="$(LIBDIR)" |
Alexander Afanasyev | 469cbcd | 2014-05-08 01:25:11 -0700 | [diff] [blame] | 22 | |
| 23 | override_dh_auto_build: |
Alexander Afanasyev | 2c3726b | 2014-05-26 06:29:36 -0700 | [diff] [blame] | 24 | ./waf build |
Alexander Afanasyev | 469cbcd | 2014-05-08 01:25:11 -0700 | [diff] [blame] | 25 | |
| 26 | override_dh_auto_install: |
| 27 | ./waf install --destdir=debian/tmp |
| 28 | |
| 29 | override_dh_auto_clean: |
| 30 | ./waf distclean |
| 31 | |
| 32 | override_dh_clean: |
| 33 | dh_clean |
| 34 | ./waf distclean |
| 35 | rm -rf .waf-1* |
| 36 | rm -f .waf-tools/*.pyc |
| 37 | rm -f docs/*.pyc |
| 38 | |
| 39 | override_dh_auto_test: |
| 40 | |
Eric Newberry | 9ab4a66 | 2015-05-28 11:36:41 -0700 | [diff] [blame] | 41 | override_dh_systemd_enable: |
| 42 | dh_systemd_enable -pnfd |
| 43 | dh_systemd_enable -pnfd-status-http-server |
| 44 | dh_systemd_enable -pndn-autoconfig-server --no-enable |
Alexander Afanasyev | 3a90289 | 2015-12-30 22:42:20 +0000 | [diff] [blame] | 45 | dh_systemd_enable -pndn-autoconfig-client --no-enable |
Eric Newberry | 9ab4a66 | 2015-05-28 11:36:41 -0700 | [diff] [blame] | 46 | dh_systemd_enable -pnfd-autoreg --no-enable |
| 47 | |
| 48 | override_dh_systemd_start: |
| 49 | dh_systemd_start -pnfd |
| 50 | dh_systemd_start -pnfd-status-http-server |
| 51 | dh_systemd_start -pndn-autoconfig-server --no-start |
Alexander Afanasyev | 3a90289 | 2015-12-30 22:42:20 +0000 | [diff] [blame] | 52 | dh_systemd_start -pndn-autoconfig-client --no-start |
Eric Newberry | 9ab4a66 | 2015-05-28 11:36:41 -0700 | [diff] [blame] | 53 | dh_systemd_start -pnfd-autoreg --no-start |
Alexander Afanasyev | e70537f | 2016-02-27 00:39:40 +0000 | [diff] [blame] | 54 | |
| 55 | .PHONY: override_dh_strip |
| 56 | override_dh_strip: |
| 57 | dh_strip --dbg-package=nfd-dbg |