File: rules

package info (click to toggle)
usbguard 1.0.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,984 kB
  • sloc: cpp: 17,583; sh: 5,758; makefile: 635; ansic: 122; xml: 69
file content (49 lines) | stat: -rwxr-xr-x 1,287 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/make -f
#export DH_VERBOSE = 1
#for gen-orig-tgz:
include /usr/share/dpkg/pkg-info.mk
VERSION			?= $(shell echo '$(DEB_VERSION)' | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//')
GIT_TAG			?= upstream/$(shell echo '$(VERSION)' | sed -e 's/~/_/')
DEBIAN_BRANCH	?= $(shell cat debian/gbp.conf | grep debian-branch | cut -d'=' -f2 | awk '{print $1}')

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

export DEB_LDFLAGS_MAINT_APPEND = -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/usbguard -fPIE -pie
export DEB_CXXFLAGS_MAINT_APPEND = -pthread -fPIE

%:
	dh ${@}

override_dh_auto_configure:
	dh_auto_configure -- \
	  --enable-static \
	  --without-bundled-catch \
	  --without-bundled-pegtl \
	  --enable-systemd \
	  --sysconfdir=/etc

override_dh_missing:
	dh_missing --list-missing

override_dh_makeshlibs:
	dh_makeshlibs -n


gen-orig-tgz:
	if [ ! -f ../$(DEB_SOURCE)_$(VERSION).orig.tar.gz ] ; then \
		git archive --format=tar.gz --prefix=$(DEB_SOURCE)-$(VERSION)/ \
		   $(GIT_TAG) >../$(DEB_SOURCE)_$(VERSION).orig.tar.gz ; \
	fi

override_dh_install:
	if ! dh_install; then \
		tree debian/tmp;    \
		exit 1;    \
	fi

override_dh_installinit:
	dh_installinit
	dh_installinit -pusbguard --name=usbguard-dbus