File: rules

package info (click to toggle)
rapiddisk 9.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 952 kB
  • sloc: ansic: 6,760; sh: 1,364; makefile: 325; python: 105
file content (51 lines) | stat: -rwxr-xr-x 1,659 bytes parent folder | download | duplicates (2)
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
50
51
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

#DEB_BUILD_OPTIONS += noautodbgsym

PDKMS:=rapiddisk-dkms

JOBS:=$(patsubst parallel=%,-j%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))

override_dh_auto_clean:
	$(MAKE) -$(MAKEFLAGS) $(JOBS) -C $(CURDIR)/src clean

override_dh_auto_build:
	$(MAKE) -$(MAKEFLAGS) $(JOBS) -C $(CURDIR)/src
	cp $(CURDIR)/conf/rapiddiskd.service $(CURDIR)/debian/rapiddisk.rapiddiskd.service

override_dh_clean:
	dh_clean --exclude=rapiddisk_sub.orig --exclude=run_rapiddisk.sh.orig

override_dh_auto_install:
	$(MAKE) -$(MAKEFLAGS) $(JOBS) -C $(CURDIR)/src install DESTDIR=$(CURDIR)/debian/rapiddisk

override_dh_install:
	install -T -g root -o root -m 755 -D $(CURDIR)/debian/rapiddisk-on-boot_kernel_prerm $(CURDIR)/debian/rapiddisk-on-boot/etc/kernel/prerm.d/rapiddisk-on-boot
	sed -e "s/DEB_VERSION_UPSTREAM/$(DEB_VERSION_UPSTREAM)/g" -e "s/PDKMS/$(PDKMS)/g" debian/rapiddisk-dkms.install.in > debian/rapiddisk-dkms.install
	dh_install

override_dh_installsystemd:
	dh_installsystemd --name=rapiddiskd 

override_dh_dkms-indep:
	dh_dkms -V $(DEB_VERSION_UPSTREAM)

%:
	dh ${@} --with dkms