[arrayfire] 04/07: split -arch and -indep targets

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun Sep 27 16:58:19 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 850aa2498550745cd985036d2be25669fa73bee0
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Thu Sep 24 13:05:42 2015 +0100

    split -arch and -indep targets
---
 debian/control | 45 ++++++++++++++++-------------
 debian/rules   | 89 ++++++++++++++++++++++++++++++++++++++--------------------
 2 files changed, 84 insertions(+), 50 deletions(-)

diff --git a/debian/control b/debian/control
index 70d70c9..6601b91 100644
--- a/debian/control
+++ b/debian/control
@@ -3,15 +3,17 @@ Section: science
 Priority: optional
 Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Ghislain Antony Vaillant <ghisvail at gmail.com>
-Build-Depends: cmake,
-               debhelper (>= 9),
-               doxygen,
-               libboost-dev,
-               libfftw3-dev,
-               libfreeimage-dev,
-               liblapacke-dev,
-               libopenblas-dev | libatlas-base-dev | libblas-dev,
-               pkg-config
+Build-Depends:
+ cmake,
+ debhelper (>= 9),
+ libboost-dev,
+ libfftw3-dev,
+ libfreeimage-dev,
+ liblapacke-dev,
+ libopenblas-dev | libatlas-base-dev | libblas-dev,
+ pkg-config
+Build-Depends-Indep:
+ doxygen
 Standards-Version: 3.9.6
 Homepage: http://arrayfire.com/
 Vcs-Git: git://anonscm.debian.org/debian-science/packages/arrayfire.git
@@ -21,8 +23,9 @@ Package: libarrayfire-cpu-dev
 Section: libdevel
 Architecture: any
 Multi-Arch: same
-Depends: libarrayfire-cpu3 (= ${binary:Version}),
-         ${misc:Depends}
+Depends:
+ libarrayfire-cpu3 (= ${binary:Version}),
+ ${misc:Depends}
 Suggests: libarrayfire-doc
 Description: Development files for ArrayFire (CPU backend)
  ArrayFire is a high performance software library for parallel computing
@@ -42,9 +45,11 @@ Package: libarrayfire-cpu3
 Section: libs
 Architecture: any
 Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${misc:Depends},
-         ${shlibs:Depends}
+Pre-Depends:
+ ${misc:Pre-Depends}
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends}
 Description: High performance library for parallel computing (CPU backend)
  ArrayFire is a high performance software library for parallel computing
  with an easy-to-use API. Its array based function set makes parallel
@@ -63,8 +68,9 @@ Priority: extra
 Section: debug
 Architecture: any
 Multi-Arch: same
-Depends: libarrayfire-cpu3 (= ${binary:Version}),
-         ${misc:Depends}
+Depends:
+ libarrayfire-cpu3 (= ${binary:Version}),
+ ${misc:Depends}
 Description: Debugging symbols for ArrayFire (CPU backend)
  ArrayFire is a high performance software library for parallel computing
  with an easy-to-use API. Its array based function set makes parallel
@@ -83,9 +89,10 @@ Package: libarrayfire-doc
 Section: doc
 Architecture: all
 Multi-Arch: foreign
-Depends: libjs-jquery,
-         libjs-mathjax,
-         ${misc:Depends}
+Depends:
+ libjs-jquery,
+ libjs-mathjax,
+ ${misc:Depends}
 Description: Common documentation for ArrayFire
  ArrayFire is a high performance software library for parallel computing
  with an easy-to-use API. Its array based function set makes parallel
diff --git a/debian/rules b/debian/rules
index daeaeff..07244bf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,47 +10,70 @@ 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
+
+# CMake options common to -arch and -indep builds.
+CMAKE_BUILD_OPTIONS = \
+	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
+	-DAF_INSTALL_CMAKE_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/ArrayFire \
+	-DAF_INSTALL_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
+	-DAF_INSTALL_INCLUDE_DIR=/usr/include \
+	-DBUILD_CUDA=OFF \
+	-DBUILD_EXAMPLES=OFF \
+	-DBUILD_GRAPHICS=OFF \
+	-DBUILD_NONFREE=OFF \
+	-DBUILD_OPENCL=OFF \
+	-DWITH_COVERAGE=OFF
 
 # Prevent execution of slow tests.
 CTEST_EXCLUDE_REGEX = large|dense
 
 %:
-	dh $@ --builddirectory=$(BUILDDIR) --parallel
+	dh $@ --parallel
+
+override_dh_auto_clean-arch:
+	dh_auto_clean --arch --builddirectory=build-arch
+	# Remove auto-generated files.
+	find $(CURDIR) -name "version.h" -delete
 
-override_dh_auto_configure:
-	dh_auto_configure -- \
-		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-		-DAF_INSTALL_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
-		-DAF_INSTALL_CMAKE_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/ArrayFire \
+override_dh_auto_clean-indep:
+	dh_auto_clean --indep --builddirectory=build-indep
+	# Remove auto-generated files.
+	find $(CURDIR) -name "version.h" -delete
+
+override_dh_auto_configure-arch:
+	dh_auto_configure --builddirectory=build-arch -- \
+		$(CMAKE_BUILD_OPTIONS) \
 		-DBUILD_CPU=ON \
-		-DBUILD_CUDA=OFF \
-		-DBUILD_DOCS=ON \
-		-DBUILD_EXAMPLES=OFF \
-		-DBUILD_GRAPHICS=OFF \
+		-DBUILD_DOCS=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
-	# Remove auto-generated files.
-	rm -f include/af/version.h
+		-DBUILD_TEST=ON
+
+override_dh_auto_configure-indep:
+	dh_auto_configure --builddirectory=build-indep -- \
+		$(CMAKE_BUILD_OPTIONS) \
+		-DBUILD_CPU=OFF \
+		-DBUILD_DOCS=ON \
+		-DBUILD_GTEST=OFF \
+		-DBUILD_TEST=OFF
+
+override_dh_auto_build-arch:
+	dh_auto_build --arch --builddirectory=build-arch
+
+override_dh_auto_build-indep:
+	dh_auto_build --indep --builddirectory=build-indep
+
+override_dh_auto_install-arch:
+	dh_auto_install --arch --builddirectory=build-arch
+
+override_dh_auto_install-indep:
+	dh_auto_install --indep --builddirectory=build-indep 
 
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-override_dh_auto_test:
+override_dh_auto_test-arch:
 ifeq ($(DEB_BUILD_ARCH_BITS),64)
-	cd $(BUILDDIR) && CTEST_OUTPUT_ON_FAILURE=1 ctest --force-new-ctest-process -E "$(CTEST_EXCLUDE_REGEX)"
+	cd build-arch && \
+	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 
@@ -61,8 +84,12 @@ else
 endif
 endif
 
+override_dh_install-indep:
+	dh_install --indep -X LICENSE
+
 override_dh_installchangelogs:
 	dh_installchangelogs docs/pages/release_notes.md
 
-override_dh_strip:
-	dh_strip --dbg-package=libarrayfire-cpu3-dbg
+override_dh_strip-arch:
+	dh_strip --package=libarrayfire-cpu3 \
+		--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