void-packages/srcpkgs/debootstrap/template
2020-03-15 16:58:33 +01:00

32 lines
1.3 KiB
Bash

# Template file for 'debootstrap'
pkgname=debootstrap
version=1.0.123
revision=1
build_style=fetch
depends="binutils gnupg gzip tar wget xz"
short_desc="Bootstrap a basic Debian system"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT"
homepage="http://packages.qa.debian.org/d/debootstrap.html"
distfiles="${DEBIAN_SITE}/main/d/${pkgname}/${pkgname}_${version}_all.deb
${DEBIAN_SITE}/main/d/debian-archive-keyring/debian-archive-keyring_2019.1_all.deb"
checksum="0ab37218fa9719517fccee68b552545f17a5336bbf5801c6d565213ca1aa014e
9cefd8917f3d97a999c136aa87f04a3024408b5bc1de470de7d6dfa5e4bd4361"
do_install() {
ar p ${pkgname}_${version}_all.deb data.tar.gz | bsdtar xvzf - -C ${DESTDIR}
ar p debian-archive-keyring_2019.1_all.deb data.tar.xz | bsdtar xvJf - -C ${DESTDIR} ./usr/share/keyrings/debian-archive-keyring.gpg
mv ${DESTDIR}/usr/sbin ${DESTDIR}/usr/bin
sed -i 's|export PATH|export PATH="/usr/sbin:/sbin:/usr/bin:/bin"|' ${DESTDIR}/usr/bin/debootstrap
vlicense ${DESTDIR}/usr/share/doc/debootstrap/copyright LICENSE
rm ${DESTDIR}/usr/share/doc/debootstrap/copyright
case "$XBPS_TARGET_MACHINE" in
arm*) echo armhf;;
i686*) echo i386;;
x86_64*) echo amd64;;
aarch64*) echo arm64;;
ppc64le*) echo ppc64el;;
ppc64*) echo ppc64;;
*) uname -m;;
esac >${DESTDIR}/usr/share/debootstrap/arch
}