Holger Hans Peter Freyther | 821f4fa | 2011-06-01 15:00:01 +0200 | [diff] [blame] | 1 | #!/usr/bin/make -f |
Holger Hans Peter Freyther | 821f4fa | 2011-06-01 15:00:01 +0200 | [diff] [blame] | 2 | |
Pau Espin Pedrol | b96c957 | 2018-10-31 10:31:34 +0100 | [diff] [blame] | 3 | DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2) |
| 4 | DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1) |
| 5 | VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') |
| 6 | |
Holger Hans Peter Freyther | 821f4fa | 2011-06-01 15:00:01 +0200 | [diff] [blame] | 7 | #export DH_VERBOSE=1 |
Pau Espin Pedrol | b96c957 | 2018-10-31 10:31:34 +0100 | [diff] [blame] | 8 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
Holger Hans Peter Freyther | 821f4fa | 2011-06-01 15:00:01 +0200 | [diff] [blame] | 9 | |
Holger Hans Peter Freyther | d7999f0 | 2012-11-06 23:40:17 +0100 | [diff] [blame] | 10 | # Maybe we require some moreadvanced testing in the future |
| 11 | PCAP_CFLAGS="-I/usr/include" |
| 12 | PCAP_LIBS="-lpcap" |
Holger Hans Peter Freyther | 821f4fa | 2011-06-01 15:00:01 +0200 | [diff] [blame] | 13 | |
| 14 | %: |
Pau Espin Pedrol | b96c957 | 2018-10-31 10:31:34 +0100 | [diff] [blame] | 15 | dh $@ --with autoreconf --fail-missing |
Holger Hans Peter Freyther | d7999f0 | 2012-11-06 23:40:17 +0100 | [diff] [blame] | 16 | |
| 17 | override_dh_auto_configure: |
| 18 | dh_auto_configure -- \ |
Pau Espin Pedrol | b29f84f | 2018-10-31 10:38:18 +0100 | [diff] [blame^] | 19 | --with-systemdsystemunitdir=/lib/systemd/system \ |
Holger Hans Peter Freyther | d7999f0 | 2012-11-06 23:40:17 +0100 | [diff] [blame] | 20 | --with-pcap-config=/bin/false \ |
| 21 | PCAP_CFLAGS=$(PCAP_CFLAGS) \ |
| 22 | PCAP_LIBS=$(PCAP_LIBS) |
Holger Hans Peter Freyther | b08783d | 2012-11-07 10:11:54 +0100 | [diff] [blame] | 23 | |
| 24 | override_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 Freyther | fbdcf59 | 2015-12-03 20:41:28 +0100 | [diff] [blame] | 31 | |
| 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 Freyther | 4776b29 | 2017-03-07 23:17:41 +0100 | [diff] [blame] | 34 | |
| 35 | override_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 |