File: rules

package info (click to toggle)
qhull 2015.2-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,648 kB
  • sloc: ansic: 39,632; cpp: 10,494; sh: 955; makefile: 773; xml: 203
file content (65 lines) | stat: -rwxr-xr-x 2,275 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

override_dh_auto_build:
	dh_auto_build
	@echo Building man pages
	cd debian &&							\
	  for info in "qconvex:compute the convex hull"			\
	              "qdelaunay:compute the Delaunay triangulation"	\
	              "qhalf:halfspace intersection about a point"	\
	              "qvoronoi:compute the Voronoi diagram" ; do	\
	      comm=$$(echo  $$info | cut -d: -f1) &&			\
	      purp=$$(echo  $$info | cut -d: -f2) &&			\
	      echo -n Building man page for $$comm... &&		\
	      sed "s/#command#/$$comm/;s/#purpose#/$$purp/"		\
	          manpage.in > $$comm.xml &&				\
	      docbook2x-man $$comm.xml &&				\
	      echo " done" ;						\
	  done

override_dh_auto_test:
	env PATH=$(CURDIR)/src:$${PATH} eg/q_test

override_dh_auto_install:
	dh_auto_install
	@echo No need for extra copy of license.
	rm --verbose debian/tmp/usr/share/doc/qhull/COPYING.txt || true
	@echo No need for doc/ copies of man pages in ../../man/man1/ or for other formats.
	@for f in qhull rbox; do \
	  for ext in man txt htm; do \
	    rm --verbose debian/tmp/usr/share/doc/qhull/$$f.$$ext || true; \
	  done \
	done
	@-mv --verbose debian/tmp/usr/lib/libqhullstatic.a debian/tmp/usr/lib/libqhull.a
	@-mv --verbose debian/tmp/usr/lib/libqhullstatic_p.a debian/tmp/usr/lib/libqhull_p.a
	find debian/tmp/usr/lib -type f -name '*.so*' \
	 -exec chrpath --list '{}' ';' \
	 -exec chrpath --delete '{}' ';'
	@echo 'Convenience links for #include <qhull/...> and #include <qhull/qhull.h>'
	mkdir -p debian/tmp/usr/include/qhull
	(cd debian/tmp/usr/include/qhull \
	 && ln --verbose -s ../libqhull/* ../libqhullcpp/* ./ \
	 && ln --verbose -s libqhull.h qhull.h)
	echo Convenience links for backwards compatibility \
	 > debian/tmp/usr/include/qhull/README

override_dh_installchangelogs:
	dh_installchangelogs src/Changes.txt

override_dh_link:
	mkdir -p debian/libqhull-doc/usr/share/doc/libqhull-doc/include
	@for f in $$(cd debian/tmp && echo usr/include/libqhull/*.h); do \
	  ln --verbose -s /$$f debian/libqhull-doc/usr/share/doc/libqhull-doc/include/; \
	done
	dh_link

override_dh_compress:
	dh_compress -X.c -X.h -X.txt