#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=nano
pkgver=7.2
pkgrel=01
pkgdesc="Pico editor clone with enhancements"
arch=('x86_64')
groups=( jobbot base )
url="https://www.nano-editor.org"
depends=('ncurses' 'file' 'sh')
backup=('etc/nanorc')
#options=('debug')  ###  uncomment this to have the debug pkg produced
source=(https://www.nano-editor.org/dist/v7/${pkgname}-${pkgver}.tar.xz{,.asc}
	jobo.nanorc)

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
#  we substituted our own colorized nanorc, basically uncommenting the colors proposed
  install -DTm644 "${srcdir}"/jobo.nanorc "${pkgdir}"/etc/nanorc
}

#---- license gpg-key sha256sums ----

license=('GPL')

#validpgpkeys=('8DA6FE7BFA7A418AB3CB2354BCB356DF91009FA7'  # "Chris Allegretta <chrisa@asty.org>"
#              'A7F6A64A67DA09EF92782DD79DF4862AF1175C5B'  # "Benno Schulenberg <bensberg@justemail.net>"
#validpgpkeys=('BFD009061E535052AD0DF2150D28D4D2A0ACE884') # "Benno Schulenberg <bensberg@telfort.nl>"
validpgpkeys=('168E6F4297BFD7A79AFD4496514BBE2EB8E1961F') # "Benno Schulenberg <bensberg@telfort.nl>" 

sha256sums=(86f3442768bd2873cec693f83cdf80b4b444ad3cc14760b74361474fc87a4526  # nano-7.2.tar.xz
	5f91bf5bd4edfe2540cd1927e9f5eef46e655d4bfb2fdb22ceb0ffe67b4bedad  # nano-7.2.tar.xz.asc
	b6c0a10c45766ec0afa5af5e2fca639bc08d2b06f62a4356402253e080d20f9a) # jobo.nanorc

