summaryrefslogtreecommitdiff
path: root/repo/nano/nano.xibuild
blob: dcca53b4e7a1c493b2021fb4aeeec9c705b21f33 (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
#!/bin/sh

NAME="nano"
DESC="Enhanced clone of the Pico text editor"

MAKEDEPS=" ncurses"

PKG_VER=6.2
SOURCE="https://www.nano-editor.org/dist/v${PKG_VER%%.*}/nano-$PKG_VER.tar.xz"
build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-libmagic \
		--disable-nls
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$PKG_DEST" install
	install -Dm644 doc/sample.nanorc \
		"$PKG_DEST"/etc/nanorc

	# Proper syntax highlighting for APKBUILDs
	sed -i "/syntax/s/\"$/\" \"APKBUILD&/" \
		"$PKG_DEST"/usr/share/nano/sh.nanorc

	rm -rf "$PKG_DEST"/usr/lib/charset.alias
}