File: rules

package info (click to toggle)
ucl 1.03%2Brepack-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,364 kB
  • sloc: sh: 11,733; asm: 10,461; ansic: 5,070; makefile: 109
file content (46 lines) | stat: -rwxr-xr-x 1,198 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
#!/usr/bin/make -f

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  conf_add := --enable-debug
else
  conf_add :=
endif

BUILD           := DEB-BUILD
DH_AUTO_OPTIONS := -v -Sautoconf -B$(BUILD) --parallel

export DEB_BUILD_MAINT_OPTIONS := hardening=+all

export CFLAGS   := -g -D_REENTRANT \
                   $(shell dpkg-buildflags --get CFLAGS) \
                   $(shell getconf LFS_CFLAGS)
export LDFLAGS  := -Wl,-z,noexecstack -Wl,-z,defs -Wl,--as-needed \
                   $(shell dpkg-buildflags --get LDFLAGS)

include /usr/share/dpkg/pkg-info.mk
BUILD_DATETIME  := $(shell TZ=UTC LC_ALL=C date -R -d "@${SOURCE_DATE_EPOCH}")
export UCL_EXTRA_CPPFLAGS := '-DBUILD_DATETIME="$(BUILD_DATETIME)"'

%:
	dh "$@"

override_dh_auto_configure:
	@echo "==> Configuring UCL"
	dh_auto_configure $(DH_AUTO_OPTIONS) -- \
	                   --enable-shared  $(conf_add)

override_dh_auto_build:
	@echo "==> Building UCL"
	dh_auto_build $(DH_AUTO_OPTIONS)

override_dh_auto_clean:
	dh_auto_clean $(DH_AUTO_OPTIONS)

override_dh_auto_install:
	dh_auto_install $(DH_AUTO_OPTIONS)

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_makeshlibs:
	dh_makeshlibs -Nlibucl-dev -V