File: rules

package info (click to toggle)
pktools 2.6.7.6%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,040 kB
  • sloc: cpp: 33,451; xml: 10,955; python: 1,601; makefile: 142; sh: 58; ansic: 24
file content (54 lines) | stat: -rwxr-xr-x 1,471 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
#!/usr/bin/make -f
# -*- makefile -*-

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

# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

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

UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')

BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")

ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
	export DEB_CXXFLAGS_MAINT_APPEND := -I/usr/include/hdf5/serial
endif

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

MANPAGES:=$(wildcard debian/man/*.*.xml)

%:
	dh $@ --buildsystem cmake \
	      --with pkgkde_symbolshelper \
	      --parallel

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_WITH_FANN=ON \
	                     -DBUILD_WITH_LIBLAS=ON \
	                     -DBUILD_SHARED_LIBS=ON \
	                     -DINSTALL_LIBRARY_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_clean:
	dh_clean debian/man/*.1
	find $(CURDIR) -name '*.o' -delete
	find $(CURDIR) -name '*.so*' -delete
	find $(CURDIR) -name '*.a' -delete

override_dh_auto_build:
	# Create man pages from DocBook XML
	for x in $(MANPAGES) ; do \
	  docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \
	  mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \
	done

	dh_auto_build

override_dh_install:
	dh_install --list-missing

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(UPSTREAM_VERSION) -c0