Rev 64 | Rev 67 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | magnus | 1 | #!/usr/bin/make -f |
2 | # -*- makefile -*- |
||
3 | # Sample debian/rules that uses debhelper. |
||
4 | # GNU copyright 1997 to 1999 by Joey Hess. |
||
5 | |||
6 | # Uncomment this to turn on verbose mode. |
||
7 | #export DH_VERBOSE=1 |
||
8 | |||
9 | # These are used for cross-compiling and for saving the configure script |
||
10 | # from having to guess our platform (since we know it already) |
||
11 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
||
12 | DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
||
13 | |||
65 | magnus | 14 | ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
15 | buildflags = --build=$(DEB_BUILD_GNU_TYPE) |
||
2 | magnus | 16 | else |
65 | magnus | 17 | buildflags = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) |
2 | magnus | 18 | endif |
65 | magnus | 19 | |
20 | parallel = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
||
21 | ifneq (,$(parallel)) |
||
22 | jobsflag = -j$(parallel) |
||
2 | magnus | 23 | endif |
24 | |||
64 | magnus | 25 | config.status: configure |
2 | magnus | 26 | dh_testdir |
27 | # Add here commands to configure the package. |
||
64 | magnus | 28 | dh_autotools-dev_updateconfig |
65 | magnus | 29 | ./configure $(buildflags) \ |
47 | magnus | 30 | --prefix=/usr \ |
65 | magnus | 31 | --libdir=/usr/lib \ |
47 | magnus | 32 | --enable-shared \ |
33 | --disable-dependency-tracking \ |
||
65 | magnus | 34 | CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS) -Wl,--as-needed" |
2 | magnus | 35 | |
36 | |||
37 | build: build-stamp |
||
38 | build-stamp: config.status |
||
39 | dh_testdir |
||
40 | |||
41 | # Add here commands to compile the package. |
||
65 | magnus | 42 | $(MAKE) $(jobsflag) MAKEINFO='makeinfo --enable-encoding' |
54 | magnus | 43 | ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
15 | magnus | 44 | $(MAKE) check |
45 | endif |
||
2 | magnus | 46 | |
47 | touch build-stamp |
||
48 | |||
64 | magnus | 49 | clean: |
2 | magnus | 50 | dh_testdir |
51 | dh_testroot |
||
52 | rm -f build-stamp |
||
53 | |||
54 | # Add here commands to clean up after the build process. |
||
35 | magnus | 55 | [ ! -f Makefile ] || $(MAKE) distclean |
64 | magnus | 56 | dh_autotools-dev_restoreconfig |
57 | dh_clean |
||
2 | magnus | 58 | |
59 | install: build |
||
60 | dh_testdir |
||
61 | dh_testroot |
||
62 | dh_clean -k |
||
63 | dh_installdirs |
||
64 | |||
65 | # Add here commands to install the package into debian/tmp |
||
66 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
||
67 | |||
68 | # Build architecture-independent files here. |
||
52 | magnus | 69 | binary-indep: |
70 | # Nothing to do |
||
2 | magnus | 71 | |
72 | # Build architecture-dependent files here. |
||
73 | binary-arch: build install |
||
74 | dh_testdir |
||
75 | dh_testroot |
||
47 | magnus | 76 | dh_install -a --sourcedir=debian/tmp |
77 | dh_link -a |
||
78 | dh_installchangelogs -a ChangeLog |
||
79 | dh_installdocs -a |
||
80 | dh_installexamples -a |
||
81 | dh_installinfo -a |
||
82 | dh_installman -a |
||
51 | magnus | 83 | dh_strip -a --dbg-package=nettle-dbg |
52 | magnus | 84 | dh_compress -a -X.pdf |
47 | magnus | 85 | dh_fixperms -a |
65 | magnus | 86 | dh_makeshlibs -a |
47 | magnus | 87 | dh_installdeb -a |
88 | dh_shlibdeps -a |
||
89 | dh_gencontrol -a |
||
90 | dh_md5sums -a |
||
91 | dh_builddeb -a |
||
2 | magnus | 92 | |
52 | magnus | 93 | binary: binary-arch |
6 | magnus | 94 | .PHONY: build clean clean-patched binary-indep binary-arch binary install |