File: rules

package info (click to toggle)
znc 1.8.2-2%2Bdeb11u1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 10,284 kB
  • sloc: cpp: 46,372; javascript: 11,785; sh: 3,661; perl: 1,182; python: 867; makefile: 428; tcl: 219; ansic: 188; pascal: 65
file content (76 lines) | stat: -rwxr-xr-x 2,468 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_REVISION ?= "+deb$(shell echo $(DEB_VERSION) | cut -d- -f2)"

znc_backlog_pth = $(CURDIR)/debian/contrib/znc-backlog
znc_backlog_ver = 0.20180824+$(DEB_VERSION)
znc_push_pth = $(CURDIR)/debian/contrib/znc-push
znc_push_ver = 1.0.0+git20190521.78d0385+$(DEB_VERSION)

DEB_CONFIGURE_EXTRA_FLAGS := \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DVERSION_EXTRA=$(DEB_REVISION) \
	-DGTEST_ROOT="/usr/src/googletest/googletest" \
	-DGMOCK_ROOT="/usr/src/googletest/googlemock" \
	-DWANT_SYSTEMD=false \
	-DWANT_TCL=true \
	-DWANT_CYRUS=true \
	-DWANT_PYTHON=true \
	-DWANT_PERL=true \
	-DWANT_I18N=true

export VERBOSE=1

%:
	dh $@ --with python3 --buildsystem=cmake

override_dh_auto_clean:
	dh_auto_clean
	dh_auto_clean --buildsystem=makefile -D$(znc_backlog_pth)
	dh_auto_clean --buildsystem=makefile -D$(znc_push_pth)

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS)

build_contrib_plugins: export PATH := $(CURDIR)/debian/tmp/usr/bin:$(PATH)
build_contrib_plugins: export CXXFLAGS += -I$(CURDIR)/debian/tmp/usr/include
build_contrib_plugins: export CMAKE_PREFIX_PATH := $(CURDIR)/debian/tmp/usr/share/znc/cmake
build_contrib_plugins:
	dh_auto_build --buildsystem=makefile -D$(znc_backlog_pth)
	dh_auto_build --buildsystem=makefile -D$(znc_push_pth) -- \
		version="$(znc_push_ver)" curl=yes

override_dh_installsystemd:
	dh_installsystemd --no-start --no-enable --restart-after-upgrade

override_dh_python3:
	dh_python3 \
		-p znc-python \
		--exclude=znc.py \
		--exclude=znc_core.py

override_dh_install: build_contrib_plugins
	dh_install
	dh_install -p znc-dev \
		usr/lib/pkgconfig/* usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
	# Fix pkg-config file.
	sed '/^Cflags:/d' -i $(CURDIR)/debian/znc-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/znc.pc
	sed '/Libs:/d' -i $(CURDIR)/debian/znc-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/znc.pc

override_dh_missing:
	dh_missing --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs -pznc-backlog -XChangeLog.md
	dh_installchangelogs -pznc-push -XChangeLog.md
	dh_installchangelogs --remaining-packages

override_dh_gencontrol:
	dh_gencontrol -pznc-backlog -- -v$(znc_backlog_ver) -VbinVer=$(DEB_VERSION)
	dh_gencontrol -pznc-push -- -v$(znc_push_ver) -VbinVer=$(DEB_VERSION)
	dh_gencontrol --remaining-packages