exherbo-denkn/exlibs/debian-upstream.exlib

21 lines
686 B
Bash

# Copyright 2009 Mike Kelly <pioto@exherbo.org>
# Distributed under the terms of the GNU General Public License v2
# This exlib is useful for packages whose upstream is Debian. It'll do
# 'the right thing' for DOWNLOADS
myexparam debian_pn=${PN}
myexparam debian_pv=${PV}
myexparam suffix=.tar.gz
DEBIAN_UPSTREAM_PN=$(exparam debian_pn)
DEBIAN_UPSTREAM_PV=$(exparam debian_pv)
DEBIAN_UPSTREAM_PREFIX="${DEBIAN_UPSTREAM_PN:0:1}"
if [[ "${DEBIAN_UPSTREAM_PN}" == lib* ]]; then
DEBIAN_UPSTREAM_PREFIX="${DEBIAN_UPSTREAM_PN:0:4}"
fi
DOWNLOADS="mirror://debian/pool/main/${DEBIAN_UPSTREAM_PREFIX}/${DEBIAN_UPSTREAM_PN}/${DEBIAN_UPSTREAM_PN}_${DEBIAN_UPSTREAM_PV}$(exparam suffix)"