aboutsummaryrefslogtreecommitdiffstats
path: root/main/nano/APKBUILD
blob: ccdfc2f661d97c9d5087a8ee005ec8a877371842 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nano
pkgver=2.7.4
pkgrel=1
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"
makedepends="ncurses-dev file-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/sample.nanorc \
		"$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="e3a6b2740eb31f8a06d585f44d883895  nano-2.7.4.tar.gz"
sha256sums="23ffc2de52d687739fed6dc2fc94df36aa7da7bb52c8740c523fdd7336fdbc8c  nano-2.7.4.tar.gz"
sha512sums="029fa2ef72a8762f376f1cfc3f4cdcabfcb226868e5c68c5980162333099f23e74e77da2dda66b4e70e2840b9a0e472db821248327b417b3cf5132093eeb80ee  nano-2.7.4.tar.gz"