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 40 41
|
DEB_SOURCE := $(shell dpkg-parsechangelog | grep Source: | sed -e 's/Source: //')
DEB_VERSION := $(shell dpkg-parsechangelog | grep Version: | sed -e 's/Version: //')
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//')
GIT_URL = git://git.gnome.org/librest
%:
dh $@ --with autoreconf
override_dh_auto_configure:
dh_auto_configure -- --enable-gtk-doc
override_dh_makeshlibs:
dh_makeshlibs
dh_girepository
override_dh_auto_clean:
rm -rf docs/reference/rest/html
rm -rf autom4te.cache
dh_auto_clean
override_dh_strip:
dh_strip --dbg-package=librest-0.7-0-dbg
get-orig-source::
set -e; if echo $(DEB_VERSION) | grep -c "git"; \
then \
git_version=`echo $(DEB_VERSION) | sed -e 's/^.*git\([0-9]*\)*\.\(.*\)-.*$$/\2/g'`; \
else \
git_version=$(DEB_UPSTREAM_VERSION); \
fi; \
tmpdir=`mktemp -d -t`; \
cd $$tmpdir; \
echo "checkout upstream repository ..."; \
git clone $(GIT_URL); echo "getting specific upstream revision/tag: $$git_version"; \
cd `ls | head -n 1`; git checkout -b orig $$git_version; cd ..; \
tar --exclude=.git -czvf $(CURDIR)/$(DEB_SOURCE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz `ls | head -n 1`; \
cd $(CURDIR); \
rm -rf $$tmpdir
|