Commit 75298edf authored by Jeremy Bicha's avatar Jeremy Bicha

Drop unused rules files:

- lp-get-source.mk
- make-compat-desktop-file.mk
- sf-get-source.mk
- ubuntu-get-source.mk

Gbp-Dch: Full
parent 494d6198
# copied from CDBS' buildvars
DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))
DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
# where to store the resulting .orig tarball
DEB_TARBALL_DOWNLOAD_DIR ?= .
TARBALL_EXT ?= tar.gz
LP_DOWNLOAD_PAGE ?= https://launchpad.net/$(DEB_SOURCE_PACKAGE)/+download
LP_DOWNLOAD_URL ?= $(shell wget -q -O - $(LP_DOWNLOAD_PAGE) | grep -o 'href="https://launchpad.net/$(DEB_SOURCE_PACKAGE)/.*/+download/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)\.$(TARBALL_EXT)"' | cut -d'"' -f2)
LP_DOWNLOAD_COMMAND ?= wget -T15 -t1 -O $(DEB_TARBALL_DOWNLOAD_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.$(TARBALL_EXT) $(LP_DOWNLOAD_URL)
get-orig-source:
dh_testdir
@@echo 'Source package: $(DEB_SOURCE_PACKAGE)'
@@echo 'Upstream version: $(DEB_UPSTREAM_VERSION)'
@@echo 'Download page: $(LP_DOWNLOAD_PAGE)'
@@echo 'Download url: $(LP_DOWNLOAD_URL)'
mkdir -p $(DEB_TARBALL_DOWNLOAD_DIR)
$(LP_DOWNLOAD_COMMAND)
.PHONY: get-orig-source
$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
$(if $(DEB_MK_COMPAT_DESKTOP_$(cdbs_curpkg)), /usr/bin/pkg-gnome-compat-desktop-file $(DEB_MK_COMPAT_DESKTOP_$(cdbs_curpkg)))
# copied from CDBS' buildvars
DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))
DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
# where to store the resulting .orig tarball
DEB_TARBALL_DOWNLOAD_DIR ?= .
TARBALL_EXT ?= tar.gz
SF_PROJECT ?= $(DEB_SOURCE_PACKAGE)
SF_MODULE ?= $(DEB_SOURCE_PACKAGE)
SF_TARBALL ?= $(SF_MODULE)-$(DEB_UPSTREAM_VERSION).$(TARBALL_EXT)
SF_DOWNLOAD_URL ?= http://$$sf_mirror.dl.sourceforge.net/$(SF_PROJECT)/$(SF_TARBALL)
SF_MIRRORS ?= aarnet cdnetworks-kr-1 cdnetworks-kr-2 cdnetworks-us-1 citylan dfn freefr garr heanet hivelocity ignum internode iweb jaist kent nchc ncu netcologne softlayer space sunet superb-dca2 superb-sea2 switch ufpr voxel waix
SF_DOWNLOAD_COMMAND ?= for sf_mirror in $(SF_MIRRORS); do wget -nc -T10 -t1 -O $(DEB_TARBALL_DOWNLOAD_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.$(TARBALL_EXT) $(SF_DOWNLOAD_URL) && break; done
get-orig-source:
dh_testdir
@@echo 'Source package: $(DEB_SOURCE_PACKAGE)'
@@echo 'Source package: $(DEB_VERSION)'
@@echo 'Source version without epoch: $(DEB_NOEPOCH_VERSION)'
@@echo 'Upstream version (for orig tarball): $(DEB_UPSTREAM_VERSION)'
mkdir -p $(DEB_TARBALL_DOWNLOAD_DIR)
$(SF_DOWNLOAD_COMMAND)
case "$(TARBALL_EXT)" in \
tar.bz2|tbz) \
bzcat $(DEB_TARBALL_DOWNLOAD_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.$(TARBALL_EXT) | \
gzip -9 >$(DEB_TARBALL_DOWNLOAD_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz ; \
rm -f $(DEB_TARBALL_DOWNLOAD_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.$(TARBALL_EXT) \
;;\
esac
.PHONY: get-orig-source
# copied from CDBS' buildvars
DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))
DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
DEB_SOURCE_PACKAGE_INITIAL ?= $(shell echo $(DEB_SOURCE_PACKAGE) | cut -c 1)
# where to store the resulting .orig tarball
DEB_TARBALL_DOWNLOAD_DIR ?= .
UBUNTU_COMPONENT ?= main
# defaults to non-native; you don't need to set this as both are tried
UBUNTU_NATIVE ?=
UBUNTU_DOWNLOAD_URL ?= http://archive.ubuntu.com/ubuntu/pool/$(UBUNTU_COMPONENT)/$(DEB_SOURCE_PACKAGE_INITIAL)/$(DEB_SOURCE_PACKAGE)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION)$(if $(filter 1 true yes,$(UBUNTU_NATIVE)),,.orig).tar.gz
UBUNTU_DOWNLOAD_COMMAND ?= wget -N -T10 -t1 -O $(DEB_TARBALL_DOWNLOAD_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz $(UBUNTU_DOWNLOAD_URL)
get-orig-source:
dh_testdir
@@echo 'Source package: $(DEB_SOURCE_PACKAGE)'
@@echo 'Source package: $(DEB_VERSION)'
@@echo 'Source version without epoch: $(DEB_NOEPOCH_VERSION)'
@@echo 'Upstream version (for orig tarball): $(DEB_UPSTREAM_VERSION)'
mkdir -p $(DEB_TARBALL_DOWNLOAD_DIR)
# try to download non-native, then native, or fail
$(foreach UBUNTU_NATIVE,no yes,$(UBUNTU_DOWNLOAD_COMMAND) ||) false
.PHONY: get-orig-source
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