testing/oils-for-unix: new aport

This commit is contained in:
Samuel Hierholzer 2024-08-09 05:11:37 +00:00 committed by Kevin Daudt
parent aaee1d4285
commit bbf7919f9b
7 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,57 @@
# Contributor: Samuel Hierholzer <samuel@ton-kunst.ch>
# Maintainer: Samuel Hierholzer <samuel@ton-kunst.ch>
pkgname=oils-for-unix
pkgver=0.26.0
pkgrel=0
pkgdesc="Unix shell with JSON-compatible structured data"
url="https://www.oils.pub/"
arch="all"
license="Apache-2.0"
makedepends="readline-dev"
subpackages="$pkgname-doc $pkgname-binsh $pkgname-bash"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
source="https://oils.pub/download/oils-for-unix-$pkgver.tar.gz"
build() {
# not gnu autoconf
./configure \
--prefix=/usr \
--with-readline
_build/oils.sh
}
check() {
_bin/cxx-opt-sh/osh -c 'echo hi'
_bin/cxx-opt-sh/osh -n -c 'echo hi'
_bin/cxx-opt-sh/ysh -c 'echo hi'
_bin/cxx-opt-sh/ysh -n -c 'echo hi'
_bin/cxx-opt-sh/ysh -c 'json write ({x: 42}, space=0)'
}
package() {
DESTDIR="$pkgdir" ./install
install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/"$pkgname"
}
binsh() {
pkgdesc="oils-for-unix as /bin/sh"
provides="/bin/sh"
provider_priority=10 # lowest (other providers: dash-binsh, busybox-binsh, yash-binsh)
mkdir -p "$subpkgdir"/bin
ln -s /usr/bin/oils-for-unix "$subpkgdir"/bin/sh
}
bash() {
pkgdesc="oils-for-unix as /bin/bash"
provider_priority=10 # lowest (other provider is bash)
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
mkdir -p "$subpkgdir"/bin
ln -s /usr/bin/oils-for-unix "$subpkgdir"/bin/bash
}
sha512sums="
89d297b30aa426a276f16c07d3c37ffec4091b52487e644e34217438bb7ba1792c3a127a293a5d0ceee3e2bf379f26c44408a7eb2fd1e08741bd4eb5131efe54 oils-for-unix-0.26.0.tar.gz
"

View file

@ -0,0 +1,3 @@
#!/bin/bash
add-shell '/bin/bash'
exit 0

View file

@ -0,0 +1 @@
oils-for-unix-bash.post-install

View file

@ -0,0 +1,3 @@
#!/bin/bash
remove-shell '/bin/bash'
exit 0

View file

@ -0,0 +1,5 @@
#!/usr/bin/osh
add-shell '/usr/bin/osh'
add-shell '/usr/bin/ysh'
exit 0

View file

@ -0,0 +1 @@
oils-for-unix.post-install

View file

@ -0,0 +1,5 @@
#!/usr/bin/osh
remove-shell '/usr/bin/osh'
remove-shell '/usr/bin/ysh'
exit 0