Commit 8b048da1 authored by Markus Koschany's avatar Markus Koschany

Simplify get-orig-source target. Use Files-Excluded mechanism.

This also fixes a build failure with older versions of dpkg-dev.

Thanks: Chris J Arges for the report.
Closes: #728991
parent 2a91b34f
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Tofrodos
Source: http://www.thefreecountry.com/tofrodos/index.shtml
Comment:
The only change to the original source tarball is the removal of fromdos.exe
and todos.exe and recompression with xz.
Files-Excluded:
*.exe
Files: *
Copyright: 1996-2013 Christopher Heng
......
......@@ -5,11 +5,6 @@ CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
UVER = $(shell dpkg-parsechangelog -l$(PKD)/changelog -SVersion | cut -d- -f1)
DTYPE = +ds
VER ?= $(subst $(DTYPE),,$(UVER))
%:
dh $@
......@@ -27,24 +22,5 @@ override_dh_auto_install:
BINDIR=$(CURDIR)/debian/tofrodos/usr/bin \
MANDIR=$(CURDIR)/debian/tofrodos/usr/share/man/man1
## http://wiki.debian.org/onlyjob/get-orig-source
.PHONY: get-orig-source
get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
@
$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
@echo "# Downloading..."
uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
@echo "# Extracting..."
mkdir $(PKG)-$(VER) \
&& tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \
|| $(RM) -r $(PKG)-$(VER)
@echo "# Cleaning-up..."
cd $(PKG)-$(VER) \
&& $(RM) -v \
*.exe
@echo "# Packing..."
find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
&& $(RM) -r "$(PKG)-$(VER)"
get-orig-source:
uscan --verbose --repack --compression xz --download-current-version --force-download
version=3
opts=uversionmangle=s/(\d)[\.\-]?((rc|pre|dev|beta|alpha|b|a)\d*)$/$1~$2/,dversionmangle=s/\+(dfsg|debian|ds|repack|repacked)// \
opts=uversionmangle=s/(\d)[\.\-]?((rc|pre|dev|beta|alpha|b|a)\d*)$/$1~$2/,dversionmangle=s/\+(dfsg|debian|ds|repack|repacked)//,\
repacksuffix=+ds \
http://www.thefreecountry.com/tofrodos/index.shtml .*/tofrodos-(\d.*)\.(?:tgz|tbz2|tar\.(?:gz|bz2|xz))
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