...
 
Commits (2)
nocache (1.0-2) UNRELEASED; urgency=medium
nocache (1.1-1) UNRELEASED; urgency=medium
* d/copyright: Use https protocol in Format field
* d/control: Set Vcs-* to salsa.debian.org
......
......@@ -3,8 +3,6 @@ Section: utils
Priority: optional
Maintainer: Dmitry Smirnov <onlyjob@debian.org>
Build-Depends: debhelper (>= 9)
# git is needed by get-orig-source
,git
# tests:
,coreutils
Standards-Version: 3.9.8
......
......@@ -4,11 +4,11 @@ Upstream-Contact: Julius Plenz <julius@plenz.com>
Source: https://github.com/Feh/nocache
Files: *
Copyright: 2011 Julius Plenz <julius@plenz.com>
Copyright: 2011-2019 Julius Plenz <julius@plenz.com>
License: BSD-2-clause
Files: debian/*
Copyright: 2013-2016 Dmitry Smirnov <onlyjob@debian.org>
Copyright: 2013-2019 Dmitry Smirnov <onlyjob@debian.org>
License: GPL-3+ or BSD-2-clause
License: GPL-3+
......
......@@ -18,32 +18,3 @@ override_dh_auto_test:
## #916415
timeout 5 ./nocache apt show nowcache
## http://wiki.debian.org/onlyjob/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 | perl -ne 'print $$1 if m{^Version:\s*([\d\.+git]+)}')
UDATE = $(shell date --rfc-3339=seconds --date='TZ="UTC" $(shell echo $(VER) | perl -ne 'print "$$1-$$2-$$3" if m/\+git(\d{4})(\d{2})(\d{2})/')')
.PHONY: get-orig-source
get-orig-source: $(PKG)_$(VER).orig.tar.xz
@
UURL = git://github.com/Feh/nocache.git
$(PKG)_$(VER).orig.tar.xz:
$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
@echo "# Downloading..."
#uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
git clone $(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 .git .git* \
&& cd .. && echo "# Packing..." \
&& find -L "$(PKG)-$(VER)" -xdev -type f -print | LC_ALL=C sort \
| XZ_OPT="-7v" tar -caf "$(PKG)_$(VER).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
&& $(RM) -r "$(PKG)-$(VER)"
# uscan(1) configuration file.
version=3
## To generate orig.tar please use "debian/rules get-orig-source".
opts=\
dversionmangle=s/\+git\d+// \
https://github.com/Feh/nocache/tags .*/archive/v?(\d[-\d\.]+)\.tar\.gz