APKBUILD 1.34 KB
Newer Older
Michael Mason's avatar
Michael Mason committed
1
# Contributor: Michael Mason <ms13sp@gmail.com>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
3
pkgname=nano
prspkt's avatar
prspkt committed
4
pkgver=4.3
A. Klitzing's avatar
A. Klitzing committed
5
pkgrel=0
6 7
pkgdesc="Enhanced clone of the Pico text editor"
url="https://www.nano-editor.org"
8
arch="all"
9
license="GPL-3.0-or-later"
10
makedepends="file-dev linux-headers ncurses-dev"
Timo Teräs's avatar
Timo Teräs committed
11
subpackages="$pkgname-doc $pkgname-syntax::noarch"
12
source="https://www.nano-editor.org/dist/v${pkgver%.*}/$pkgname-$pkgver.tar.xz"
Daniel Sabogal's avatar
Daniel Sabogal committed
13
builddir="$srcdir/$pkgname-$pkgver"
14

15
build() {
Daniel Sabogal's avatar
Daniel Sabogal committed
16
	cd "$builddir"
17 18 19 20
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
21 22 23 24
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-nls \
25 26
		--with-wordbounds
	make
Natanael Copa's avatar
Natanael Copa committed
27 28
}

A. Klitzing's avatar
A. Klitzing committed
29 30
check() {
	cd "$builddir"
31
	make check
A. Klitzing's avatar
A. Klitzing committed
32 33
}

Natanael Copa's avatar
Natanael Copa committed
34
package() {
Daniel Sabogal's avatar
Daniel Sabogal committed
35
	cd "$builddir"
36

37
	make DESTDIR="$pkgdir" install
38
	install -Dm644 doc/sample.nanorc \
39
		"$pkgdir"/etc/nanorc
Sören Tempel's avatar
Sören Tempel committed
40

41 42
	# Proper syntax highlighting for APKBUILDs
	sed -i "/syntax/s/\"$/\" \"APKBUILD&/" \
43
		"$pkgdir"/usr/share/nano/sh.nanorc
A. Klitzing's avatar
A. Klitzing committed
44

45
	rm -rf "$pkgdir"/usr/lib/charset.alias
46 47 48 49 50 51 52
}

syntax() {
	pkgdesc="Syntax highlighting definitions for $pkgname"

	mkdir -p "$subpkgdir"/usr/share/$pkgname/
	mv "$pkgdir"/usr/share/$pkgname/*.nanorc \
53
		"$subpkgdir"/usr/share/$pkgname/
54 55
}

prspkt's avatar
prspkt committed
56
sha512sums="3b16b70bdd98ea92cef99dfe5ee859e198bdb1dfa44e25aa200362958f77f8127c7c66aaf204637b768f10b3ea6f45f41417359b2f2608fab28ee9041057bf4f  nano-4.3.tar.xz"