File: rules

package info (click to toggle)
tinydyndns 0.4.2.debian1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,392 kB
  • sloc: ansic: 10,245; sh: 291; makefile: 42
file content (35 lines) | stat: -rwxr-xr-x 916 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -include errno.h

%:
	dh $@

override_dh_auto_build:
	# Makefile uses files instead of environment variable for...
	# ..compiler command and flags
	test -e conf-cc.orig || cp conf-cc conf-cc.orig
	echo '$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)' > conf-cc

	# ..linker command and flags
	test -e conf-ld.orig || cp conf-ld conf-ld.orig
	echo '$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)' > conf-ld

	test -e conf-home.orig || cp conf-home conf-home.orig
	echo '/usr' > conf-home

	# Finally, make target all
	dh_auto_build

override_dh_installchangelogs:
	dh_installchangelogs package/CHANGES

# Cleanup conf files
override_dh_auto_clean:
	dh_auto_clean

	# Revert Makefile configuration
	for file in conf-cc conf-ld conf-home; do \
	    test ! -r $$file.orig || mv -f $$file.orig $$file || exit 1; \
	done