File: rules

package info (click to toggle)
ondir 0.2.3%2Bgit0.55279f03-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 188 kB
  • ctags: 53
  • sloc: ansic: 450; makefile: 70; sh: 13; csh: 2
file content (25 lines) | stat: -rwxr-xr-x 862 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
#!/usr/bin/make -f

VERSION = $(shell dpkg-parsechangelog -S Version | cut -d- -f1)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CPPFLAGS_MAINT_APPEND = -DVERSION=\"$(VERSION)\" -DGLOBAL_CONF=\"/etc/onddirrc\"

CC ?= cc
CFLAGS_FOR_MAKEFILE=$(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS_FOR_MAKEFILE=$(shell dpkg-buildflags --get LDFLAGS)

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- CC='$(CC)' LD='$(CC)' CFLAGS='$(CFLAGS_FOR_MAKEFILE)' LDFLAGS='$(LDFLAGS_FOR_MAKEFILE)'

override_dh_auto_install:
	dh_auto_install -- CC='$(CC)' LD='$(CC)' CFLAGS='$(CFLAGS_FOR_MAKEFILE)' LDFLAGS='$(LDFLAGS_FOR_MAKEFILE)'

override_dh_fixperms:
	dh_fixperms
	@# Remove the executable flag from files installed there, since
	@# they are supposed to be sourced.
	chmod a-x debian/ondir/usr/share/ondir/integration/*