[Pkg-octave-commit] [octave-pkg-dev] 01/01: Use dh instead of cdbs as the build infrastructure

Rafael Laboissiere rafael at debian.org
Thu Dec 28 07:44:29 UTC 2017


This is an automated email from the git hooks/post-receive script.

rafael pushed a commit to branch dh-instead-of-cdbs
in repository octave-pkg-dev.

commit 1eac34df83b5762ea50e2e3cda04c93c8cdd444e
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Wed Dec 27 21:34:24 2017 -0200

    Use dh instead of cdbs as the build infrastructure
---
 README                        |  8 +++---
 debian/octave-pkg-dev.install |  2 +-
 make-octave-forge-debpkg.in   |  4 +--
 octave-pkg.mk                 | 61 ++++++++++++++-----------------------------
 4 files changed, 26 insertions(+), 49 deletions(-)

diff --git a/README b/README
index 318b7a7..6feccef 100644
--- a/README
+++ b/README
@@ -8,9 +8,9 @@ system.
 To use this package, make your add-on source package build-depend on
 octave-pkg-dev and add the following line to debian/rules:
 
-    include /usr/share/cdbs/1/class/octave-pkg.mk
+    include /usr/share/octave-pkg-dev/octave-pkg.mk
 
-Also, build-depend on debhelper and cdbs.
+Also, build-depend on debhelper.
 
 Add ${octave:Depends} to the Depends field of the package in
 debian/control. This ensures that dependencies in upstream's DESCRIPTION file
@@ -37,7 +37,7 @@ built and detecting those containing "%!test" and/or "%!assert"
 directives.  Additional tests not contained in the upstream source
 files may be put in debian/check.m.
 
-The clean target follows the convention of CDBS.  For specifying it,
+The clean target follows the convention of dh.  For specifying it,
 use the DEB_MAKE_CLEAN_TARGET variable.  Its default value is "-C src clean".
 
- -- Thomas Weber <tweber at debian.org> Thu, 16 Feb 2012 15:55:15 +0100
+ -- Rafael Laboissière <rafael at debian.org> Thu, 28 Dec 2017 15:55:15 +0100
diff --git a/debian/octave-pkg-dev.install b/debian/octave-pkg-dev.install
index 8c0aa14..e412cf6 100644
--- a/debian/octave-pkg-dev.install
+++ b/debian/octave-pkg-dev.install
@@ -1,4 +1,4 @@
-octave-pkg.mk                   usr/share/cdbs/1/class
+octave-pkg.mk                   usr/share/octave-pkg-dev
 octave-pkg-helper	        usr/share/octave/debian/dh
 make-octave-forge-debpkg        usr/bin
 check-version			usr/share/octave-pkg-dev
diff --git a/make-octave-forge-debpkg.in b/make-octave-forge-debpkg.in
index d25d85b..036b51c 100755
--- a/make-octave-forge-debpkg.in
+++ b/make-octave-forge-debpkg.in
@@ -183,7 +183,7 @@ writefile (">", "debian/rules",
            "#!/usr/bin/make -f
 # -*- makefile -*-
 
-include /usr/share/cdbs/1/class/octave-pkg.mk
+include /usr/share/octave-pkg-dev/octave-pkg.mk
 ");
 system ("chmod +x debian/rules");
 
@@ -204,7 +204,7 @@ writefile (">", "debian/control",
 Section: math
 Priority: optional
 Maintainer: Debian Octave Group <pkg-octave-devel\@lists.alioth.debian.org>
-${uploaders}Build-Depends: debhelper (>= $compat), cdbs, octave-pkg-dev (>= #Version#)
+${uploaders}Build-Depends: debhelper (>= $compat), octave-pkg-dev (>= #Version#)
 Standards-Version: #Standards-Version#
 Homepage: http://octave.sourceforge.net/$name/
 Vcs-Git: #Vcs-Git#
diff --git a/octave-pkg.mk b/octave-pkg.mk
index 8f785f9..30c49c8 100644
--- a/octave-pkg.mk
+++ b/octave-pkg.mk
@@ -1,10 +1,10 @@
 # -*- makefile -*-
-# octave-pkg.mk: CDBS-based debian/rules scrap for building/installing
+# octave-pkg.mk: dh-based debian/rules scrap for building/installing
 #                octave-forge pkg add-ons
 # This file is part of the octave-pkg-dev Debian package
 
 # Copyright (c) 2008  Olafur Jens Sigurðsson <ojsbug at gmail.com>
-# Copyright (c) 2008, 2009, 2012  Rafael Laboissiere <rafael at laboissiere.net>
+# Copyright (c) 2008, 2009, 2012, 2017  Rafael Laboissiere <rafael at laboissiere.net>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
 # with this program; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-
 export package = $(shell awk '/^Package:/ {print $$2; exit 0}' debian/control)
 export debpkg = debian/$(package)
 export shrpkg = /usr/share/octave/debian
@@ -69,57 +67,36 @@ include /usr/share/dpkg/buildflags.mk
 # Oct-files ldflags are taken from the following variable
 export OCT_LINK_OPTS=$(LDFLAGS)
 
-install/$(package)::	\
-	check-version	\
-	create-dirs	\
-	install-pkg	\
-	clean-files	\
-	install-docs	\
-	check-pkg	\
-	remove-dirs
+%:
+	dh $@
 
-.PHONY: check-version
-check-version::
-	$(libdir)/check-version
+override_dh_auto_build:
 
-.PHONY: create-dirs
-create-dirs::
+override_dh_auto_install:
+	# Check version
+	$(libdir)/check-version
+	# Create directories
 	mkdir -p $(CURDIR)/$(debpkg)/$(mpath)	\
 		 $(CURDIR)/$(debpkg)/$(bpath)
-
-.PHONY: install-pkg
-install-pkg::
+	# Install packages
 	$(libdir)/install-pkg
-
-.PHONY: clean-files
-clean-files::
-	( cd  $(shell find . -name packinfo) ; rm -f COPYING ChangeLog )
-
-.PHONY: install-docs
-install-docs::
+	ls -R $(CURDIR)/$(debpkg)
+	# Clean files
+	pwd
+	( cd $$(find $(CURDIR)/$(debpkg) -name packinfo) ; 	\
+	  rm -f COPYING ChangeLog )
+	# Install documentation files
 	$(libdir)/install-docs
-
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-# Compose the expression for exclusion of requested files from the find command
-export excluded_files_expr = $(shell for i in $(OCTPKG_EXCLUDE_TEST) ; do echo " -a ! -name $$i " ; done)
-
-.PHONY: check-pkg
-check-pkg::
+	# Check package
 	$(libdir)/check-pkg
-else
-check-pkg::
-endif
-
-.PHONY: remove-dirs
-remove-dirs::
+	# Remove directories
 	rmdir --ignore-fail-on-non-empty -p	\
 		 $(CURDIR)/$(debpkg)/$(mpath)	\
 		 $(CURDIR)/$(debpkg)/$(bpath)
 
-
 DEB_MAKE_CLEAN_TARGET = -C src clean
 
-clean::
+override_dh_auto_clean:
 ifneq ($(DEB_MAKE_CLEAN_TARGET),)
 	-$(MAKE) -k $(DEB_MAKE_CLEAN_TARGET)
 endif

-- 
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-pkg-dev.git



More information about the Pkg-octave-commit mailing list