diff --git a/fish/PKGBUILD b/fish/PKGBUILD index 9ea09b7de..40597c0fa 100644 --- a/fish/PKGBUILD +++ b/fish/PKGBUILD @@ -1,28 +1,39 @@ +# Contributions from Arch: +# Maintainer: Levente Polyak +# Contributor: Bartłomiej Piotrowski +# Contributor: Kaiting Chen +# Contributor: Abhishek Dasgupta +# Contributor: Eric Belanger +# Contributor: Jan Fader + pkgname=fish -pkgver=2.7.1 +pkgver=3.0.0 pkgrel=1 pkgdesc='Smart and user friendly shell intended mostly for interactive use' +url='https://fishshell.com/' arch=('x86_64') -url='https://www.fishshell.com/' license=('GPL2') -makedepends=('gcc' 'doxygen') -depends=('ncurses' 'gettext') -source=("https://github.com/fish-shell/fish-shell/archive/${pkgver}.tar.gz") -sha512sums=('53eb8082812f28386b491ea18caa4a51ac66ead87fa78d5584275c66f1335b8705fad266170dc2ed6ee9e5d1febcdf0869c37ed2f95b58c10a74faf4ad95e610') +depends=('bc' 'gcc-libs' 'inetutils' 'ncurses' 'which' 'pcre2') +optdepends=('python3: for manual page completion parser and web configuration tool') +makedepends=('doxygen') +install=fish.install +source=(${pkgname}-${pkgver}.tar.gz::https://github.com/fish-shell/fish-shell/archive/${pkgver}.tar.gz) +sha512sums=('97efb67c34860794787b44c04fbb8ebc1b7a8c37da00e7f6d93daab6707f198a2e0455e956a3b1c6a0c1711fa2d0f024ba42a3f82fbb17e857c518a858bb2ffb') prepare() { - cd fish-shell-${pkgver} - autoreconf + cd fish-shell-${pkgver} + echo ${pkgver} > version + autoreconf -fiv } build() { - cd fish-shell-${pkgver} - ./configure --prefix=/usr --sysconfdir=/etc - make + cd fish-shell-${pkgver} + ./configure --prefix=/usr \ + --sysconfdir=/etc + make } package() { - cd fish-shell-${pkgver} - make DESTDIR="${pkgdir}" install + cd fish-shell-${pkgver} + make DESTDIR="${pkgdir}" install } - diff --git a/fish/fish.install b/fish/fish.install new file mode 100644 index 000000000..40a3e6538 --- /dev/null +++ b/fish/fish.install @@ -0,0 +1,11 @@ +post_install() { + grep -qe '^/usr/bin/fish$' etc/shells || echo '/usr/bin/fish' >> etc/shells +} + +post_upgrade() { + post_install +} + +pre_remove() { + sed -ri '\|^/usr/bin/fish$|d' etc/shells +}