summaryrefslogtreecommitdiff
path: root/repo/nano
diff options
context:
space:
mode:
Diffstat (limited to 'repo/nano')
-rw-r--r--repo/nano/nano.xibuild38
1 files changed, 38 insertions, 0 deletions
diff --git a/repo/nano/nano.xibuild b/repo/nano/nano.xibuild
new file mode 100644
index 0000000..dcca53b
--- /dev/null
+++ b/repo/nano/nano.xibuild
@@ -0,0 +1,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
+}
+