]> git.decadent.org.uk Git - odhcp6c.git/blob - debian/rules
Prepare to release odhcp6c (1.1+git20160131-1).
[odhcp6c.git] / debian / rules
1 #!/usr/bin/make -f
2
3 %:
4         dh $@
5
6 override_dh_install:
7         dh_install
8         install -D -m755 debian/odhcp6c.ppp.ipv6-up \
9                 debian/odhcp6c/etc/ppp/ipv6-up.d/odhcp6c
10         install -D -m755 debian/odhcp6c.ppp.ipv6-down \
11                 debian/odhcp6c/etc/ppp/ipv6-down.d/odhcp6c
12
13 get-orig-source: UPSTREAM_VERSION := $(shell dpkg-parsechangelog -SVersion | sed 's/-[^-]*$$//')
14 get-orig-source: UPSTREAM_COMMIT := $(shell dpkg-parsechangelog -SChanges -f $(UPSTREAM_VERSION) | sed -n 's/.*Upstream version is commit //p')
15 get-orig-source:
16         test -n "$(UPSTREAM_VERSION)"
17         test -n "$(UPSTREAM_COMMIT)"
18         rm -rf debian/upstream.git
19         if [ -d .git ] && git cat-file -e $(UPSTREAM_COMMIT); then \
20                 ln -s ../.git debian/upstream.git; \
21         else \
22                 git clone --bare https://github.com/sbyx/odhcp6c debian/upstream.git; \
23         fi
24         GIT_DIR=debian/upstream.git git archive --format=tar --prefix=odhcp6c-$(UPSTREAM_VERSION)/ $(UPSTREAM_COMMIT) | xz -c > odhcp6c_$(UPSTREAM_VERSION).orig.tar.xz
25         rm -rf debian/upstream.git