# Contributor: Michael Mason # Maintainer: Natanael Copa pkgname=nano pkgver=2.8.6 pkgrel=0 pkgdesc="Text editor designed to be a free replacement for the Pico text editor" url="http://www.nano-editor.org/" arch="all" license="GPL" makedepends="ncurses-dev file-dev" subpackages="$pkgname-doc $pkgname-syntax::noarch" source="http://www.nano-editor.org/dist/v${pkgver%.*}/$pkgname-$pkgver.tar.gz" builddir="$srcdir/$pkgname-$pkgver" build() { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --disable-nls \ --with-wordbounds make } check() { cd "$builddir" make check } package() { cd "$builddir" make DESTDIR="$pkgdir" install install -Dm644 doc/sample.nanorc \ "$pkgdir"/etc/nanorc # Proper syntax highlighting for APKBUILDs sed -i "/syntax/s/\"$/\" \"APKBUILD&/" \ "$pkgdir"/usr/share/nano/sh.nanorc rm -rf "$pkgdir"/usr/lib/charset.alias } syntax() { pkgdesc="Syntax highlighting definitions for $pkgname" mkdir -p "$subpkgdir"/usr/share/$pkgname/ mv "$pkgdir"/usr/share/$pkgname/*.nanorc \ "$subpkgdir"/usr/share/$pkgname/ } sha512sums="51a16cae4fd753a575690974759bd6277f81487c04b9e15018770f4333bcce2ef7f15c4d241973a3f993fc54978e5830fe59a59e2af1acd8639e81cb905219c5 nano-2.8.6.tar.gz"