File: rules

package info (click to toggle)
lowdown 2.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,364 kB
  • sloc: ansic: 20,158; sh: 1,798; xml: 861; makefile: 494
file content (46 lines) | stat: -rwxr-xr-x 1,270 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/buildtools.mk

# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Upstream uses and tests with BSD Make, so prefer it over GNU
export MAKE = /usr/bin/bmake

# Use libbsd for a system copy of the BSD functions, instead of upstream's
# embedded compats.c coming from the oconfigure project.
# Also see https://github.com/kristapsdz/oconfigure/issues/19
CFLAGS += $(shell $(PKG_CONFIG) --cflags libmd libbsd-overlay)
LDFLAGS += $(shell $(PKG_CONFIG) --libs libmd libbsd-overlay)

%:
	dh $@ --buildsystem=makefile

override_dh_auto_configure:
	AR="$(AR)" \
	CC="$(CC)" \
	CFLAGS="${CFLAGS}" \
	./configure \
		PREFIX=/usr \
		MANDIR="/usr/share/man" \
		LIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} \
		CPPFLAGS="${CPPFLAGS}" \
		LDFLAGS="${LDFLAGS}"

override_dh_auto_install:
	# make install only installs the main binary, not the library
	$(MAKE) install DESTDIR=debian/tmp
	$(MAKE) install_static DESTDIR=debian/tmp
	$(MAKE) install_shared DESTDIR=debian/tmp

override_dh_auto_test:
	$(MAKE) regress

override_dh_auto_clean:
	echo > Makefile.configure
	dh_auto_clean