aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2016-02-14 12:00:36 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2016-02-16 10:48:41 +0000
commit46b05a3d895fd8eb4faba17d93e8812e5882188c (patch)
treed41fd2fc325a9c4d1fa49b88ae598751856c8a01
parent790b1d3a815f40b9cb932642ebeef0f5688582ce (diff)
downloadaports-46b05a3d895fd8eb4faba17d93e8812e5882188c.tar.bz2
aports-46b05a3d895fd8eb4faba17d93e8812e5882188c.tar.xz
main/nano: split syntax definitions into a subpackage
-rw-r--r--main/nano/APKBUILD24
1 files changed, 17 insertions, 7 deletions
diff --git a/main/nano/APKBUILD b/main/nano/APKBUILD
index 727bb44a2e..4efd82b033 100644
--- a/main/nano/APKBUILD
+++ b/main/nano/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
pkgname=nano
pkgver=2.5.2
-pkgrel=0
+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"
@@ -10,11 +10,11 @@ license="GPL"
depends=
makedepends="ncurses-dev"
install=
-subpackages="$pkgname-doc"
+subpackages="$pkgname-doc $pkgname-syntax"
source="http://www.nano-editor.org/dist/v${pkgver%.*}/$pkgname-$pkgver.tar.gz
"
-_builddir="$srcdir/$pkgname-$pkgver"
+_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
for i in $source; do
@@ -41,12 +41,22 @@ build() {
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install
-
- install -Dm644 "$_builddir"/doc/nanorc.sample \
+ install -Dm644 doc/nanorc.sample \
"$pkgdir"/etc/nanorc || return 1
- sed -i 's:# include:include:g' "$pkgdir"/etc/nanorc
- sed -i "/syntax/s/\"$/\" \"APKBUILD&/" "$pkgdir"/usr/share/nano/sh.nanorc
+ # 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"
+ arch="noarch"
+ depends=""
+
+ mkdir -p "$subpkgdir"/usr/share/$pkgname/
+ mv "$pkgdir"/usr/share/$pkgname/*.nanorc \
+ "$subpkgdir"/usr/share/$pkgname/ || return 1
}
md5sums="036830de22b8a76a0e6f84c0cb36ff12 nano-2.5.2.tar.gz"