File: rules

package info (click to toggle)
squirrel3 3.1-7
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 1,336 kB
  • sloc: cpp: 12,721; ansic: 917; makefile: 316; python: 40
file content (41 lines) | stat: -rwxr-xr-x 1,388 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
#!/usr/bin/make -f

# 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 DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -fno-exceptions -fno-strict-aliasing
export DEB_CXXFLAGS_MAINT_APPEND = $(DEB_CFLAGS_MAINT_APPEND) -fno-rtti -std=c++11

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure --buildsystem=cmake -- \
		-DINSTALL_LIB_DIR=lib/$(DEB_BUILD_MULTIARCH) \
		-DINSTALL_INC_DIR=include/squirrel3 \
		-DDISABLE_STATIC="" -DLONG_OUTPUT_NAMES=""

PKG_CONFIG_FILE=debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/squirrel3.pc
include /usr/share/dpkg/pkg-info.mk

override_dh_auto_install:
	mkdir -p $(shell dirname $(PKG_CONFIG_FILE))
	echo "version=$(DEB_VERSION_UPSTREAM)" > $(PKG_CONFIG_FILE)
	echo "deb_host_multiarch=$(DEB_HOST_MULTIARCH)" >> $(PKG_CONFIG_FILE)
	cat debian/squirrel3.pc >> $(PKG_CONFIG_FILE)
	dh_auto_install

FAKETIME = $(shell date --date "`dpkg-parsechangelog -S date`" -u +%Y%m%d)

override_dh_installdocs:
	http_proxy='127.0.0.1:9' $(shell which sphinx-build) -b latex \
		-d debian/tmp/doc/cache doc/source debian/tmp/doc
	sed -i "s/PDFLATEX = pdflatex/PDFLATEX = pdflatex -interaction=batchmode/" \
		debian/tmp/doc/Makefile
	cd debian/tmp/doc; $(MAKE) $(MFLAGS)
	dh_installdocs -A README

override_dh_compress:
	dh_compress -X.pdf