aboutsummaryrefslogtreecommitdiffstats
path: root/main/nano/APKBUILD
blob: f1e16eaba268ca0ea284e4eaece0f953ea5a6904 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
pkgname=nano
pkgver=2.7.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"
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="0805c5b8c75d4fde053e4b1431270f91  nano-2.7.0.tar.gz"
sha256sums="5dd1e9cf8e3de676c141a0b23f312e68380ef049926e2913e2114bbe32fbeac3  nano-2.7.0.tar.gz"
sha512sums="d70719b9623e3b3c5f43dbf4dd1d53be5d498b28416d1c6bc4459887d34531222827dfb23bc6932a6304fe59df8d278810de813b4bc08b38c03f1badeddad12f  nano-2.7.0.tar.gz"