# Maintainer: Masanori Shirayama <mashir43@gmail.com>

pkgname=fish
pkgver=2.7.1
pkgrel=2
epoch=
pkgdesc="a smart and user-friendly command line shell"
arch=('i686' 'x86_64')
url="https://fishshell.com/"
license=('GPL')
groups=()
depends=('gcc-libs' 'ncurses' 'gettext' 'libiconv' 'man-db' 'bc')
makedepends=('gcc' 'ncurses-devel' 'gettext-devel' 'intltool' 'libiconv-devel' 'doxygen')
optdepends=('python: for manual page completion parser and web configuration tool')
install=fish.install
source=("https://github.com/fish-shell/fish-shell/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.asc}
        01-msysize.patch)
sha256sums=('e42bb19c7586356905a58578190be792df960fa81de35effb1ca5a5a981f0c5a'
            'SKIP'
            '1e2743177c499e890d681be685fed6f849e42cb282e13b4e56324169a43bd987')
validpgpkeys=('003837986104878835FA516D7A67D962D88A709A')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i ${srcdir}/01-msysize.patch
  autoreconf -ivf
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr --with-doxygen --sysconfdir=/etc
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}/" install
}
