aboutsummaryrefslogtreecommitdiffstats
path: root/main/nano/APKBUILD
blob: 727bb44a2e958cbfe740f843cb79b380928ee952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
pkgname=nano
pkgver=2.5.2
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

	install -Dm644 "$_builddir"/doc/nanorc.sample \
		"$pkgdir"/etc/nanorc || return 1

	sed -i 's:# include:include:g' "$pkgdir"/etc/nanorc
	sed -i "/syntax/s/\"$/\" \"APKBUILD&/" "$pkgdir"/usr/share/nano/sh.nanorc
}

md5sums="036830de22b8a76a0e6f84c0cb36ff12  nano-2.5.2.tar.gz"
sha256sums="89bd6ac5120880d2a95431d8bad22bf92c7ccbf10b8f1716d4ea062f3faeeb41  nano-2.5.2.tar.gz"
sha512sums="ec4e35cfb23494dd09c23b195556dfb36b9329007d61bdfe6a25a43c9914e432160969c92ed991bb2221ea5facd5ae1c1e9aef0029dfa259d827b7ea4943a1d3  nano-2.5.2.tar.gz"