# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=nano
pkgver=8.0
pkgrel=1
pkgdesc="Pico editor clone with enhancements"
arch=('x86_64')
license=('GPL-3.0-or-later')
url="https://www.nano-editor.org"
depends=('ncurses' 'file' 'glibc')
backup=('etc/nanorc')
source=(https://www.nano-editor.org/dist/v8/${pkgname}-${pkgver}.tar.xz{,.asc})
sha256sums=('c17f43fc0e37336b33ee50a209c701d5beb808adc2d9f089ca831b40539c9ac4'
            'SKIP')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --enable-color \
    --enable-nanorc \
    --enable-multibuffer
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -DTm644 "${srcdir}"/${pkgname}-${pkgver}/doc/sample.nanorc "${pkgdir}"/etc/nanorc
}
