source: debian/rules @ 823d8e1

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivendag_formatrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 823d8e1 was 78fe0d2, checked in by Shane Alcock <salcock@…>, 5 years ago

Add Brad's Debian packaging to repo

  • Property mode set to 100755
File size: 2.3 KB
Line 
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# Enable all hardening features, since traces are untrusted input.
7export DEB_BUILD_MAINT_OPTIONS = hardening=+all
8DPKG_EXPORT_BUILDFLAGS = 1
9include /usr/share/dpkg/buildflags.mk
10
11# These are used for cross-compiling and for saving the configure script
12# from having to guess our platform (since we know it already)
13DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15CONFFLAGS =
16ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
17        CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
18else
19        CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
20endif
21
22
23libtrace_backup.h:
24        # libtrace.h is modified by the build, so back it up so it can be restored
25        # by the clean target
26        cp lib/libtrace.h libtrace_backup.h
27
28configure:
29
30configure-stamp: configure libtrace_backup.h
31        dh_testdir
32       
33        dh_autoreconf
34       
35        ./configure $(CONFFLAGS) \
36                   --prefix=/usr \
37                   --mandir=\$${prefix}/share/man \
38                   --infodir=\$${prefix}/share/info
39       
40        touch configure-stamp
41
42build: build-arch build-indep
43build-arch: build-stamp
44build-indep: build-stamp
45build-stamp: configure-stamp
46        dh_testdir
47
48        # Add here commands to compile the package.
49        $(MAKE)
50
51        touch build-stamp
52
53clean:
54        dh_testdir
55        dh_testroot
56        rm -f build-stamp configure-stamp
57
58        [ ! -f Makefile ] || $(MAKE) clean
59        [ ! -f Makefile ] || $(MAKE) distclean
60        [ ! -f libtrace_backup.h ] || mv libtrace_backup.h lib/libtrace.h
61        rm -rf docs/doxygen
62       
63        dh_autoreconf_clean
64        dh_clean
65
66install: build
67        dh_testdir
68        dh_testroot
69        dh_clean -k
70        dh_installdirs
71
72        # Add here commands to install the package into debian/tmp
73        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
74
75
76# Build architecture-independent files here.
77binary-indep: build install
78# We have nothing to do by default.
79
80# Build architecture-dependent files here.
81binary-arch: build install
82        dh_testdir
83        dh_testroot
84        #dh_installchangelogs ChangeLog
85        dh_installchangelogs
86        dh_installdocs
87        dh_installexamples
88        dh_installman
89        dh_install --sourcedir=debian/tmp
90        dh_link
91        dh_strip
92        dh_compress
93        dh_fixperms
94        dh_makeshlibs
95        dh_installdeb
96        dh_shlibdeps
97        dh_gencontrol
98        dh_md5sums
99        dh_builddeb
100
101binary: binary-indep binary-arch
102.PHONY: build clean binary-indep binary-arch binary install
Note: See TracBrowser for help on using the repository browser.