File: rules

package info (click to toggle)
pushpin 1.41.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,056 kB
  • sloc: cpp: 44,382; python: 1,305; sh: 139; makefile: 73; javascript: 34; php: 27
file content (64 lines) | stat: -rwxr-xr-x 2,082 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
58
59
60
61
62
63
64
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export CARGO_HOME=$(CURDIR)/debian/cargo_home

ALLOW_MULTIPLE=-Wl,--allow-multiple-definition

define QMAKE_BUILDFLAGS
QMAKE_CPPFLAGS *= $(shell dpkg-buildflags --get CPPFLAGS)
QMAKE_CFLAGS   *= $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
QMAKE_CXXFLAGS *= $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
QMAKE_LFLAGS   *= $(shell dpkg-buildflags --get LDFLAGS) $(if $(findstring arm,$(shell uname -m)),$(ALLOW_MULTIPLE))
endef
export QMAKE_BUILDFLAGS

# for cargo
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk
include /usr/share/rustc/architecture.mk
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
export PREFIX=/usr
export CONFIGDIR=/etc
export PATH := /usr/share/cargo/bin:$(PATH)
export CARGO=/usr/share/cargo/bin/cargo
export CARGO_HOME=$(CURDIR)/debian/cargo_home
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)

%:
	dh $@

execute_before_dh_auto_configure:
	/usr/share/cargo/bin/cargo prepare-debian debian/cargo_registry --link-from-system

execute_after_dh_auto_install:
	/usr/share/cargo/bin/dh-cargo-built-using pushpin

override_dh_auto_configure:
	# Upstream Cargo.lock contains versions not valid for debian
	-rm Cargo.lock
	cargo update

override_dh_auto_install:
	dh_auto_install -- INSTALL_ROOT="$(CURDIR)/debian/pushpin"
	mkdir -p debian/pushpin/var/log/pushpin
	mkdir -p debian/pushpin/usr/share/pushpin
	mv debian/pushpin/etc/pushpin/pushpin.conf debian/pushpin/usr/share/pushpin/pushpin.conf

override_dh_installexamples:
	dh_installexamples -X.o -XMakefile

override_dh_installman:
	help2man \
		--name "HTTP/WebSocket connection manager" \
		--no-info \
		debian/pushpin/usr/bin/pushpin-connmgr > debian/pushpin-connmgr.1
	ln -s pushpin-connmgr.1 debian/pushpin-condure.1
	dh_installman -O--buildsystem=cargo