Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
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 # Nothing to do
24
25
26 override_dh_auto_build-arch:
27 # Library
28 dh_auto_build
29
30
31 override_dh_auto_build-indep:
32 # Build just the documentation
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 # Simulate partial autopkgtest run by providing an AUTOPKGTEST_TMP
40 # and setting CPATH/LIBRARY_PATH/LD_LIBRARY_PATH for the build test
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 # Nothing to do
55
56
57 override_dh_auto_install-arch:
58 # Library
59 dh_auto_install
60
61
62 override_dh_auto_install-indep:
63 # Nothing to do
64
65
66 override_dh_installexamples-indep:
67 dh_installexamples -i
68 # Note that libfann-doc installs its files into libfann-dev, into what
69 # debhelper calls the doc-main-package
70
71 # Modify dataset paths in examples to point to libfann-doc datasets. This
72 # was not implemented as a patch to upstream to preserve the ability to
73 # run upstream's own tests within the source dir.
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 # Add Makefile and compile/run instructions for the examples
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 # Remove unnecessary executable bits from training data sets
90 chmod 644 debian/libfann-doc/usr/share/doc/libfann-dev/examples/datasets/*
91
92
93 override_dh_auto_clean:
94 # Perform regular clean process
95 dh_auto_clean
96
97 # Remove output generated by naturaldocs
98 rm -rf doc/proj doc/html