File: rules

package info (click to toggle)
minc-tools 2.3.00%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,532 kB
  • sloc: ansic: 65,671; perl: 7,423; yacc: 1,174; sh: 544; lex: 319; makefile: 220
file content (33 lines) | stat: -rwxr-xr-x 974 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

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

CMAKE_FLAGS =


# Tests are buggy; disable test on sparc
ifeq ($(ARCH),sparc)
	DEB_BUILD_OPTIONS += nocheck
endif

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

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_FLAGS)

override_dh_install:
	cd debian/minc-tools && mkdir -p usr/share && mv usr/man usr/share
	dh_link /usr/share/man/man1/voxeltoworld.1 \
		/usr/share/man/man1/worldtovoxel.1
	for pl in `grep -Rl '#![[:space:]]*/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
	    sed -i '1s?^#![[:space:]]*/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
	done