File: rules

package info (click to toggle)
pfstools 2.2.0-9
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,540 kB
  • sloc: cpp: 26,364; javascript: 3,814; ansic: 999; sh: 180; python: 65; makefile: 47
file content (76 lines) | stat: -rwxr-xr-x 2,304 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/make -f
# debian/rules for pfstools
#
# Written by Sebastian Harl <tokkee@debian.org>

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

# for DEB_TARGET_MULTIARCH
include /usr/share/dpkg/architecture.mk

MDIR = $(shell octave-config  --print LOCALFCNFILEDIR)
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

confflags = -DCMAKE_EXPORT_COMPILE_COMMANDS=true -DBUILD_SHARED_LIBS=ON
# Matlab is not available in Debian.
confflags += -DWITH_MATLAB=false

# These libraries are not available / unusable in Debian.
#confflags += --disable-jpeghdr --disable-gdal

export DEB_CFLAGS_MAINT_APPEND := -Wall
export DEB_CXXFLAGS_MAINT_APPEND := -Wall
export DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow

override_dh_auto_configure:
	dh_auto_configure --verbose -- \
		$(confflags)

override_dh_auto_build:
	dh_auto_build -v
	cd doc && pdflatex pfs_format_spec.tex && \
		pdflatex pfs_format_spec.tex

execute_after_dh_auto_clean:
	rm -vf doc/pfs_format_spec.aux doc/pfs_format_spec.log \
		doc/pfs_format_spec.pdf

override_dh_auto_install:
	dh_auto_install --verbose
	chmod 644 debian/tmp/$(MDIR)/pfstools/*
	# these binaries are not available
	rm -vf debian/tmp/usr/share/man/man1/pfs*jpeghdr.1 \
		debian/tmp/usr/share/man/man1/pfsingdal.1
	if ! [ -e debian/tmp/usr/lib/$(DEB_TARGET_MULTIARCH) ] ; then \
		mkdir debian/tmp/usr/lib/$(DEB_TARGET_MULTIARCH) ; fi
	mv -v debian/tmp/usr/lib/pkgconfig \
		debian/tmp/usr/lib/libpfs.* \
		debian/tmp/usr/lib/$(DEB_TARGET_MULTIARCH)/
	sed -i -e \
		's:^libdir=$${prefix}/lib:libdir=$${prefix}/lib/$(DEB_TARGET_MULTIARCH):' \
		debian/tmp/usr/lib/$(DEB_TARGET_MULTIARCH)/pkgconfig/pfs.pc

override_dh_install:
	dh_install
	# these files have been installed twice by dh_install
	rm -vf debian/pfstools/usr/bin/pfs*view debian/pfstools/usr/bin/pfsv \
		debian/pfstools/usr/share/man/man1/pfsv.1 \
		debian/pfstools/usr/share/man/man1/pfs*view.1 \
		debian/pfstools/usr/bin/pfstmo* \
		debian/pfstools/usr/share/man/*/pfstmo*

override_dh_strip:
	# mkoctfile removes any symbol table and relocation information from the
	# .oct files making them unusable for the -dbg package
	dh_strip -poctave-pfstools --no-automatic-dbgsym
	dh_strip --remaining-packages

override_dh_dwz:
	dh_dwz -X.oct

override_dh_compress:
	dh_compress -X.pdf

%:
	dh $@