2014-05-25 17:54:49 +04:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2018-04-03 06:42:28 +03:00
|
|
|
include /usr/share/dpkg/default.mk
|
|
|
|
|
2018-03-29 11:47:09 +03:00
|
|
|
UPSTREAM_GIT ?= http://lab.jerasure.org/jerasure/gf-complete.git
|
2014-05-25 17:54:49 +04:00
|
|
|
|
2018-04-03 06:42:28 +03:00
|
|
|
GIT_TAG ?= $(shell echo '$(DEB_VERSION_UPSTREAM)' | sed -e 's/~/_/')
|
2014-05-25 17:54:49 +04:00
|
|
|
|
|
|
|
%:
|
2015-09-16 14:18:15 +03:00
|
|
|
dh $@ --with autoreconf --parallel
|
2014-05-25 17:54:49 +04:00
|
|
|
|
2015-09-16 14:18:15 +03:00
|
|
|
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*
|
2014-05-25 17:54:49 +04:00
|
|
|
|
|
|
|
gen-orig-xz:
|
|
|
|
git tag -v $(GIT_TAG) || true
|
2018-04-03 06:42:28 +03:00
|
|
|
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 ; \
|
2014-05-25 17:54:49 +04:00
|
|
|
fi
|
|
|
|
[ ! -e ../build-area ] && mkdir ../build-area || true
|
2018-04-03 06:42:28 +03:00
|
|
|
[ ! -e ../build-area/$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz ] && cp ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz ../build-area
|
2014-06-16 20:48:11 +04:00
|
|
|
|
|
|
|
fetch-upstream-remote:
|
|
|
|
git remote add upstream $(UPSTREAM_GIT) || true
|
|
|
|
git fetch upstream
|