[arrayfire] 401/408: d/rules: meta-commit

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:40 UTC 2015


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

ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.

commit 93ad33f23638d926a69659e91c75845bc5abe9e2
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Tue Sep 15 02:15:53 2015 +0100

    d/rules: meta-commit
---
 debian/rules | 67 ++++++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 52 insertions(+), 15 deletions(-)

diff --git a/debian/rules b/debian/rules
index 40385e4..daeaeff 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,28 +4,65 @@
 # Uncomment this to turn on verbose mode.
 #DH_VERBOSE = 1
 
+# Hardening flags.
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+# Environment settings.
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_BITS)
+BUILDDIR = obj-$(DEB_BUILD_GNU_TYPE)
+DESTDIR = $(CURDIR)/debian/tmp
+
+# Prevent execution of slow tests.
+CTEST_EXCLUDE_REGEX = large|dense
+
 %:
-	dh $@ --buildsystem=cmake \
-		--parallel \
-		--dbg-package=libarrayfire-cpu3-dbg
+	dh $@ --builddirectory=$(BUILDDIR) --parallel
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
-	-DBUILD_TEST=OFF \
-	-DBUILD_EXAMPLES=OFF \
-	-DBUILD_GTEST=OFF \
-	-DBUILD_CPU=ON \
-	-DBUILD_CUDA=OFF \
-	-DBUILD_OPENCL=OFF \
-	-DBUILD_DOCS=ON \
-	-DWITH_COVERAGE=OFF \
-	-DBUILD_GRAPHICS=OFF \
-	-DAF_INSTALL_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
-	-DAF_INSTALL_CMAKE_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/ArrayFire
+		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
+		-DAF_INSTALL_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
+		-DAF_INSTALL_CMAKE_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/ArrayFire \
+		-DBUILD_CPU=ON \
+		-DBUILD_CUDA=OFF \
+		-DBUILD_DOCS=ON \
+		-DBUILD_EXAMPLES=OFF \
+		-DBUILD_GRAPHICS=OFF \
+		-DBUILD_GTEST=ON \
+		-DBUILD_NONFREE=OFF \
+		-DBUILD_OPENCL=OFF \
+		-DBUILD_TEST=ON \
+		-DWITH_COVERAGE=OFF
+
+override_dh_auto_install:
+	dh_auto_install
+	# Remove extra license file from arrayfire/assets.
+	rm $(DESTDIR)/usr/share/ArrayFire/doc/LICENSE
 
 override_dh_auto_clean:
 	dh_auto_clean
-	$(RM) -f include/af/version.h
+	# Remove auto-generated files.
+	rm -f include/af/version.h
+
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+override_dh_auto_test:
+ifeq ($(DEB_BUILD_ARCH_BITS),64)
+	cd $(BUILDDIR) && CTEST_OUTPUT_ON_FAILURE=1 ctest --force-new-ctest-process -E "$(CTEST_EXCLUDE_REGEX)"
+else
+	# The test suite was found to be buggy on 32-bit builds. Upstream 
+	# recommends to skip testing on non 64-bit architectures until this 
+	# issue is addressed.
+	#
+	# See: https://github.com/arrayfire/arrayfire/issues/1008
+	echo "I: Non 64-bit architecture detected, skipping tests."
+endif
+endif
 
 override_dh_installchangelogs:
 	dh_installchangelogs docs/pages/release_notes.md
+
+override_dh_strip:
+	dh_strip --dbg-package=libarrayfire-cpu3-dbg

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



More information about the debian-science-commits mailing list