File: rules

package info (click to toggle)
quelcom 0.4.0-13
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 1,524 kB
  • ctags: 1,256
  • sloc: cpp: 4,148; makefile: 184; sh: 15
file content (81 lines) | stat: -rwxr-xr-x 2,199 bytes parent folder | download
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
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/make -f
# $Id: rules 784 2012-01-17 09:28:07Z aqua $

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

# To resolve shlib dependencies at runtime, we need to take the annoying step
# of wrapping the executables in a shell script that can add a private library
# path to $LD_LIBRARY_PATH, then invoke the real binary from /usr/lib/quelcom/.
# This seemed the least odious of the available options.

build: build-stamp build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir
	# stripping is disabled during the build so that it can
	# be done (or not) by dh_strip
	$(MAKE) PREFIX=/usr STRIP=/bin/true
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	$(MAKE) clean
	# Clean up the HTML docs
	rm -rf doc/quelcom doc/html
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# binaries go to /usr/lib/quelcom for use by the wrapper
	$(MAKE) \
		PREFIX=$(CURDIR)/debian/quelcom/usr \
		INFODIR=$(CURDIR)/debian/quelcom/usr/share/info \
		BINDIR=$(CURDIR)/debian/quelcom/usr/lib/quelcom \
		LIBDIR=$(CURDIR)/debian/quelcom/usr/lib/quelcom \
		install
	# install the wrapper
	mkdir -p $(CURDIR)/debian/quelcom/usr/bin
	install debian/wrapper.sh $(CURDIR)/debian/quelcom/usr/bin/quelcom
	for e in "$(CURDIR)/debian/quelcom/usr/lib/quelcom/q"* ; do \
		ln -s quelcom $(CURDIR)/debian/quelcom/usr/bin/`basename "$$e"`;\
	done

	# move the generated HTML docs over so dh_installdocs can
	# be given a more suitable name later on
	mv doc/quelcom doc/html

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs README doc/html doc/quelcom.txt
	dh_installexamples
	dh_install
	dh_installinfo
	dh_installman debian/manpages/*
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	LD_LIBRARY_PATH="$(CURDIR)/debian/quelcom/usr/lib/quelcom" dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install