File: rules

package info (click to toggle)
serf 1.3.9-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,096 kB
  • sloc: ansic: 17,217; python: 236; makefile: 43
file content (57 lines) | stat: -rwxr-xr-x 1,672 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
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/make -f
# -*- makefile -*-

DEB_BUILD_MAINT_OPTIONS=hardening=+all
DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,--as-needed
include /usr/share/dpkg/default.mk

libdir = /usr/lib/$(DEB_HOST_MULTIARCH)
libpkg = libserf-1-1

parallel =
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    parallel = -j $(NUMJOBS)
endif

%:
	dh $@

override_dh_auto_build-arch:
	scons $(parallel) GSSAPI=/usr CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LINKFLAGS="$(LDFLAGS)" PREFIX=/usr LIBDIR=$(libdir)

ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test-arch:
	if ! [ -d debian/distcerts ]; then \
	    mkdir -p debian/testcerts/private debian/distcerts; \
	    cp test/server/*.pem test/server/serfclientcert.p12 debian/distcerts/; \
	    (cd debian/testcerts && ../create_certs.py); \
	    cp debian/testcerts/*.pem debian/testcerts/private/serfserverkey.pem debian/testcerts/serfclientcert.p12 test/server/; \
	fi
	scons check
endif

override_dh_auto_clean:
	rm -rf debian/testcerts
	if [ -d debian/distcerts ]; then \
	    rm test/server/*.pem test/server/*.p12; \
	    cp debian/distcerts/* test/server/; \
	fi
	scons -c

override_dh_auto_install-arch:
	scons install PREFIX=$(CURDIR)/debian/tmp/usr LIBDIR=$(CURDIR)/debian/tmp$(libdir)
	chrpath -d $(CURDIR)/debian/tmp/$(libdir)/*.so.*

override_dh_installdocs-arch:
	dh_installdocs -a NOTICE --link-doc=$(libpkg)

override_dh_installchangelogs-arch:
	dh_installchangelogs -a CHANGES

override_dh_strip-arch:
	dh_strip -a

override_dh_shlibdeps-arch:
	dh_shlibdeps -a
	sed -i 's:libserf-private\(, *\)\?::' debian/*.substvars