From 7268e3a5cc8298574cd3dfe5a07d874f2aa94b17 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 1 Nov 2006 13:07:10 +0000 Subject: [PATCH] Rewrote rules to use debhelper. * Set compat level to 5. * Changed debmake build dependency to debhelper (>= 5). --- debian/compat | 1 + debian/control | 3 +- debian/rules | 123 +++++++++++++++++++++++++++++-------------------- 3 files changed, 77 insertions(+), 50 deletions(-) create mode 100644 debian/compat diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control index ff6f80a..ffac80b 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,8 @@ Source: cadaver Section: web Priority: optional Maintainer: Bernd Eckenfels -Build-Depends: libncurses5-dev, libxml2-dev | libxml-dev, libreadline5-dev, zlib1g-dev (>= 1:1.1.3), libssl-dev (>= 0.9.6f), debmake +Build-Depends: debhelper (>= 5), libncurses5-dev, libxml2-dev | libxml-dev, + libreadline5-dev, zlib1g-dev (>= 1:1.1.3), libssl-dev (>= 0.9.6f) Standards-Version: 3.6.1 Package: cadaver diff --git a/debian/rules b/debian/rules index edb4efa..1fdc8d0 100755 --- a/debian/rules +++ b/debian/rules @@ -1,57 +1,82 @@ #!/usr/bin/make -f -# Copyright Bernd Eckenfels Thu, 6 Jan 2000 10:04:56 +0100. It's GPL -# Made with the aid of debmake, by Christoph Lameter, -# based on the sample debian/rules file for GNU hello by Ian Jackson. +# debian/rules for cadaver +# +# Written by Sebastian Harl . -package=cadaver +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 -build: - $(checkdir) - -rm config.cache - # this configure will watch DEB_BUILD_OPTIONS for CFLAGS (-g) - ./configure --prefix=/usr --enable-warnings --with-included-neon --enable-netrc --without-ssl - $(MAKE) - touch build +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +CFLAGS = -Wall -g + +BUILDDIR = ./debian/build/ + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +$(BUILDDIR)/config.status: configure + dh_testdir + [ -e $(BUILDDIR) ] || mkdir $(BUILDDIR) + cd $(BUILDDIR) && CFLAGS="$(CFLAGS)" ../../configure \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr --mandir=\$${prefix}/share/man \ + --enable-warnings --enable-netrc --without-ssl + +build: build-stamp + +build-stamp: $(BUILDDIR)/config.status + dh_testdir + dh_clean + + cp -r ./src/ $(BUILDDIR) + $(MAKE) -C $(BUILDDIR) + + touch build-stamp clean: - $(checkdir) - -rm -f build - -$(MAKE) clean - -(cd po ; rm -f Makefile.in POTFILES cat-id-tbl.c stamp-cat-id ; $(MAKE) distclean) - -(cd intl ; $(MAKE) distclean) - -(cd libneon ; $(MAKE) clean ; rm Makefile) - -rm -f `find . -name "*~"` - -rm -f config.h config.status config.log config.cache Makefile - -rm -rf debian/tmp debian/files* core debian/substvars - -binary-indep: checkroot build - $(checkdir) -# There are no architecture-independent files to be uploaded -# generated by this package. If there were any they would be -# made here. - -binary-arch: checkroot build - $(checkdir) - -rm -rf debian/tmp - install -d debian/tmp - cd debian/tmp && install -d `cat ../dirs` - $(MAKE) install prefix=`pwd`/debian/tmp/usr -# Must have debmake installed for this to work. Otherwise please copy -# /usr/bin/debstd into the debian directory and change debstd to debian/debstd - debstd ChangeLog INTEROP FAQ NEWS README TODO THANKS cadaver.lsm.in - dpkg-gencontrol -isp - chown -R root.root debian/tmp - chmod -R go=rX debian/tmp - dpkg --build debian/tmp .. - -define checkdir - test -f debian/rules -endef + dh_testdir + dh_testroot + rm -f build-stamp + + rm -rf $(BUILDDIR) + + dh_clean -binary: binary-indep binary-arch +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) -C $(BUILDDIR) install prefix=$(CURDIR)/debian/cadaver/usr + +binary-indep: + # nothing to do here -checkroot: - $(checkdir) - test root = "`whoami`" +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs -a ChangeLog + dh_installdocs -a BUGS FAQ INTEROP NEWS README THANKS TODO + dh_installmenu -a + dh_installman -a + dh_link -a + dh_strip -a + dh_compress -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch +.PHONY: build clean install binary-indep binary-arch binary -.PHONY: binary binary-arch binary-indep clean checkroot -- 2.30.2