Rev 54 | Rev 65 | 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 | |||
| 14 | CFLAGS = -Wall -g |
||
| 47 | magnus | 15 | LDFLAGS = -Wl,--as-needed |
| 2 | magnus | 16 | |
| 54 | magnus | 17 | ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
| 2 | magnus | 18 | CFLAGS += -O0 |
| 19 | else |
||
| 20 | CFLAGS += -O2 |
||
| 21 | endif |
||
| 53 | magnus | 22 | ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) |
| 2 | magnus | 23 | INSTALL_PROGRAM += -s |
| 24 | endif |
||
| 25 | |||
| 64 | magnus | 26 | config.status: configure |
| 2 | magnus | 27 | dh_testdir |
| 28 | # Add here commands to configure the package. |
||
| 64 | magnus | 29 | dh_autotools-dev_updateconfig |
| 47 | magnus | 30 | ./configure --host=$(DEB_HOST_GNU_TYPE) \ |
| 31 | --build=$(DEB_BUILD_GNU_TYPE) \ |
||
| 32 | --prefix=/usr \ |
||
| 33 | --mandir=\$${prefix}/share/man \ |
||
| 34 | --infodir=\$${prefix}/share/info \ |
||
| 35 | --enable-shared \ |
||
| 36 | --disable-dependency-tracking \ |
||
| 37 | CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" |
||
| 2 | magnus | 38 | |
| 39 | |||
| 40 | build: build-stamp |
||
| 41 | build-stamp: config.status |
||
| 42 | dh_testdir |
||
| 43 | |||
| 44 | # Add here commands to compile the package. |
||
| 15 | magnus | 45 | $(MAKE) MAKEINFO='makeinfo --enable-encoding' |
| 54 | magnus | 46 | ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 15 | magnus | 47 | $(MAKE) check |
| 48 | endif |
||
| 2 | magnus | 49 | |
| 50 | touch build-stamp |
||
| 51 | |||
| 64 | magnus | 52 | clean: |
| 2 | magnus | 53 | dh_testdir |
| 54 | dh_testroot |
||
| 55 | rm -f build-stamp |
||
| 56 | |||
| 57 | # Add here commands to clean up after the build process. |
||
| 35 | magnus | 58 | [ ! -f Makefile ] || $(MAKE) distclean |
| 64 | magnus | 59 | dh_autotools-dev_restoreconfig |
| 60 | dh_clean |
||
| 2 | magnus | 61 | |
| 62 | install: build |
||
| 63 | dh_testdir |
||
| 64 | dh_testroot |
||
| 65 | dh_clean -k |
||
| 66 | dh_installdirs |
||
| 67 | |||
| 68 | # Add here commands to install the package into debian/tmp |
||
| 69 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
||
| 70 | |||
| 71 | # Build architecture-independent files here. |
||
| 52 | magnus | 72 | binary-indep: |
| 73 | # Nothing to do |
||
| 2 | magnus | 74 | |
| 75 | # Build architecture-dependent files here. |
||
| 76 | binary-arch: build install |
||
| 77 | dh_testdir |
||
| 78 | dh_testroot |
||
| 47 | magnus | 79 | dh_install -a --sourcedir=debian/tmp |
| 80 | dh_link -a |
||
| 81 | dh_installchangelogs -a ChangeLog |
||
| 82 | dh_installdocs -a |
||
| 83 | dh_installexamples -a |
||
| 84 | dh_installinfo -a |
||
| 85 | dh_installman -a |
||
| 51 | magnus | 86 | dh_strip -a --dbg-package=nettle-dbg |
| 52 | magnus | 87 | dh_compress -a -X.pdf |
| 47 | magnus | 88 | dh_fixperms -a |
| 89 | dh_makeshlibs #-V 'libnettle2 (>= 1.15)' |
||
| 90 | dh_installdeb -a |
||
| 91 | dh_shlibdeps -a |
||
| 92 | dh_gencontrol -a |
||
| 93 | dh_md5sums -a |
||
| 94 | dh_builddeb -a |
||
| 2 | magnus | 95 | |
| 52 | magnus | 96 | binary: binary-arch |
| 6 | magnus | 97 | .PHONY: build clean clean-patched binary-indep binary-arch binary install |