Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 # These are used for cross-compiling and for saving the configure script
7 # from having to guess our platform (since we know it already)
8 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
10
11 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
12 CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
13 CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
14 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
15
16 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
17
18 # shared library versions, option 1
19 version=2.0.5
20 major=2
21 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
22 #version=`ls src/.libs/lib*.so.* | \
23 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
24 #major=`ls src/.libs/lib*.so.* | \
25 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
26
27 config.status:
28 dh_testdir
29 dh_autoreconf
30 ./configure \
31 CFLAGS="$(CFLAGS)" \
32 CXXFLAGS="$(CXXFLAGS)" \
33 CPPFLAGS="$(CPPFLAGS)" \
34 LDFLAGS="$(LDFLAGS) -Wl,-z,defs -Wl,-as-needed -Wl,--no-undefined" \
35 --host=$(DEB_HOST_GNU_TYPE) \
36 --build=$(DEB_BUILD_GNU_TYPE) \
37 --prefix=/usr \
38 --mandir=\$${prefix}/share/man \
39 --infodir=\$${prefix}/share/info \
40 --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
41 --enable-static \
42 --enable-shared
43
44 build-indep:
45
46 build-arch: build-stamp
47 build-stamp: config.status
48 dh_testdir
49 $(MAKE)
50 touch $@
51
52 build: build-indep build-arch
53
54 clean:
55 dh_testdir
56 dh_testroot
57 rm -f build-stamp
58 [ ! -f Makefile ] || $(MAKE) distclean
59 dh_autoreconf_clean
60 dh_clean
61
62 install: build
63 dh_testdir
64 dh_testroot
65 dh_prep
66 dh_installdirs
67 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
68 chrpath --delete $(CURDIR)/debian/tmp/usr/bin/*
69
70 # Build architecture-independent files here.
71 binary-indep: build install
72
73 # Build architecture-dependent files here.
74 binary-arch: build install
75 dh_testdir
76 dh_testroot
77 dh_installchangelogs
78 dh_installdocs
79 dh_installexamples examples/* src/boolstuff/*test*
80 dh_install --sourcedir=debian/tmp/
81 # dh_installmenu
82 # dh_installdebconf
83 dh_installman
84 dh_link
85 dh_strip
86 dh_compress
87 dh_fixperms
88 dh_makeshlibs
89 dh_installdeb
90 dh_shlibdeps
91 dh_gencontrol
92 dh_md5sums
93 dh_builddeb
94
95 binary: binary-indep binary-arch
96 .PHONY: build clean binary-indep binary-arch binary install