#!/usr/bin/make -f include /usr/share/dpkg/default.mk UPSTREAM_GIT ?= http://lab.jerasure.org/jerasure/gf-complete.git GIT_TAG ?= $(shell echo '$(DEB_VERSION_UPSTREAM)' | sed -e 's/~/_/') export DEB_CFLAGS_MAINT_APPEND := -O1 %: dh $@ --with autoreconf ifeq ($(DEB_HOST_ARCH_BITS), 32) override_dh_auto_configure: dh_auto_configure -- --disable-sse --disable-neon endif ifeq ($(DEB_HOST_ARCH), amd64) ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test: dh_auto_test ./libtool --mode=execute qemu-x86_64-static -cpu qemu64,-sse3,-ssse3,-sse4.1,-sse4.2 ./test/gf_unit 64 A -1 - ./libtool --mode=execute qemu-x86_64-static -cpu qemu64,+sse3,-ssse3,-sse4.1,-sse4.2 ./test/gf_unit 64 A -1 - ./libtool --mode=execute qemu-x86_64-static -cpu qemu64,+sse3,+ssse3,-sse4.1,-sse4.2 ./test/gf_unit 64 A -1 - ./libtool --mode=execute qemu-x86_64-static -cpu qemu64,+sse3,+ssse3,+sse4.1,-sse4.2 ./test/gf_unit 64 A -1 - ./libtool --mode=execute qemu-x86_64-static -cpu qemu64,+sse3,+ssse3,+sse4.1,+sse4.2 ./test/gf_unit 64 A -1 - endif endif override_dh_install: dh_install # NOTE(jamespage): Don't ship example binaries, just the actual tools rm -rf $(CURDIR)/debian/gf-complete-tools/usr/bin/gf_example* gen-orig-xz: git tag -v $(GIT_TAG) || true if [ ! -f ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz ] ; then \ git archive --prefix=$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/ $(GIT_TAG) | xz >../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz ; \ fi [ ! -e ../build-area ] && mkdir ../build-area || true [ ! -e ../build-area/$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz ] && cp ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz ../build-area fetch-upstream-remote: git remote add upstream $(UPSTREAM_GIT) || true git fetch upstream