1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/usr/bin/make -f
#export DH_VERBOSE = 1
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- -DBUILD_TESTS=OFF -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
override_dh_auto_build:
dh_auto_build -- all docs
override_dh_auto_test:
dh_auto_test -- examples
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
$(MAKE) -C debian/t
endif
execute_after_dh_auto_clean:
$(MAKE) -C debian/t clean
ifneq (,$(wildcard .git))
khronos:
git remote show $@ >/dev/null 2>&1 || git remote add $@ $(shell sed -rn 's/Repository: //p' debian/upstream/metadata)
git fetch $@ --prune
tarball: COMMIT ?= khronos/master
tarball: COMMIT_TIME = $(shell git log --format=format:%ct -1 $(COMMIT))
tarball: COMMIT_DESCRIBE = $(patsubst v%,%,$(shell git describe --long --tags $(COMMIT)))
tarball: COMMIT_VERSION = $(firstword $(subst -, ,$(COMMIT_DESCRIBE)))
tarball: PREFIX = OpenCL-CLHPP-$(COMMIT_VERSION)+git$(patsubst $(COMMIT_VERSION)-%,%,$(COMMIT_DESCRIBE))
tarball:
test -n "$(COMMIT)"
git archive --prefix $(PREFIX)/ $(COMMIT) | xz > $(PREFIX).tar.xz
touch -d @$(COMMIT_TIME) $(PREFIX).tar.xz
endif
|