File: rules

package info (click to toggle)
plast 2.3.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,360 kB
  • ctags: 6,585
  • sloc: cpp: 28,989; ansic: 2,075; sh: 436; makefile: 13
file content (23 lines) | stat: -rwxr-xr-x 663 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
#!/usr/bin/make -f

# DH_VERBOSE := 1

DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
BUILD_DIR := obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
BUILD_DATE := $(shell TZ=UTC LC_ALL=C dpkg-parsechangelog | grep Date: | cut -d' ' -f2-7)
export BDATE=$(shell TZ=UTC LC_ALL=C date -d"$(BUILD_DATE)" +'%Y-%m-%d')
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

override_dh_install-arch:
	dh_install -a
	# install binary
	cp -a $(BUILD_DIR)/bin/*/plast debian/$(DEBPKGNAME)/usr/lib/$(DEBPKGNAME)/bin
	# no need for the includes
	rm -rf debian/*/usr/include

override_dh_auto_test:
	scripts/test-plast.sh