mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 05:36:38 +02:00
When installing dash-binsh but dash is not installed the previous binsh may be removed early leaving dash.post-install without a shell to run. Using the shell itself also resolves a recursive dependency between dash and dash-binsh. Additional dependency on busybox is needed when creating a rootfs to ensure the 'add-shell' command is actually available when running the dash.post-install script.
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=dash
|
|
pkgver=0.5.12
|
|
pkgrel=3
|
|
pkgdesc="Small and fast POSIX-compliant shell"
|
|
url="http://gondor.apana.org.au/~herbert/dash/"
|
|
arch="all"
|
|
license="BSD-3-Clause AND GPL-2.0-or-later"
|
|
# Ensure add-shell is available in post-install on rootfs creation
|
|
depends="busybox"
|
|
# needs 'nl' utility from coreutils
|
|
makedepends="coreutils"
|
|
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
|
|
subpackages="$pkgname-doc $pkgname-binsh::noarch"
|
|
source="http://gondor.apana.org.au/~herbert/dash/files/dash-$pkgver.tar.gz"
|
|
|
|
build() {
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--mandir=/usr/share/man \
|
|
--localstatedir=/var
|
|
make
|
|
}
|
|
|
|
check() {
|
|
./src/dash -c 'echo ok'
|
|
}
|
|
|
|
package() {
|
|
make DESTDIR="$pkgdir" install
|
|
}
|
|
|
|
binsh() {
|
|
pkgdesc="dash as /bin/sh"
|
|
provides="/bin/sh"
|
|
provider_priority=60 # lower (other provider is busybox-binsh, yash-binsh)
|
|
# Scripts assume busybox tools are available when depending on /bin/sh
|
|
depends="busybox"
|
|
|
|
mkdir -p "$subpkgdir"/bin
|
|
ln -s /usr/bin/dash "$subpkgdir"/bin/sh
|
|
}
|
|
|
|
sha512sums="
|
|
13bd262be0089260cbd13530a9cf34690c0abeb2f1920eb5e61be7951b716f9f335b86279d425dbfae56cbd49231a8fdffdff70601a5177da3d543be6fc5eb17 dash-0.5.12.tar.gz
|
|
"
|