# Contributor: Michael Mason # Maintainer: Michael Zhou pkgname=nano pkgver=2.6.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" install= subpackages="$pkgname-doc $pkgname-syntax" 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 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" arch="noarch" depends="" mkdir -p "$subpkgdir"/usr/share/$pkgname/ mv "$pkgdir"/usr/share/$pkgname/*.nanorc \ "$subpkgdir"/usr/share/$pkgname/ || return 1 } md5sums="1213c7f17916e65afefc95054c1f90f9 nano-2.6.3.tar.gz" sha256sums="4f4054e12f2181c8e436163e931a0a565612242ff9e566c4d1adeda0f91fd503 nano-2.6.3.tar.gz" sha512sums="5079c0da976e3cfef9f3980e37c2501837bc66bb98fadd6fe7f02b061b83c99454678833fd43c74e6796cdc4ee9028ccba7a8a05e0f86e7a6517ba4d4c6bc95e nano-2.6.3.tar.gz"