# Contributor: Michael Mason # Maintainer: Michael Zhou pkgname=nano pkgver=2.7.3 pkgrel=0 pkgdesc="Text Editor. GNU nano is designed to be a free replacement for the Pico text editor." url="http://www.nano-editor.org/" arch="all" license="GPL" depends= 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 \ || return 1 make || return 1 } package() { cd "$builddir" make DESTDIR="$pkgdir" install install -Dm644 doc/nanorc.sample \ "$pkgdir"/etc/nanorc || return 1 # Proper syntax highlighting for APKBUILDs sed -i "/syntax/s/\"$/\" \"APKBUILD&/" \ "$pkgdir"/usr/share/nano/sh.nanorc || return 1 } syntax() { pkgdesc="Syntax highlighting definitions for $pkgname" depends="" mkdir -p "$subpkgdir"/usr/share/$pkgname/ mv "$pkgdir"/usr/share/$pkgname/*.nanorc \ "$subpkgdir"/usr/share/$pkgname/ || return 1 } md5sums="007ba6321212d3ec38f46236465b6ea8 nano-2.7.3.tar.gz" sha256sums="3574d4594d051f3b572c47d63bfc3763fb1148c50b811ba7a016bacd94887a88 nano-2.7.3.tar.gz" sha512sums="cd159cf193f05b37f770ac79e532fe96be158688d241ab7090861016fe0da9dde2ab504d0703b8feea8043e1deded3f10f0ab4dd5cceba99fe4a1dfcf5062b0b nano-2.7.3.tar.gz"