File: rules

package info (click to toggle)
hdf-eos5 5.1.16.dfsg.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 43,632 kB
  • sloc: ansic: 94,678; fortran: 33,374; sh: 22,901; csh: 928; makefile: 663
file content (45 lines) | stat: -rwxr-xr-x 1,714 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
#!/usr/bin/make -f

# Comment out this line for debugging
export DH_VERBOSE:=1

# The magic rule for debhelper
%:
	dh $@ 

export HDF5_USE_SHLIB=yes
export CC=/usr/bin/h5cc

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH)


# Disable checks: known bad test case ignored this release
DEB_CONFIGURE_EXTRA_FLAGS :=  --enable-shared --with-pic --with-szlib=/usr/include,$(LIBDIR)

ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
  DEB_CONFIGURE_EXTRA_FLAGS += --with-hdf5=/usr/include/hdf5/serial,/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
endif

export DEB_CFLAGS_MAINT_APPEND=-D_HDFEOS5_THREADSAFE -Df2cFortran
export DEB_LDFLAGS_MAINT_APPEND=-lpthread

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS)
	# Needed for the pthreads tests
	cp  samples/simple.txt testdrivers/threads

override_dh_auto_test:
	echo "Tests disabled in this version - known ok failures"

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/libhe5-hdfeos-dev/${LIBDIR}/pkgconfig debian/libhe5-hdfeos0/${LIBDIR}
	mv hdf-eos5.pc debian/libhe5-hdfeos-dev/${LIBDIR}/pkgconfig
	chrpath -d debian/tmp/${LIBDIR}/libhe5_hdfeos.so.0.0.0
	mv debian/tmp/${LIBDIR}/libhe5_hdfeos.so.0.0.0  debian/libhe5-hdfeos0/${LIBDIR}
	cp debian/tmp/usr/lib/*/*.a debian/libhe5-hdfeos-dev/${LIBDIR}
	cp -a samples/* debian/libhe5-hdfeos-dev/usr/share/doc/libhe5-hdfeos-dev/examples
	chmod -x debian/libhe5-hdfeos-dev/usr/share/doc/libhe5-hdfeos-dev/examples/*
	dh_link -p libhe5-hdfeos-dev ${LIBDIR}/libhe5_hdfeos.so.0.0.0 ${LIBDIR}/libhe5_hdfeos.so
	dh_link -p libhe5-hdfeos0   ${LIBDIR}/libhe5_hdfeos.so.0.0.0 ${LIBDIR}/libhe5_hdfeos.so.0