source: debian/rules @ dd48bb5

develop
Last change on this file since dd48bb5 was dd48bb5, checked in by Brad Cowie <brad@…>, 3 years ago

Add debian packaging.

  • Property mode set to 100755
File size: 2.0 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
23configure:
24
25configure-stamp: configure
26        dh_testdir
27
28        dh_autoreconf
29
30        ./configure $(CONFFLAGS) \
31                   --prefix=/usr \
32                   --mandir=\$${prefix}/share/man \
33                   --infodir=\$${prefix}/share/info
34
35        touch configure-stamp
36
37build: build-arch build-indep
38build-arch: build-stamp
39build-indep: build-stamp
40build-stamp: configure-stamp
41        dh_testdir
42
43        # Add here commands to compile the package.
44        $(MAKE)
45
46        touch build-stamp
47
48clean:
49        dh_testdir
50        dh_testroot
51        rm -f build-stamp configure-stamp
52
53        [ ! -f Makefile ] || $(MAKE) clean
54        [ ! -f Makefile ] || $(MAKE) distclean
55        rm -rf docs/doxygen
56
57        dh_autoreconf_clean
58        dh_clean
59
60install: build
61        dh_testdir
62        dh_testroot
63        dh_clean -k
64        dh_installdirs
65
66        # Add here commands to install the package into debian/tmp
67        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
68
69# Build architecture-independent files here.
70binary-indep: build install
71# We have nothing to do by default.
72
73# Build architecture-dependent files here.
74binary-arch: build install
75        dh_testdir
76        dh_testroot
77        #dh_installchangelogs ChangeLog
78        dh_installchangelogs
79        dh_installdocs
80        dh_installexamples
81        dh_installman
82        dh_install --sourcedir=debian/tmp
83        dh_link
84        dh_strip
85        dh_compress
86        dh_fixperms
87        dh_makeshlibs
88        dh_installdeb
89        dh_shlibdeps
90        dh_gencontrol
91        dh_md5sums
92        dh_builddeb
93
94binary: binary-indep binary-arch
95.PHONY: build clean binary-indep binary-arch binary install
Note: See TracBrowser for help on using the repository browser.