diff options
author | Gabriel Laskar | 2021-05-16 12:07:07 +0200 |
---|---|---|
committer | Gabriel Laskar | 2021-05-16 12:07:07 +0200 |
commit | 41cf053ecfb1e0e4f4605bbeef6470895b224763 (patch) | |
tree | e954861d6358d99e50f1b89b250747dbfbc956e8 | |
parent | 0f2b202f3a7a74454645bfa40228d9bd901de420 (diff) | |
download | aur-41cf053ecfb1e0e4f4605bbeef6470895b224763.tar.gz |
update to oksh 6.9
oksh ships the default ksh.kshrc file now, so move that to /etc/ksh.kshrc
Add /usr/bin/oksh to /etc/shells and remove it if you uninstall.
Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
Signed-off-by: sleepydraugor <sleepydraugor@protonmail.com>
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | oksh.install | 13 |
3 files changed, 33 insertions, 15 deletions
@@ -1,8 +1,9 @@ pkgbase = oksh pkgdesc = Ported version of ksh from OpenBSD - pkgver = 6.8.1 + pkgver = 6.9 pkgrel = 1 url = https://github.com/ibara/oksh/ + install = oksh.install arch = i686 arch = x86_64 license = custom: Public Domain @@ -10,8 +11,9 @@ pkgbase = oksh license = BSD depends = glibc depends = ncurses - source = https://github.com/ibara/oksh/releases/download/oksh-6.8.1/oksh-6.8.1.tar.gz - sha256sums = ddd2b27b99009a4ee58ddf58da73edf83962018066ccf33b2fe1f570a00917b0 + backup = etc/ksh.kshrc + source = https://github.com/ibara/oksh/releases/download/oksh-6.9/oksh-6.9.tar.gz + sha256sums = c08d97b2ac9ee5d88e9e508d27c75502b2d06c20d4c5ab87b496cb3b9951bd35 pkgname = oksh @@ -1,19 +1,21 @@ # Maintainer: Gabriel Laskar <gabriel at lse dot epita dot fr> pkgname=oksh -pkgver=6.8.1 +pkgver=6.9 pkgrel=1 -url="https://github.com/ibara/oksh/" -pkgdesc="Ported version of ksh from OpenBSD" +url='https://github.com/ibara/oksh/' +pkgdesc='Ported version of ksh from OpenBSD' license=('custom: Public Domain' 'ISC' 'BSD') depends=('glibc' 'ncurses') arch=('i686' 'x86_64') -source=(https://github.com/ibara/oksh/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz) -sha256sums=('ddd2b27b99009a4ee58ddf58da73edf83962018066ccf33b2fe1f570a00917b0') +source=(https://github.com/ibara/oksh/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz) +sha256sums=('c08d97b2ac9ee5d88e9e508d27c75502b2d06c20d4c5ab87b496cb3b9951bd35') +backup=(etc/ksh.kshrc) +install=oksh.install build() { - cd "$pkgname-$pkgver" + cd "${pkgname}-${pkgver}" - ./configure --prefix=/usr --mandir=/usr/share/man/ + ./configure --prefix=/usr sed -n '/Copyright/,/PERFORMANCE/p' strtonum.c > ISC-LICENSE sed -n '/Copyright/,/SUCH DAMAGE./p' vis.c > BSD-LICENSE cat LEGAL > PUBLIC_DOMAIN-LICENSE @@ -21,13 +23,14 @@ build() { } package() { - cd "$pkgname-$pkgver" + cd "${pkgname}-${pkgver}" - make DESTDIR="$pkgdir/" install + make DESTDIR="${pkgdir}/" install - install -Dm644 ISC-LICENSE "$pkgdir/usr/share/licenses/$pkgname/ISC-LICENSE" - install -Dm644 BSD-LICENSE "$pkgdir/usr/share/licenses/$pkgname/BSD-LICENSE" - install -Dm644 PUBLIC_DOMAIN-LICENSE "$pkgdir/usr/share/licenses/$pkgname/PUBLIC_DOMAIN-LICENSE" + install -Dm644 ksh.kshrc "${pkgdir}/etc/ksh.kshrc" + install -Dm644 ISC-LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/ISC-LICENSE" + install -Dm644 BSD-LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/BSD-LICENSE" + install -Dm644 PUBLIC_DOMAIN-LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/PUBLIC_DOMAIN-LICENSE" } # vim:set ts=2 sw=2 et: diff --git a/oksh.install b/oksh.install new file mode 100644 index 000000000000..afede42a7260 --- /dev/null +++ b/oksh.install @@ -0,0 +1,13 @@ +post_install() { + echo "Adding '/usr/bin/oksh' to '/etc/shells'..." + grep -qe '^/usr/bin/oksh$' etc/shells || echo '/usr/bin/oksh' >> etc/shells +} + +post_upgrade() { + post_install +} + +pre_remove() { + echo "Removing '/usr/bin/oksh' from '/etc/shells'..." + sed -i '\|^/usr/bin/oksh$|d' etc/shells +} |