File: rules

package info (click to toggle)
plplot 5.13.0+dfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 32,532 kB
  • sloc: ansic: 87,809; xml: 29,093; cpp: 19,979; ada: 19,560; f90: 18,139; tcl: 16,398; ml: 7,059; java: 6,863; python: 6,791; perl: 4,742; sh: 3,333; pascal: 171; lisp: 75; sed: 59; makefile: 38; fortran: 5
file content (67 lines) | stat: -rwxr-xr-x 1,964 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
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
#!/usr/bin/make -f
# -*- gmake -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# Paths for Octave
OCTDIR = $(shell octave-config --print LOCALAPIOCTFILEDIR)

# Note cmake ignores CPPFLAGS so add them to CFLAGS and CXXFLAGS as a
# work around
CPPFLAGS += $(shell mkoctfile -p INCFLAGS)
CFLAGS += $(CPPFLAGS) -fvisibility=hidden
# Don't add -fvisibility=hidden to CXXFLAGS for now as this breaks the
# octave bindings.
CXXFLAGS += $(CPPFLAGS)
FFLAGS += -fvisibility=hidden
LDFLAGS += -Wl,--as-needed

export verbose_test = on

export QT_SELECT=5

CONFIGURE_OPTIONS = \
	-DUSE_RPATH=OFF -DPLD_psttf=OFF -DNON_TRANSITIVE=ON \
	-DENABLE_tk=ON -DENABLE_python=ON -DENABLE_ada=ON \
	-DOCTAVE_OCT_DIR=$(OCTDIR) -DTRY_OCTAVE4=ON \
	-DBUILD_DOC=ON \
	-DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) 

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
  CONFIGURE_OPTIONS += -DBUILD_TEST=ON
endif

%:
	dh $@ -Scmake --with python2,python3,ocaml

override_dh_auto_configure:
	xvfb-run dh_auto_configure -- $(CONFIGURE_OPTIONS)

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	ctest  --extra-verbose
	$(MAKE) -C obj-* VERBOSE=1 test_diff_psc
endif

override_dh_auto_install:
	dh_auto_install
	# Dirty hack: Make shared lib executable to force its detection
	# by dh_strip and dh_shlibdeps.
	# This will be reverted later, in override_dh_shlibdeps.
	# See https://bugs.debian.org/35733#35
	chmod ugo+x debian/tmp/usr/lib/*/octave/site/oct/api-*/*/plplot_octave.oct

	# Remove multiarch path in pkgconfig files.
	sed -i 's,-L"/usr/lib/$(DEB_HOST_MULTIARCH)",,g;s,  *, ,g' \
		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*.pc

	dh_numpy
	dh_numpy3

override_dh_shlibdeps:
	dh_shlibdeps
	# Dirty hack, part 2: Remove the executable bit from the shared library
	chmod ugo-x debian/octave-plplot/usr/lib/*/octave/site/oct/api-*/*/plplot_octave.oct

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog.release