File: rules

package info (click to toggle)
libnginx-mod-http-ndk 1%3A0.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 892 kB
  • sloc: ansic: 3,244; sh: 422; makefile: 27
file content (35 lines) | stat: -rwxr-xr-x 906 bytes parent folder | download | duplicates (2)
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

BUILDDIR_SRC = $(CURDIR)/debian/build-src
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
objdir = $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure --buildsystem=nginx_mod
	for have in NDK_SET_VAR NDK_UPSTREAM_LIST; do \
	  ( \
	    echo "#ifndef $$have"; \
	    echo "#define $$have 1"; \
	    echo "#endif"; \
	    echo; \
	  ) >> $(objdir)/ngx_auto_config.h; \
	done

override_dh_auto_build: build.src
	dh_auto_build --buildsystem=nginx_mod

build.src:
	mkdir -p $(BUILDDIR_SRC)
	cp -Pa $(CURDIR)/auto config ngx_auto_lib_core $(BUILDDIR_SRC)/
	for i in src objs; do \
	  find $(CURDIR)/$$i -type f -name '*.h' -printf "$$i/%P\0" | tar -C $(CURDIR) --null --files-from - -c | tar -C $(BUILDDIR_SRC)/ -x; \
	done

override_dh_clean:
	rm -rf $(BUILDDIR_SRC)
	dh_clean