File: rules

package info (click to toggle)
qhttpengine 0.1.0%2Bdfsg1-1.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 524 kB
  • sloc: cpp: 2,070; javascript: 39; makefile: 21
file content (33 lines) | stat: -rwxr-xr-x 923 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
#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# Upstream bundles a minified copy of jQuery so we replace it with a symlink to
# the copy in libjs-jquery. The file is embedded in the binary and also copied
# to the examples directory.
JQUERY_SRC = /usr/share/javascript/jquery/jquery.min.js
JQUERY_DEST = examples/chatserver/static/js/jquery.min.js

# The test suite fails if $HOME isn't set to a valid directory
TMPDIR ?= /tmp
HOME = $(TMPDIR)

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -f $(CURDIR)/$(JQUERY_DEST)

override_dh_auto_configure:
	dh_auto_configure -- \
		-DBUILD_DOC=ON \
		-DBUILD_EXAMPLES=ON \
		-DBUILD_TESTS=ON \
		-DLIB_INSTALL_DIR=lib/$(DEB_HOST_MULTIARCH)
	ln -s $(JQUERY_SRC) $(CURDIR)/$(JQUERY_DEST)

override_dh_link:
	dh_link
	dh_link -p libqhttpengine-examples $(JQUERY_SRC) \
	    usr/lib/$(DEB_HOST_MULTIARCH)/QHttpEngine/$(JQUERY_DEST)