# Contributor: Michael Mason # Maintainer: Michael Zhou pkgname=nano pkgver=2.5.0 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" install= subpackages="$pkgname-doc" source="http://www.nano-editor.org/dist/v${pkgver%.*}/$pkgname-$pkgver.tar.gz " _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } 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 mkdir -p "$pkgdir"/etc cp "$srcdir/$pkgname-$pkgver"/doc/nanorc.sample "$pkgdir"/etc/nanorc sed -i 's:# include:include:g' "$pkgdir"/etc/nanorc sed -i "/syntax/s/\"$/\" \"APKBUILD&/" "$pkgdir"/usr/share/nano/sh.nanorc } md5sums="751ed96457017572bab15be18cb873ba nano-2.5.0.tar.gz" sha256sums="ff323e6fef74caf0a924304841c07ac65ec30db99dc5c1f8272b4c536a5c89ee nano-2.5.0.tar.gz" sha512sums="f05f1afa6a79ff6b87359c46fbdaf6161eacdc265ac6be155a0173e3ab5a17023e205d0b9667a942e754556182a9007fe4438f337a830d20b9546aad9d522ba6 nano-2.5.0.tar.gz"