File: rules

package info (click to toggle)
kpatch 0.3.2-3.1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 896 kB
  • ctags: 930
  • sloc: ansic: 5,962; sh: 1,176; makefile: 186
file content (22 lines) | stat: -rwxr-xr-x 612 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
#!/usr/bin/make -f
#export DH_VERBOSE = 1

VERSION ?= $(shell dpkg-parsechangelog |\
	     sed -rne 's/^Version: ([0-9.]+)[-+].*$$/\1/p')
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
export BUILDMOD=no

%:
	dh $@

override_dh_auto_install:
	dh_auto_install -- PREFIX=/usr

override_dh_install:
	mkdir -p debian/tmp/usr/src/kpatch-$(VERSION)
	dh_install -pkpatch-dkms -X.o -X.ko -Xkmod/patch kmod/ usr/src/kpatch-$(VERSION)
	dh_install -pkpatch-dkms Makefile.inc usr/src/kpatch-$(VERSION)
	dh_install -pkpatch-dkms debian/post-dkms.sh usr/src/kpatch-$(VERSION)
	dh_dkms -V $(VERSION)
	dh_install