#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie export DEB_CFLAGS_MAINT_APPEND = -Wall %: dh $@ override_dh_auto_configure-arch: dh_auto_configure -- -DLIB_SUFFIX=/${DEB_HOST_MULTIARCH} override_dh_auto_configure-indep: # Nothing to do override_dh_auto_build-arch: # Library dh_auto_build override_dh_auto_build-indep: # Build just the documentation mkdir -p doc/html doc/proj naturaldocs -i src/include -o HTML doc/html -p doc/proj override_dh_auto_test-arch: ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) # Simulate partial autopkgtest run by providing an AUTOPKGTEST_TMP # and setting CPATH/LIBRARY_PATH/LD_LIBRARY_PATH for the build test testrundir=$$(mktemp -d) ;\ AUTOPKGTEST_TMP=$$testrundir \ CPATH=$(CURDIR)/src/include \ LIBRARY_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src/ \ LD_LIBRARY_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src/ \ /bin/sh $(CURDIR)/debian/tests/build ;\ res=$$? ;\ rm -rf "$$testrundir" ;\ exit $$res endif override_dh_auto_test-indep: # Nothing to do override_dh_auto_install-arch: # Library dh_auto_install override_dh_auto_install-indep: # Nothing to do override_dh_installexamples-indep: dh_installexamples -i # Note that libfann-doc installs its files into libfann-dev, into what # debhelper calls the doc-main-package # Modify dataset paths in examples to point to libfann-doc datasets. This # was not implemented as a patch to upstream to preserve the ability to # run upstream's own tests within the source dir. sed -i \ -e 's|\.\./datasets|/usr/share/doc/libfann-dev/examples/datasets|' \ -e 's|"xor.data"|"/usr/share/doc/libfann-dev/examples/xor.data"|' \ -e 's|"scaling.data"|"/usr/share/doc/libfann-dev/examples/scaling.data"|' \ debian/libfann-doc/usr/share/doc/libfann-dev/examples/*.c # Add Makefile and compile/run instructions for the examples cp debian/libfann-doc.examples.Makefile \ debian/libfann-doc/usr/share/doc/libfann-dev/examples/Makefile cp debian/libfann-doc.examples.README \ debian/libfann-doc/usr/share/doc/libfann-dev/examples/README override_dh_fixperms-indep: dh_fixperms -i # Remove unnecessary executable bits from training data sets chmod 644 debian/libfann-doc/usr/share/doc/libfann-dev/examples/datasets/* override_dh_missing: dh_missing --fail-missing override_dh_compress: # FIXME: This is only needed because of #922795. It can be removed # after either depending on debhelper (>= 12.1.1), or the next # compat bump. dh_compress -Xexamples override_dh_auto_clean: # Perform regular clean process dh_auto_clean # Remove output generated by naturaldocs rm -rf doc/proj doc/html