Rev 105 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 2 | magnus | 1 | #!/usr/bin/make -f | 
| 79 | magnus | 2 | # -*- makefile -*- | 
| 3 | # Sample debian/rules that uses debhelper. | ||
| 4 | # GNU copyright 1997 to 1999 by Joey Hess. | ||
| 2 | magnus | 5 | |
| 79 | magnus | 6 | # Uncomment this to turn on verbose mode. | 
| 7 | #export DH_VERBOSE=1 | ||
| 2 | magnus | 8 | |
| 79 | magnus | 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) | ||
| 2 | magnus | 13 | |
| 79 | magnus | 14 | ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) | 
| 15 | buildflags = --build=$(DEB_BUILD_GNU_TYPE) | ||
| 16 | else | ||
| 17 | buildflags = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) | ||
| 18 | endif | ||
| 2 | magnus | 19 | |
| 79 | magnus | 20 | parallel = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) | 
| 21 | ifneq (,$(parallel)) | ||
| 22 | jobsflag = -j$(parallel) | ||
| 23 | endif | ||
| 24 | |||
| 25 | config.status: configure.ac | ||
| 26 | dh_testdir | ||
| 27 | # Add here commands to configure the package. | ||
| 28 | dh_autoreconf | ||
| 29 | ./configure $(buildflags) \ | ||
| 30 | --prefix=/usr \ | ||
| 31 | --disable-dependency-tracking \ | ||
| 32 | --enable-pam --enable-kerberos --enable-srp \ | ||
| 33 | --with-pty --enable-tcp-forward --enable-x11-forward \ | ||
| 34 | --enable-agent-forward --enable-ipv6 --enable-utmp \ | ||
| 35 | --with-zlib --with-tcpwrappers --with-sshd1=/usr/sbin/sshd \ | ||
| 36 | --with-x XAUTH_PROGRAM=/usr/bin/xauth \ | ||
| 93 | magnus | 37 | $(shell DEB_LDFLAGS_MAINT_PREPEND="-Wl,-z,defs -Wl,--as-needed" dpkg-buildflags --export=configure) | 
| 79 | magnus | 38 | |
| 39 | build: build-stamp | ||
| 40 | build-stamp: config.status | ||
| 41 | dh_testdir | ||
| 42 | |||
| 43 | # Add here commands to compile the package. | ||
| 44 | $(MAKE) $(jobsflag) MAKEINFO='makeinfo --enable-encoding' | ||
| 85 | magnus | 45 | ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) | 
| 46 | $(MAKE) check | ||
| 47 | endif | ||
| 79 | magnus | 48 | |
| 49 | touch build-stamp | ||
| 50 | |||
| 51 | clean: | ||
| 52 | dh_testdir | ||
| 53 | dh_testroot | ||
| 54 | rm -f build-stamp | ||
| 55 | |||
| 56 | # Add here commands to clean up after the build process. | ||
| 57 | [ ! -f Makefile ] || $(MAKE) distclean | ||
| 58 | dh_autoreconf_clean | ||
| 59 | dh_clean | ||
| 60 | |||
| 61 | install: build | ||
| 62 | dh_testdir | ||
| 63 | dh_testroot | ||
| 86 | magnus | 64 | dh_prep | 
| 79 | magnus | 65 | dh_installdirs | 
| 66 | |||
| 67 | # Add here commands to install the package into debian/tmp | ||
| 68 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp | ||
| 69 | |||
| 70 | build-indep build-arch: build | ||
| 71 | |||
| 72 | # Build architecture-independent files here. | ||
| 73 | binary-indep: build-indep install | ||
| 74 | dh_testdir | ||
| 75 | dh_testroot | ||
| 76 | dh_install -i --sourcedir=debian/tmp | ||
| 77 | dh_link -i | ||
| 78 | dh_installchangelogs -i ChangeLog | ||
| 79 | dh_installdocs -i -A README | ||
| 80 | dh_installinfo -i | ||
| 81 | dh_installman -i | ||
| 82 | dh_installdebconf -i | ||
| 83 | dh_compress -i | ||
| 84 | dh_fixperms -i | ||
| 85 | dh_makeshlibs -i | ||
| 86 | dh_installdeb -i | ||
| 87 | dh_shlibdeps -i | ||
| 88 | dh_gencontrol -i | ||
| 89 | dh_md5sums -i | ||
| 90 | dh_builddeb -i | ||
| 91 | |||
| 92 | # Build architecture-dependent files here. | ||
| 93 | binary-arch: build-arch install | ||
| 94 | dh_testdir | ||
| 95 | dh_testroot | ||
| 96 | dh_install -a --sourcedir=debian/tmp | ||
| 97 | dh_link -a | ||
| 98 | dh_installchangelogs -a ChangeLog | ||
| 99 | dh_installdocs -a -A README | ||
| 100 | dh_installexamples -a | ||
| 101 | dh_installman -a | ||
| 120 | magnus | 102 | dh_systemd_enable -a | 
| 79 | magnus | 103 | dh_installinit -a | 
| 120 | magnus | 104 | dh_systemd_start -a | 
| 79 | magnus | 105 | dh_installdebconf -a | 
| 106 | dh_strip -a | ||
| 107 | dh_compress -a | ||
| 108 | dh_fixperms -a | ||
| 109 | dh_makeshlibs -a | ||
| 110 | dh_installdeb -a | ||
| 111 | dh_shlibdeps -a | ||
| 112 | dh_gencontrol -a | ||
| 113 | dh_md5sums -a | ||
| 114 | dh_builddeb -a | ||
| 115 | |||
| 116 | binary: binary-arch binary-indep | ||
| 117 | .PHONY: build-indep build-arch build clean clean-patched binary-indep binary-arch binary install |