blob: a9a8b30487bb3a209223189abc473722a54d0239 [file] [log] [blame]
Holger Hans Peter Freyther821f4fa2011-06-01 15:00:01 +02001#!/usr/bin/make -f
Holger Hans Peter Freyther821f4fa2011-06-01 15:00:01 +02002
Pau Espin Pedrolb96c9572018-10-31 10:31:34 +01003DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
4DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
5VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
6
Holger Hans Peter Freyther821f4fa2011-06-01 15:00:01 +02007#export DH_VERBOSE=1
Pau Espin Pedrolb96c9572018-10-31 10:31:34 +01008export DEB_BUILD_MAINT_OPTIONS = hardening=+all
Holger Hans Peter Freyther821f4fa2011-06-01 15:00:01 +02009
Holger Hans Peter Freytherd7999f02012-11-06 23:40:17 +010010# Maybe we require some moreadvanced testing in the future
11PCAP_CFLAGS="-I/usr/include"
12PCAP_LIBS="-lpcap"
Holger Hans Peter Freyther821f4fa2011-06-01 15:00:01 +020013
14%:
Pau Espin Pedrolb96c9572018-10-31 10:31:34 +010015 dh $@ --with autoreconf --fail-missing
Holger Hans Peter Freytherd7999f02012-11-06 23:40:17 +010016
17override_dh_auto_configure:
18 dh_auto_configure -- \
Pau Espin Pedrolb29f84f2018-10-31 10:38:18 +010019 --with-systemdsystemunitdir=/lib/systemd/system \
Holger Hans Peter Freytherd7999f02012-11-06 23:40:17 +010020 --with-pcap-config=/bin/false \
21 PCAP_CFLAGS=$(PCAP_CFLAGS) \
22 PCAP_LIBS=$(PCAP_LIBS)
Holger Hans Peter Freytherb08783d2012-11-07 10:11:54 +010023
24override_dh_auto_install:
25 dh_auto_install $@
26 install -d -m 0755 $(CURDIR)/debian/osmo-pcap-client/etc/osmo-pcap/
27 install -m 0644 $(CURDIR)/contrib/osmo-pcap-client.cfg $(CURDIR)/debian/osmo-pcap-client/etc/osmo-pcap
28
29 install -d -m 0755 $(CURDIR)/debian/osmo-pcap-server/etc/osmo-pcap/
30 install -m 0644 $(CURDIR)/contrib/osmo-pcap-server.cfg $(CURDIR)/debian/osmo-pcap-server/etc/osmo-pcap
Holger Hans Peter Freytherfbdcf592015-12-03 20:41:28 +010031
32 install -d -m 0755 $(CURDIR)/debian/osmo-pcap-server/etc/cron.daily/
33 install -m 0755 $(CURDIR)/contrib/osmo_pcap_clean_old $(CURDIR)/debian/osmo-pcap-server/etc/cron.daily/
Holger Hans Peter Freyther4776b292017-03-07 23:17:41 +010034
35override_dh_strip:
36 dh_strip -posmo-pcap-client --dbg-package=osmo-pcap-client-dbg
37 dh_strip -posmo-pcap-server --dbg-package=osmo-pcap-server-dbg