Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
4
5 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
6 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
7 MAKEFLAGS += -j$(NUMJOBS)
8 endif
9
10 PKGBASE=debian/memcached/usr/share/memcached
11 SCRIPTS=$(PKGBASE)/scripts
12
13 override_dh_auto_configure:
14 dh_auto_configure -- --enable-sasl --enable-tls --enable-proxy
15
16 override_dh_auto_install:
17 dh_auto_install
18 install -m 644 $(CURDIR)/debian/memcached.conf \
19 $(CURDIR)/$(PKGBASE)/memcached.conf.default
20 install -m 744 $(CURDIR)/scripts/start-memcached $(SCRIPTS)
21 install -m 755 $(CURDIR)/debian/systemd-memcached-wrapper $(SCRIPTS)
22 install -m 744 $(CURDIR)/scripts/memcached-tool $(SCRIPTS)
23 install -m 755 $(CURDIR)/scripts/memcached-init \
24 $(CURDIR)/debian/memcached.init
25 install -m 755 $(CURDIR)/scripts/memcached.service \
26 $(CURDIR)/debian/memcached.service
27 # Check for LP: #1755460
28 if grep -i '##safer##' $(CURDIR)/scripts/memcached.service >/dev/null 2>&1; then echo "ERROR: debian/patches/restore-systemd-sandboxing is incomplete; please see LP: #1755460" >&2; exit 1; fi
29 install -m 755 $(CURDIR)/scripts/damemtop $(SCRIPTS)
30 install -m 644 $(CURDIR)/scripts/damemtop.yaml $(SCRIPTS)
31
32 override_dh_auto_test:
33 # Don't run the whitespace tests; they fail if we are building with a
34 # .git directory (eg. on salsa)
35 rm -f t/whitespace.t
36
37 # Don't run the tests for the (experimental) proxy feature just yet.
38 rm -f t/proxy*
39
40 ifeq (,$(filter $(DEB_BUILD_ARCH),armel armhf mips64el riscv64))
41 # SSL tests have a race condition and may hang
42 dh_auto_test --max-parallel=1
43 endif
44
45 override_dh_auto_clean:
46 dh_auto_clean
47 # Ensure we cannot build from the embedded Lua
48 rm -rf vendor/lua
49 rm --force $(CURDIR)/debian/memcached.init $(CURDIR)/debian/memcached.service
50
51 %:
52 dh $@