[openblas] 06/07: Rewrite using debhelper and upstream's 'make install' rule.

Sébastien Villemot sebastien at debian.org
Tue Jul 29 19:17:34 UTC 2014


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

sebastien pushed a commit to branch master
in repository openblas.

commit 1d50f08bac33efb040011c0ebc866d25309d81d0
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Tue Jul 29 20:48:10 2014 +0200

    Rewrite using debhelper and upstream's 'make install' rule.
---
 debian/control                  |  2 +-
 debian/libopenblas-base.install |  3 ++-
 debian/libopenblas-dev.install  |  4 ++--
 debian/rules                    | 35 +++++++++++------------------------
 4 files changed, 16 insertions(+), 28 deletions(-)

diff --git a/debian/control b/debian/control
index 0ec3698..79ccfdd 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Science Team <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Sébastien Villemot <sebastien at debian.org>
 Standards-Version: 3.9.5
-Build-Depends: debhelper (>= 9), patch, cdbs, gfortran
+Build-Depends: dpkg-dev (>= 1.16.2~), debhelper (>= 9), gfortran
 Homepage: https://github.com/xianyi/OpenBLAS
 Vcs-Git: git://anonscm.debian.org/debian-science/packages/openblas.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/openblas.git
diff --git a/debian/libopenblas-base.install b/debian/libopenblas-base.install
index 38b0a44..0d5ac68 100644
--- a/debian/libopenblas-base.install
+++ b/debian/libopenblas-base.install
@@ -1,2 +1,3 @@
-libopenblas.so.0 usr/lib/
+usr/lib/libopenblas*-r0.*.so
+usr/lib/libopenblas.so.0
 libblas.so.3 usr/lib/openblas-base/
diff --git a/debian/libopenblas-dev.install b/debian/libopenblas-dev.install
index 751450d..d92e7c8 100644
--- a/debian/libopenblas-dev.install
+++ b/debian/libopenblas-dev.install
@@ -1,2 +1,2 @@
-libopenblas.a usr/lib/
-libopenblas.so usr/lib/
+usr/lib/libopenblas*.a
+usr/lib/libopenblas.so
diff --git a/debian/rules b/debian/rules
index bd1dfc9..bf41899 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,11 +1,8 @@
 #!/usr/bin/make -f
-# Sylvestre Ledru <sylvestre at debian.org>
 
-include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/dpkg/buildflags.mk
 
-DEB_DH_MAKESHLIBS_ARGS_libopenblas-base = -V "libblas3 | libblas.so.3"
-
-COMMON_MAKE_OPTIONS = NO_LAPACK=1 NO_AFFINITY=1 NO_WARMUP=1
+COMMON_MAKE_OPTIONS = NO_LAPACK=1 NO_AFFINITY=1 NO_WARMUP=1 CFLAGS="$(CPPFLAGS) $(CFLAGS)" FFLAGS="$(FFLAGS)"
 ENABLE_DYNAMIC_ARCHS := amd64 i386 kfreebsd-amd64 kfreebsd-i386
 ifneq (,$(findstring $(DEB_HOST_ARCH),$(ENABLE_DYNAMIC_ARCHS)))
 	DYNAMIC_ARCH_ARG="DYNAMIC_ARCH=1"
@@ -32,11 +29,10 @@ ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	DEBUG_ARG="DEBUG=1"
 endif
 
-build: build-arch
-
-build-arch: build-stamp
+%:
+	dh $@
 
-build-stamp:
+override_dh_auto_build:
 	if test "$(TARGET)" = ""; then 		\
 			echo "Support multiple architectures"; \
 			$(MAKE) $(COMMON_MAKE_OPTIONS) $(DYNAMIC_ARCH_ARG) $(TARGET_GENERIC_ARG) $(DEBUG_ARG) NUM_THREADS=64;		\
@@ -50,33 +46,24 @@ build-stamp:
 	if test "$(TARGET)" != "" -a "$(TARGET)" != "custom"; then 		\
 			echo "Use the value '$(TARGET)' provided by the user";	\
 			$(MAKE) $(COMMON_MAKE_OPTIONS) TARGET=$(TARGET) $(DEBUG_ARG);									\
-	fi;
+	fi
 
-	rm libopenblas.so
-	mv libopenblas*-*.so libopenblas.so.0
-	ln -s libopenblas.so.0 libopenblas.so
-	mv libopenblas*-*.a libopenblas.a
-	touch $@
+override_dh_auto_install:
+	make install DESTDIR=debian/tmp/ PREFIX=/usr
 
-custom: custom-stamp
+custom:
 	dch --local='+custom'  "custom build on: `uname -a`"
 	LANG=C debian/rules TARGET=custom build binary
 
-clean::
-	$(MAKE) clean
-	rm -f libopenblas.so.0 libblas.so.3
-
 # We want packages linked with -lblas to depend on any BLAS alternative, and we
 # want packages linked with -lopenblas to depend specifically on
 # libopenblas-base.
 #
 # Such a setting is not supported by dh_makeshlibs, so we ship a hand-crafted
 # shlibs file.
-binary-predeb/libopenblas-base::
+override_dh_makeshlibs:
+	dh_makeshlibs
 	cp debian/libopenblas-base.shlibs debian/libopenblas-base/DEBIAN/shlibs
 
-# Build a custom package optimized for the current arch
-custom-stamp:
-
 get-orig-source:
 	-uscan --upstream-version 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/openblas.git



More information about the debian-science-commits mailing list