aboutsummaryrefslogtreecommitdiffstats
path: root/main/nano/APKBUILD
blob: 68830d7e7a6dd7e7888af61246efb6a40d0fdea8 (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.4.1
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
}

md5sums="1c612b478f976abf8ef926480c7a3684  nano-2.4.1.tar.gz"
sha256sums="6a0ceb5e1b9b9bea72d5d1f46488ace4782b1f198ea6ba558480a86d994f29d2  nano-2.4.1.tar.gz"
sha512sums="0e2bc99627682350496853b2dc8d3d4c25303b3723fd1dec2e26f2860b21d0f4c6cb99810517fc4e86312f3bec5481c327afab84dac55f4c388799453e6f5f11  nano-2.4.1.tar.gz"