aboutsummaryrefslogtreecommitdiffstats
path: root/main/readline/APKBUILD
blob: 3fe0a4ca63e0beecce48da891e5a1584df638feb (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=readline
pkgver=6.1.002
_myver=${pkgver%.*}
_patchver=${pkgver##*.}
_suff=${_myver%.*}${_myver#*.}
pkgrel=2
pkgdesc="GNU readline library"
url="ftp://ftp.cwru.edu/pub/bash/"
license="GPL"
depends=
makedepends="ncurses-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="http://ftp.gnu.org/gnu/readline/readline-${_myver}.tar.gz
	"

# generate url's to patches. note: no forks allowed!
_i=1
while [ $_i -le $_patchver ]; do
	source="$source http://ftp.gnu.org/gnu/readline/readline-$_myver-patches/readline$_suff-00$_i"
	_i=$(( $_i + 1))
done

_builddir="$srcdir"/$pkgname-$_myver
prepare() {
	cd "$_builddir"
	for i in "$srcdir"/readline$_suff-???; do
		[ -r "$i" ] || continue
		msg "Applying ${i##*/}"
        	patch -Np0 -i ${i} || return 1
	done
}

build() { 
	cd "$_builddir"
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	
	make SHLIB_LIBS=-lncurses || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	
}
md5sums="fc2f7e714fe792db1ce6ddc4c9fb4ef3  readline-6.1.tar.gz
c642f2e84d820884b0bf9fd176bc6c3f  readline61-001
1a76781a1ea734e831588285db7ec9b1  readline61-002"