libgit2/debian/rules
Andreas Henriksson 267c427582 Disable fakeroot emulation when running tests
- tests only works under regular user or real root.

Git-Dch: Full
2016-04-11 10:48:18 +02:00

62 lines
2.0 KiB
Makefile
Executable File

#!/usr/bin/make -f
# -*- makefile -*-
# This rules file has 2 streams, the build-debian-devel stream builds
# the static library and the bulid-debian-release builds the dynamic
# library.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
TEST_TMPDIR := $(CURDIR)/tmp-test
override_dh_auto_configure:
dh_auto_configure --builddirectory=build-debian-release -- \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DUSE_OPENSSL:BOOL=OFF \
-DTHREADSAFE:BOOL=ON \
-DBUILD_CLAR:BOOL=ON \
-DLIB_INSTALL_DIR:STRING=lib/$(DEB_HOST_MULTIARCH)
dh_auto_configure --builddirectory=build-debian-devel -- \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DTHREADSAFE:BOOL=ON \
-DUSE_OPENSSL:BOOL=OFF \
-DBUILD_CLAR:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLIB_INSTALL_DIR:STRING=lib/$(DEB_HOST_MULTIARCH)
override_dh_makeshlibs:
dh_makeshlibs -V
override_dh_auto_build:
dh_auto_build --builddirectory=build-debian-release
dh_auto_build --builddirectory=build-debian-devel
override_dh_auto_install:
dh_auto_install --builddirectory=build-debian-release
dh_auto_install --builddirectory=build-debian-devel
override_dh_auto_test:
mkdir -p build-debian-release/tmp build-debian-devel/tmp
ifneq (,$(FAKEROOTKEY))
echo "Detected running under fakeroot, resetting LD_LIBRARY_PATH as tests are not compatible with fakeroot."
LD_PRELOAD="" dh_auto_test --builddirectory=build-debian-release
LD_PRELOAD="" dh_auto_test --builddirectory=build-debian-devel
else
dh_auto_test --builddirectory=build-debian-release
dh_auto_test --builddirectory=build-debian-devel
endif
override_dh_strip:
dh_strip --dbgsym-migration='libgit2-dbg (<< 0.24.0-2~)'
override_dh_installexamples:
dh_installexamples --exclude .gitignore
%:
dh $@ --parallel --buildsystem cmake --dbgsym-migration='libgit2-dbg (<< 0.24.0-2~)' --builddirectory=build-debian-release
dh $@ --parallel --buildsystem cmake --builddirectory=build-debian-devel