Add dash package

This commit is contained in:
Alexpux
2013-11-04 00:54:11 +04:00
parent 87b49ef1d7
commit 71b2dda45d
2 changed files with 45 additions and 0 deletions

34
dash/PKGBUILD Normal file
View File

@@ -0,0 +1,34 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=dash
pkgver=0.5.7
pkgrel=1
pkgdesc="A POSIX compliant shell that aims to be as small as possible"
arch=('i686' 'x86_64')
url="http://gondor.apana.org.au/~herbert/dash/"
license=('BSD')
depends=('msys2-runtime')
install=dash.install
source=("http://gondor.apana.org.au/~herbert/dash/files/${pkgname}-${pkgver}.tar.gz")
sha1sums=('a3ebc16f2e2c7ae8adf64e5e62ae3dcb631717c6')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr \
--bindir=/usr/bin \
--mandir=/usr/share/man \
--exec-prefix="" \
CFLAGS='-O2 -static-libgcc'
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
# license
install -m644 -D COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
ln -s ${pkgdir}/usr/bin/{d,}ash.exe
ln -s ${pkgdir}/usr/share/man/man1/{d,}ash.1
}

11
dash/dash.install Normal file
View File

@@ -0,0 +1,11 @@
post_install() {
grep -q '/bin/dash' etc/shells || echo '/bin/dash' >> etc/shells
}
post_upgrade() {
post_install
}
pre_remove() {
sed -i '/^\/bin\/dash/d' etc/shells
}