source: debian/rules @ ffe93e5

develop
Last change on this file since ffe93e5 was ffe93e5, checked in by Shane Alcock <salcock@…>, 2 years ago

Update packaging to correctly build DPDK-compatible libtrace

  • update rules to set --with-dpdk when running ./configure
  • update dependencies to use dpdk-dev instead of libdpdk-dev
  • 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                   --with-dpdk=yes \
38                   --mandir=\$${prefix}/share/man \
39                   --infodir=\$${prefix}/share/info
40       
41        touch configure-stamp
42
43build: build-arch build-indep
44build-arch: build-stamp
45build-indep: build-stamp
46build-stamp: configure-stamp
47        dh_testdir
48
49        # Add here commands to compile the package.
50        $(MAKE)
51
52        touch build-stamp
53
54clean:
55        dh_testdir
56        dh_testroot
57        rm -f build-stamp configure-stamp
58
59        [ ! -f Makefile ] || $(MAKE) clean
60        [ ! -f Makefile ] || $(MAKE) distclean
61        [ ! -f libtrace_backup.h ] || mv libtrace_backup.h lib/libtrace.h
62        rm -rf docs/doxygen
63       
64        dh_autoreconf_clean
65        dh_clean
66
67install: build
68        dh_testdir
69        dh_testroot
70        dh_clean -k
71        dh_installdirs
72
73        # Add here commands to install the package into debian/tmp
74        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
75
76
77# Build architecture-independent files here.
78binary-indep: build install
79# We have nothing to do by default.
80
81# Build architecture-dependent files here.
82binary-arch: build install
83        dh_testdir
84        dh_testroot
85        #dh_installchangelogs ChangeLog
86        dh_installchangelogs
87        dh_installdocs
88        dh_installexamples
89        dh_installman
90        dh_install --sourcedir=debian/tmp
91        dh_link
92        dh_strip
93        dh_compress
94        dh_fixperms
95        dh_makeshlibs
96        dh_installdeb
97        dh_shlibdeps
98        dh_gencontrol
99        dh_md5sums
100        dh_builddeb
101
102binary: binary-indep binary-arch
103.PHONY: build clean binary-indep binary-arch binary install
Note: See TracBrowser for help on using the repository browser.