summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Staal2015-10-18 08:08:04 +0200
committerJens Staal2015-10-18 08:08:04 +0200
commitb093ab5050814291f0d61f9755d1b4adf0ec20c1 (patch)
treec6477ede1ab54a4efa0762ab22e08f6c101e23ee
downloadaur-b093ab5050814291f0d61f9755d1b4adf0ec20c1.tar.gz
initial commit: static dash shell
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD41
-rw-r--r--dash.install13
3 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..07d504766de
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = dash-static-musl
+ pkgdesc = A POSIX compliant shell that aims to be as small as possible, statically linked to musl libc
+ pkgver = 0.5.8
+ pkgrel = 1
+ url = http://gondor.apana.org.au/~herbert/dash/
+ install = dash.install
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = musl
+ provides = dash
+ conflicts = dash
+ source = http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.8.tar.gz
+ sha1sums = cd058935bba545427caa375337afe8a6309477d2
+
+pkgname = dash-static-musl
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..71dc97a2d2b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer : Jens Staal <staal1978@gmail.com>
+# Adapted from: Dan McGee <dan@archlinux.org>
+
+pkgname=dash-static-musl
+_pkgbase=dash
+pkgver=0.5.8
+pkgrel=1
+pkgdesc="A POSIX compliant shell that aims to be as small as possible, statically linked to musl libc"
+arch=('i686' 'x86_64')
+url="http://gondor.apana.org.au/~herbert/dash/"
+license=('BSD')
+provides=("$_pkgbase")
+conflicts=("$_pkgbase")
+makedepends=('musl') #we are static
+install=dash.install
+source=("http://gondor.apana.org.au/~herbert/dash/files/${_pkgbase}-${pkgver}.tar.gz")
+sha1sums=('cd058935bba545427caa375337afe8a6309477d2')
+
+build() {
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ export CC=musl-gcc
+ export CFLAGS='-Os -static'
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --mandir=/usr/share/man \
+ --exec-prefix="" \
+ --with-libedit
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # license
+ install -m644 -D COPYING ${pkgdir}/usr/share/licenses/${_pkgbase}/COPYING
+}
+
diff --git a/dash.install b/dash.install
new file mode 100644
index 00000000000..ce29dcc9382
--- /dev/null
+++ b/dash.install
@@ -0,0 +1,13 @@
+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
+}
+
+