Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 #export DH_VERBOSE=1
3
4 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5
6 VALGRIND_ARCHS=amd64 arm64 armhf i386 ppc64el s390x powerpc ppc64
7
8 -include /usr/share/dpkg/buildtools.mk
9
10 %:
11 dh $@
12
13 dumpasn1: dumpasn1.o
14 $(CC) -o dumpasn1 dumpasn1.o $(CFLAGS) $(LDFLAGS)
15
16 dumpasn1.o: dumpasn1.c
17 $(CC) -o dumpasn1.o -DDEBIAN $(CPPFLAGS) $(CFLAGS) -c dumpasn1.c
18
19 override_dh_auto_build: dumpasn1 debian/dumpasn1.1
20
21 override_dh_auto_test: dumpasn1
22 ifeq ($(DEB_BUILD_ARCH),$(filter $(DEB_BUILD_ARCH),$(VALGRIND_ARCHS)))
23 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
24 debian/tests/unicode-strings ./dumpasn1
25 debian/tests/bmp-strings ./dumpasn1
26 endif
27 else
28 echo "Arch $(DEB_BUILD_ARCH) cannot run valgrind test"
29 endif
30
31 debian/control: debian/control.in
32 sed -e "s/@VALGRIND_ARCHS@/$(VALGRIND_ARCHS)/g" $< > $@
33
34 get-orig-source:
35 ./debian/get-orig-source
36
37 VER_FULL = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-)
38 debian/dumpasn1.1: debian/dumpasn1.1.in dumpasn1
39 help2man --include=$< --output=$@ \
40 --name="ASN.1 object dump/syntax check program" \
41 --no-info ./`basename $@ .1` --version-string=$(VER_FULL)