File: rules

package info (click to toggle)
hdf-eos4 2.20v1.00-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 34,028 kB
  • sloc: ansic: 46,955; sh: 23,547; fortran: 15,467; csh: 1,098; makefile: 633
file content (49 lines) | stat: -rwxr-xr-x 1,529 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
#!/usr/bin/make -f

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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH)
BUILDDIR:=$(shell pwd)
AUTOGENERATED:= libhdfeos-dev.install

CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)

# Set SHELL in examples/ makefiles to /bin/sh
export CONFIG_SHELL=/bin/sh

# Magic debhelper rule
%:
	dh   $@ 

override_dh_auto_clean:
	find . -type l -delete
	rm -f libtool config.status config.log samples/*.hdf testdrivers/*/*.hdf
	rm -f $(patsubst %, debian/%, ${AUTOGENERATED})

override_dh_auto_test:
	@echo "Tests disabled"

override_dh_auto_configure:
	for f in ${AUTOGENERATED} ; do \
                sed -e 's%@ARCH@%${DEB_HOST_MULTIARCH}%g' < debian/$$f.in  > debian/$$f ; \
                done
	dh_auto_configure -- --enable-shared --with-pic \
		CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -Df2cFortran -I/usr/include/hdf"
	# FIXME: a sort of hack
	ln -sf testswath.f testdrivers/swath/testswath77.f
	ln -sf testpoint.f testdrivers/point/testpoint77.f

override_dh_auto_install:
	dh_auto_install
	# Undo permissions we don't want
	$(MAKE) -C samples clean
	chmod -x samples/*
	# Lose the builddir for reproducibility
	sed -e 's%${BUILDDIR}%/nonexistant%' < samples/Makefile > x
	mv x samples/Makefile
	# Symlinks
	dh_link -p libhdfeos0 $(LIBDIR)/libhdfeos.so.0.0.0  $(LIBDIR)/libhdfeos.so.0
	dh_link -p libhdfeos-dev $(LIBDIR)/libhdfeos.so.0.0.0 $(LIBDIR)/libhdfeos.so