aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/APKBUILD
blob: 32e8fef54c5d261ca85a2c874e942510c9c99e69 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.14.4
pkgrel=0
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
license="GPL-2"
depends=
install="$pkgname.post-install $pkgname.post-upgrade"
triggers="busybox.trigger:/bin /usr/bin /sbin /usr/sbin /lib/modules/*"
source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
	$pkgname-1.11.1-bb.patch
	0001-install-compat-fix-for-mode-of-created-files.patch
	0001-add-simple-beep-applet.patch
	0002-add-config-knob-for-default-freq-and-length.patch
	0001-mount-move-resolve_mount_spec-to-volume_id.patch
	0002-swaponoff-add-uuid-label-support.patch
	bb-tar-numeric-owner.patch
	busybox-sed-3.patch
	busyboxconfig"


build() {
	cd "$srcdir"/$pkgname-$pkgver

	#patches
	for i in ../*.patch; do
		msg "Applying $i"
		if ! patch -p1 -i $i; then
			error "$i failed"
			return 1
		fi
	done

	sed -i	-e 's/(ip, _BB_DIR_BIN/(ip, _BB_DIR_SBIN/' \
		-e 's/(vi, _BB_DIR_BIN/(vi, _BB_DIR_USR_BIN/' \
		include/applets.h || return 1

	# we set the install prefix with sed since it might differ depending
	# on abuild version
	sed -e "s:^CONFIG_PREFIX=.*:CONFIG_PREFIX=\"$pkgdir\":" \
		../busyboxconfig > .config

	make silentoldconfig || return 1
	make || return 1
	make install DESTDIR="$pkgdir"
	mkdir -p "$pkgdir"/usr/sbin "$pkgdir"/usr/bin "$pkgdir"/tmp
	chmod 1777 "$pkgdir"/tmp
	# we need /bin/sh to be able to execute post-install
	ln -s /bin/busybox "$pkgdir"/bin/sh
}

md5sums="ad6d0b271e60783a3c767c4ccbc7f98e  busybox-1.14.4.tar.bz2
4c0f3b486eaa0674961b7ddcd0c60a9b  busybox-1.11.1-bb.patch
73d39c57483084298c7e46bdbbbea8d1  0001-install-compat-fix-for-mode-of-created-files.patch
aa6869db437e11af86b5bf6c7d44b0a5  0001-add-simple-beep-applet.patch
e55b64d4510aebb83661dac3271e12d3  0002-add-config-knob-for-default-freq-and-length.patch
f928cadef10307c2f14202cfaf3c038c  0001-mount-move-resolve_mount_spec-to-volume_id.patch
82310729ab41d703f3584bc9920dd712  0002-swaponoff-add-uuid-label-support.patch
0b5b2d7db201f90cd08f4a3164ee29a1  bb-tar-numeric-owner.patch
b75c3f419f8392dfdadd92aa24fdba8c  busybox-sed-3.patch
59d9b2e920505abce869de7a3abac050  busyboxconfig"