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
|
#!/usr/bin/make -f
#
# Copyright (C) 2008 Francesco Paolo Lovergine <frankie@debian.org>
# Released under GPL. See /usr/share/common-licenses/GPL for
# more information about the license.
#
# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk
UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
export DEB_CPPFLAGS_MAINT_APPEND = -I/usr/include/tirpc/
export DEB_LDFLAGS_MAINT_APPEND = -ltirpc
ifneq (,$(filter $(DEB_BUILD_ARCH),armhf))
export CC=gcc-14
export CXX=g++-14
endif
ifneq (,$(findstring verbose,$(DEB_BUILD_OPTIONS)))
DH_VERBOSE=1
export DH_VERBOSE
endif
%:
dh $@
override_dh_auto_configure:
# configure the netcdf compatible flavor, without fortran functions.
dh_auto_configure -- --includedir=/usr/include/hdf \
--enable-shared \
--disable-fortran \
--disable-netcdf \
--with-szlib=yes
override_dh_auto_test:
ifneq (,$(filter $(DEB_BUILD_ARCH),ppc64el s390x sparc64))
dh_auto_test --no-parallel || echo "Ignoring test failures"
else
dh_auto_test --no-parallel
endif
execute_after_dh_auto_install:
# strip rpath from binaries
-find $(CURDIR)/debian/tmp/usr/bin -type f -not -name h4cc -not -name h4redeploy -exec chrpath --delete {} \;
# strip rpath from libraries
-find $(CURDIR)/debian/tmp/usr/lib -name "*.so*" -type f -exec chrpath --delete {} \;
# rename programs also provided by netcdf-bin
mv $(CURDIR)/debian/tmp/usr/bin/ncdump $(CURDIR)/debian/tmp/usr/bin/ncdump-hdf
mv $(CURDIR)/debian/tmp/usr/bin/ncgen $(CURDIR)/debian/tmp/usr/bin/ncgen-hdf
# rename manuals also provided by netcdf-bin
mv $(CURDIR)/debian/tmp/usr/share/man/man1/ncdump.1 $(CURDIR)/debian/tmp/usr/share/man/man1/ncdump-hdf.1
sed -i -e 's/ncdump/ncdump-hdf/g' $(CURDIR)/debian/tmp/usr/share/man/man1/ncdump-hdf.1
mv $(CURDIR)/debian/tmp/usr/share/man/man1/ncgen.1 $(CURDIR)/debian/tmp/usr/share/man/man1/ncgen-hdf.1
sed -i -e 's/ncgen/ncgen-hdf/g' $(CURDIR)/debian/tmp/usr/share/man/man1/ncgen-hdf.1
execute_after_dh_installman:
$(RM) $(CURDIR)/debian/hdf4-tools/usr/share/man/man1/hdf.1
override_dh_makeshlibs:
dh_makeshlibs -- -v$(UPSTREAM_VERSION)
|