aboutsummaryrefslogtreecommitdiffstats
path: root/main/bash/APKBUILD
blob: a2b2bacbbce8c947b4c7c1a10ab7cdbfd3b32b3e (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

pkgname=bash
pkgver=4.2.042
_patchlevel=${pkgver##*.}
_myver=${pkgver%.*}
_patchbase=${_myver%.*}${_myver#*.}
pkgrel=0
pkgdesc="The GNU Bourne Again shell"
arch="all"
license='GPL'
url="http://www.gnu.org/software/bash/bash.html"
makedepends="readline-dev ncurses-dev bison flex"
depends=
subpackages="$pkgname-doc"
source="http://ftp.gnu.org/gnu/bash/bash-${_myver}.tar.gz
	bash-noinfo.patch
	"
# generate url's to patches. note: no forks allowed!
_i=1
_pad="00"
while [ $_i -le $_patchlevel ]; do
	[ $_i -ge 10 ] && _pad="0"
	[ $_i -ge 100 ] && _pad=
	source="$source http://ftp.gnu.org/gnu/bash/bash-$_myver-patches/bash$_patchbase-$_pad$_i"
	_i=$(( $_i + 1))
done

# run 'abuild _gensrc >> APKBUILD' to generate the patch list
#_gensrc() {
#	for _i in $(seq 1 $_patchlevel); do
#		# seq -w unsupported by busybox
#		_p=$(printf "%0.3i" $_i)
#		echo -e "\thttp://ftp.gnu.org/gnu/bash/bash-${_myver}-patches/bash${_patchbase}-$_p"
#	done
#}

_builddir="$srcdir"/$pkgname-$_myver
prepare() {
	local p
	cd "$_builddir"
	for p in ../bash${_patchbase}-??? ../*.patch; do
		msg "applying patch ${p##*/}"
		patch -p0 -i $p || return 1
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--with-curses \
		--disable-nls \
		--enable-readline \
		--without-bash-malloc \
		--with-installed-readline \
		--bindir=/bin \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1
	make y.tab.c && make || return 1
}

package() {
	cd ${startdir}/src/${pkgname}-${_myver}
	make DESTDIR=${pkgdir} install

	rm -rf "$pkgdir"/usr/share/locale
}
md5sums="3fb927c7c33022f1c327f14a81c0d4b0  bash-4.2.tar.gz
80fec5f3d60a63756a4999c877e31a8e  bash-noinfo.patch
1100bc1dda2cdc06ac44d7e5d17864a3  bash42-001
30e7948079921d3261efcc6a40722135  bash42-002
9ea06decec43a198f3d7cf29acc602f8  bash42-003
fb48f6134d7b013135929476aa0c250c  bash42-004
e70e45de33426b38153b390be0dbbcd4  bash42-005
ce4e5c484993705b27daa151eca242c2  bash42-006
88d1f96db29461767602e2546803bda7  bash42-007
24c574bf6d6a581e300823d9c1276af6  bash42-008
4c5835f2fbab36c4292bb334977e5b6d  bash42-009
0a51602b535ef661ee707be6c8bdb373  bash42-010
58deacf3d57cbd75575444ff6a3b0806  bash42-011
72d5059820015231483bb7415d09e9db  bash42-012
608336ebe215984ef126e3c29d2d3409  bash42-013
ed19da878e3f630834c62b9d9dcc6fce  bash42-014
2d07daba0b8ca8f876d2aa052ff594b4  bash42-015
53d246537e1fffd1aaa02ba5c056211c  bash42-016
304fd129a58fee2d8a34f8b4704db0aa  bash42-017
6921a0b4228fe89b6537a5c29f027c89  bash42-018
1195d85447f3d048d2c9bcd075fa765c  bash42-019
b09000bba08da6ac753124593850cdf7  bash42-020
09d3f96a16b881334cfaee0cf320b47e  bash42-021
597bf71a2aac6feb510b7505cdd3d4f7  bash42-022
3fab459b4e09daea529cacad025b13b3  bash42-023
4ad8d11e72afc6090e701073ff034cf4  bash42-024
c7d2493e44490f01dd20bdc8feb0a6a7  bash42-025
9f19c199dd8d1fa9254eebe738759272  bash42-026
a6ed82daf034587aee2f2581ba5fe829  bash42-027
da9265aa2527fd4a7481baa3e0550287  bash42-028
ec444d229e8899fbaaf6fc7de2d82ae6  bash42-029
b4bc1c4dc1b508ff9cdfc44f1a5039b5  bash42-030
89390ff6a3c2ef7e09dd4b8b097a8e56  bash42-031
eee08003395c417f677d1a4bf8c548ee  bash42-032
2fe070dd6d75d8ff16f269184a16e9c4  bash42-033
4e610506c1711bf3483b965800ac3d5d  bash42-034
7cd9bfdf7cbfd45274d07620ee94c8d9  bash42-035
9c3142956064d175a880bcb186e51ef9  bash42-036
c10692f447d4966c879f8fb8d7c8ebc9  bash42-037
9ef3c308cde413e95866c1266cfb4e98  bash42-038
cd48f57a404498d4e5c73a3501c4b1a5  bash42-039
00a2371b6c05acbfce6bc850c6d982f8  bash42-040
7bc4942a66ca4024ee964db7ede07896  bash42-041
1cf7701017ebfc8e129de92c8f8b798c  bash42-042"