28 lines
966 B
Makefile
Executable File
28 lines
966 B
Makefile
Executable File
#!/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/~/_/')
|
|
|
|
%:
|
|
dh $@ --with autoreconf --parallel
|
|
|
|
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
|