[24167] | 1 | #!/usr/bin/make -f |
---|
| 2 | # -*- makefile -*- |
---|
| 3 | |
---|
| 4 | # Uncomment this to turn on verbose mode. |
---|
| 5 | #export DH_VERBOSE=1 |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | # These are used for cross-compiling and for saving the configure script |
---|
| 9 | # from having to guess our platform (since we know it already) |
---|
| 10 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
---|
| 11 | DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | CFLAGS = -Wall -g |
---|
| 15 | |
---|
| 16 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
---|
| 17 | CFLAGS += -O0 |
---|
| 18 | else |
---|
| 19 | CFLAGS += -O2 |
---|
| 20 | endif |
---|
| 21 | |
---|
| 22 | debian/build/config.status: configure |
---|
| 23 | dh_testdir |
---|
| 24 | |
---|
| 25 | [ -d debian/build ] || mkdir debian/build |
---|
| 26 | |
---|
| 27 | cd debian/build; \ |
---|
| 28 | CFLAGS="$(CFLAGS)" ../../configure \ |
---|
| 29 | --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ |
---|
| 30 | --prefix=/usr \ |
---|
| 31 | --sysconfdir=/etc \ |
---|
| 32 | --libexecdir=/usr/lib \ |
---|
| 33 | --localstatedir=/var \ |
---|
| 34 | --mandir=\$${prefix}/share/man \ |
---|
| 35 | --infodir=\$${prefix}/share/info \ |
---|
| 36 | --enable-dchroot --enable-dchroot-dsa \ |
---|
| 37 | --enable-doxygen \ |
---|
| 38 | --enable-static --disable-shared \ |
---|
| 39 | --with-bash-completion-dir=/etc/bash_completion.d |
---|
| 40 | |
---|
| 41 | build: build-stamp |
---|
| 42 | |
---|
| 43 | build-stamp: debian/build/config.status |
---|
| 44 | dh_testdir |
---|
| 45 | $(MAKE) -C debian/build all |
---|
| 46 | touch build-stamp |
---|
| 47 | |
---|
| 48 | clean: |
---|
| 49 | dh_testdir |
---|
| 50 | dh_testroot |
---|
| 51 | rm -rf debian/build |
---|
| 52 | rm -rf debian/install |
---|
| 53 | rm -f build-stamp |
---|
| 54 | |
---|
| 55 | ifneq "$(wildcard /usr/share/misc/config.sub)" "" |
---|
| 56 | cp -f /usr/share/misc/config.sub scripts/config.sub |
---|
| 57 | endif |
---|
| 58 | ifneq "$(wildcard /usr/share/misc/config.guess)" "" |
---|
| 59 | cp -f /usr/share/misc/config.guess scripts/config.guess |
---|
| 60 | endif |
---|
| 61 | |
---|
| 62 | dh_clean |
---|
| 63 | |
---|
| 64 | check: build |
---|
| 65 | dh_testdir |
---|
| 66 | dh_testroot |
---|
| 67 | $(MAKE) -C debian/build check |
---|
| 68 | |
---|
| 69 | install: check |
---|
| 70 | dh_testdir |
---|
| 71 | dh_testroot |
---|
| 72 | dh_prep |
---|
| 73 | rm -rf debian/install |
---|
| 74 | |
---|
| 75 | dh_installdirs |
---|
| 76 | |
---|
| 77 | $(MAKE) -C debian/build install DESTDIR=$(CURDIR)/debian/install |
---|
| 78 | dh_install |
---|
| 79 | |
---|
| 80 | mkdir -p $(CURDIR)/debian/dchroot/usr/share/lintian/overrides |
---|
| 81 | mkdir -p $(CURDIR)/debian/dchroot-dsa/usr/share/lintian/overrides |
---|
| 82 | mkdir -p $(CURDIR)/debian/schroot/usr/share/lintian/overrides |
---|
| 83 | cp $(CURDIR)/debian/dchroot.lintian-overrides $(CURDIR)/debian/dchroot/usr/share/lintian/overrides/dchroot |
---|
| 84 | cp $(CURDIR)/debian/dchroot-dsa.lintian-overrides $(CURDIR)/debian/dchroot-dsa/usr/share/lintian/overrides/dchroot-dsa |
---|
| 85 | cp $(CURDIR)/debian/schroot.lintian-overrides $(CURDIR)/debian/schroot/usr/share/lintian/overrides/schroot |
---|
| 86 | |
---|
| 87 | # Build architecture-independent files here. |
---|
| 88 | binary-indep: build install |
---|
| 89 | dh_testdir -i |
---|
| 90 | dh_testroot -i |
---|
| 91 | dh_installchangelogs -i ChangeLog |
---|
| 92 | dh_installdocs -i |
---|
| 93 | find $(CURDIR)/debian/libsbuild-doc/usr/share/doc/libsbuild-doc -name '*.map' -print0 | xargs -0 rm -f |
---|
| 94 | find $(CURDIR)/debian/libsbuild-doc/usr/share/doc/libsbuild-doc -name '*.md5' -print0 | xargs -0 rm -f |
---|
| 95 | dh_installexamples -i |
---|
| 96 | dh_installman -i |
---|
| 97 | dh_link -i |
---|
| 98 | dh_compress -i |
---|
| 99 | dh_fixperms -i |
---|
| 100 | dh_installdeb -i |
---|
| 101 | dh_gencontrol -i |
---|
| 102 | dh_md5sums -i |
---|
| 103 | dh_builddeb -i |
---|
| 104 | |
---|
| 105 | # Build architecture-dependent files here. |
---|
| 106 | binary-arch: build install |
---|
| 107 | dh_testdir -a |
---|
| 108 | dh_testroot -a |
---|
| 109 | dh_installchangelogs -a ChangeLog |
---|
| 110 | dh_installdocs -a |
---|
| 111 | rm -rf $(CURDIR)/debian/dchroot/usr/share/doc/dchroot |
---|
| 112 | ln -sf schroot $(CURDIR)/debian/dchroot/usr/share/doc/dchroot |
---|
| 113 | rm -rf $(CURDIR)/debian/dchroot-dsa/usr/share/doc/dchroot-dsa |
---|
| 114 | ln -sf schroot $(CURDIR)/debian/dchroot-dsa/usr/share/doc/dchroot-dsa |
---|
| 115 | dh_installexamples -a |
---|
| 116 | dh_installman -a |
---|
| 117 | dh_installinit -a --no-start --update-rcd-params='start 75 S .' |
---|
| 118 | dh_link -a |
---|
| 119 | dh_strip -a --dbg-package=schroot-dbg |
---|
| 120 | dh_compress -a |
---|
| 121 | dh_fixperms -a |
---|
| 122 | chmod 4755 $(CURDIR)/debian/dchroot/usr/bin/dchroot |
---|
| 123 | chmod 4755 $(CURDIR)/debian/dchroot-dsa/usr/bin/dchroot-dsa |
---|
| 124 | chmod 4755 $(CURDIR)/debian/schroot/usr/bin/schroot |
---|
| 125 | dh_makeshlibs -a |
---|
| 126 | dh_installdeb -a |
---|
| 127 | dh_shlibdeps -a -L libsbuild1 -l$(CURDIR)/debian/libsbuild1/usr/lib |
---|
| 128 | dh_gencontrol -a |
---|
| 129 | dh_md5sums -a |
---|
| 130 | dh_builddeb -a |
---|
| 131 | |
---|
| 132 | binary: binary-indep binary-arch |
---|
| 133 | .PHONY: build check clean binary-indep binary-arch binary install |
---|