Commit 96503862 authored by Dmitry Smirnov's avatar Dmitry Smirnov

Standards-Version: 4.1.4; Priority: optional

 rules: removed get-orig-source target.
parent b436270d
Source: golang-github-fsouza-go-dockerclient
Section: devel
Priority: extra
Priority: optional
Maintainer: pkg-go <pkg-go-maintainers@lists.alioth.debian.org>
Uploaders: Dmitry Smirnov <onlyjob@debian.org>
Build-Depends: debhelper (>= 9),
......@@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9),
golang-github-stretchr-testify-dev | golang-testify-dev,
golang-golang-x-net-dev,
golang-golang-x-sys-dev,
Standards-Version: 3.9.8
Standards-Version: 4.1.4
Homepage: https://github.com/fsouza/go-dockerclient
Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-fsouza-go-dockerclient
Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-fsouza-go-dockerclient.git
......
......@@ -9,34 +9,3 @@ export DH_GOLANG_INSTALL_EXTRA := testing/data
%:
dh $@ --buildsystem=golang --with=golang --builddirectory=_build
## http://wiki.debian.org/onlyjob/get-orig-source
.PHONY: get-orig-source
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog -SVersion | perl -ne 'print $$1 if m{^(?:\d+:)?(\d.*)(?:\-\d+.*)};')
get-orig-source: $(PKG)_$(VER).orig.tar.xz $(info I: $(PKG)_$(VER))
@
UURL = https://$(DH_GOPKG).git
UDATE = $(shell date --rfc-3339=seconds --date='TZ="UTC" $(shell echo $(VER) | perl -ne 'print "$$1-$$2-$$3" if m/\+(?:git|svn|hg)(\d{4})(\d{2})(\d{2})/')')
$(PKG)_$(VER).orig.tar.xz: $(info I: UDATE=$(UDATE))
$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
@echo "# Downloading..."
git clone --recursive --single-branch --branch master $(UURL) $(PKG)-$(VER) \
|| $(RM) -r $(PKG)-$(VER)
cd $(PKG)-$(VER) \
&& git checkout v$(VER) || git checkout $$(git log -n1 --format=%h --before="$(UDATE)") \
&& [ -s ChangeLog ] || ( echo "# Generating ChangeLog..." \
; git log --pretty="format:%ad %aN <%aE>%n%n%x09* %s%n" --date=short > ChangeLog \
; touch -d "$$(git log -1 --format='%ci')" ChangeLog) \
&& echo "# Setting times..." \
&& git ls-tree -r --name-only HEAD | while read F ; do touch --no-dereference -d "$$(git log -1 --format="%ai" -- "$$F")" "$$F"; done \
&& echo "# Cleaning-up..." \
&& $(RM) -rv `perl -0nE 'say $$1 if m{^Files\-Excluded\:\s*(.*?)(?:\n\n|Files:|Comment:)}sm;' ../debian/copyright` \
&& $(RM) -r .git .git*
@echo "# Packing..."
find -L "$(PKG)-$(VER)" -xdev -type f -print | LC_ALL=C sort \
| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
&& $(RM) -r "$(PKG)-$(VER)"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment