| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) |
| 8 |
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 9 |
|
| 10 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie |
| 11 |
export DEB_CFLAGS_MAINT_APPEND = -Wall |
| 12 |
|
| 13 |
|
| 14 |
%: |
| 15 |
dh $@ |
| 16 |
|
| 17 |
|
| 18 |
override_dh_auto_configure-arch: |
| 19 |
dh_auto_configure -- -DLIB_SUFFIX=/${DEB_HOST_MULTIARCH} |
| 20 |
|
| 21 |
|
| 22 |
override_dh_auto_configure-indep: |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
override_dh_auto_build-arch: |
| 27 |
|
| 28 |
dh_auto_build |
| 29 |
|
| 30 |
|
| 31 |
override_dh_auto_build-indep: |
| 32 |
|
| 33 |
mkdir -p doc/html doc/proj |
| 34 |
naturaldocs -i src/include -o HTML doc/html -p doc/proj |
| 35 |
|
| 36 |
|
| 37 |
override_dh_auto_test-arch: |
| 38 |
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) |
| 39 |
|
| 40 |
|
| 41 |
testrundir=$$(mktemp -d) ;\ |
| 42 |
AUTOPKGTEST_TMP=$$testrundir \ |
| 43 |
CPATH=$(CURDIR)/src/include \ |
| 44 |
LIBRARY_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src/ \ |
| 45 |
LD_LIBRARY_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src/ \ |
| 46 |
/bin/sh $(CURDIR)/debian/tests/build ;\ |
| 47 |
res=$$? ;\ |
| 48 |
rm -rf "$$testrundir" ;\ |
| 49 |
exit $$res |
| 50 |
endif |
| 51 |
|
| 52 |
|
| 53 |
override_dh_auto_test-indep: |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
override_dh_auto_install-arch: |
| 58 |
|
| 59 |
dh_auto_install |
| 60 |
|
| 61 |
|
| 62 |
override_dh_auto_install-indep: |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
override_dh_installexamples-indep: |
| 67 |
dh_installexamples -i |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
sed -i \ |
| 75 |
-e 's|\.\./datasets|/usr/share/doc/libfann-dev/examples/datasets|' \ |
| 76 |
-e 's|"xor.data"|"/usr/share/doc/libfann-dev/examples/xor.data"|' \ |
| 77 |
-e 's|"scaling.data"|"/usr/share/doc/libfann-dev/examples/scaling.data"|' \ |
| 78 |
debian/libfann-doc/usr/share/doc/libfann-dev/examples/*.c |
| 79 |
|
| 80 |
|
| 81 |
cp debian/libfann-doc.examples.Makefile \ |
| 82 |
debian/libfann-doc/usr/share/doc/libfann-dev/examples/Makefile |
| 83 |
cp debian/libfann-doc.examples.README \ |
| 84 |
debian/libfann-doc/usr/share/doc/libfann-dev/examples/README |
| 85 |
|
| 86 |
|
| 87 |
override_dh_fixperms-indep: |
| 88 |
dh_fixperms -i |
| 89 |
|
| 90 |
chmod 644 debian/libfann-doc/usr/share/doc/libfann-dev/examples/datasets/* |
| 91 |
|
| 92 |
|
| 93 |
override_dh_auto_clean: |
| 94 |
|
| 95 |
dh_auto_clean |
| 96 |
|
| 97 |
|
| 98 |
rm -rf doc/proj doc/html |