blob: 137c2ffb2ebab0cff791395f7c982e8dcde895a7 (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
pkgname=nano
pkgver=2.6.2
pkgrel=0
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"
depends=
makedepends="ncurses-dev"
install=
subpackages="$pkgname-doc $pkgname-syntax"
source="http://www.nano-editor.org/dist/v${pkgver%.*}/$pkgname-$pkgver.tar.gz
"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
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/nanorc.sample \
"$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"
arch="noarch"
depends=""
mkdir -p "$subpkgdir"/usr/share/$pkgname/
mv "$pkgdir"/usr/share/$pkgname/*.nanorc \
"$subpkgdir"/usr/share/$pkgname/ || return 1
}
md5sums="58568a4b8a33841d774c25f285fc11c1 nano-2.6.2.tar.gz"
sha256sums="453603ee56c8b6808d3ee24de71cb9dba4a3440ae91fdbecc00713a8228e8985 nano-2.6.2.tar.gz"
sha512sums="418aa51d52db14f9e72f4e93154222ad37e84d03fa08163f9e31c97689194311b00fa6c0db4b08226c4311856a7dbf0bd2d54c87d5a73a90a4b72612595b858e nano-2.6.2.tar.gz"
|