aboutsummaryrefslogtreecommitdiffstats
path: root/main/fakeroot/APKBUILD
blob: 82bee2799f1d5127bbf7b531102eacf316ae09be (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fakeroot
pkgver=1.20.2
pkgrel=2
pkgdesc="Gives a fake root environment, useful for building packages as a non-privileged user"
arch="all"
license='GPL'
url="http://fakeroot.alioth.debian.org/"
depends=
makedepends_host="libcap-dev acl-dev linux-headers"
makedepends="$makedepends_host"
subpackages="$pkgname-doc"
source="http://ftp.debian.org/debian/pool/main/f/$pkgname/${pkgname}_${pkgver}.orig.tar.bz2
	busybox-getopt.patch
	fakeroot-hide-dlsym-errors.patch
	fakeroot-no64.patch
	fakeroot-stdint.patch
	"

prepare() {
	cd $startdir/src/$pkgname-$pkgver
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	if [ "$CLIBC" = "musl" ]; then
		# overrides wrong symbol for musl, so hack the config script
		sed -e 's/for WRAPPED in __${PRE}x${FUNC} _${PRE}x${FUNC} __${PRE}${FUNC}13 ${PRE}${FUNC}; do/for WRAPPED in ${PRE}${FUNC}; do/' \
		    -i configure
	fi
}

build() {
	cd $startdir/src/$pkgname-$pkgver

	if [ "$CLIBC" = "musl" ]; then
		# musl does not have _STAT_VER, it's really not used for
		# anything, so define it as zero (just like uclibc does)
		export CFLAGS="-D_STAT_VER=0 $CFLAGS"
	fi

	CONFIG_SHELL=/bin/sh \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static \
		|| return 1
	make || return 1
}

package() {
	cd $startdir/src/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la
}

md5sums="a4b4564a75024aa96c86e4d1017ac786  fakeroot_1.20.2.orig.tar.bz2
7ca69287e73bdd65947e70e439b5bb64  busybox-getopt.patch
624cd86a66d020d01bde4ba60efc4d40  fakeroot-hide-dlsym-errors.patch
3fc66a8ffb365fcf2acd652d33f101a2  fakeroot-no64.patch
50a899380cfd5eae8ce3aaf878fb17b2  fakeroot-stdint.patch"
sha256sums="7c0a164d19db3efa9e802e0fc7cdfeff70ec6d26cdbdc4338c9c2823c5ea230c  fakeroot_1.20.2.orig.tar.bz2
6b881eaecacacba100cbaa96d552c51a622639a40f3d7701b6756b4cde0e5d95  busybox-getopt.patch
915313c164b2968bc785621d14e652aae0bb74cec01510457d1fa601f23e0ca2  fakeroot-hide-dlsym-errors.patch
3420da0789caef582fcfc890c657da4136b3b06d1205443f4409cdf85ab02a46  fakeroot-no64.patch
8739c0b79c3f2b0e46cd0dffa8b73d946efbe994f61f69f7d1115c2dcec22df1  fakeroot-stdint.patch"
sha512sums="1ac231f995774aa40f43c4325cd9e6de45365963277c32a85776690c3e7fd281ac410f3d91395dc1e5e5ca3b143e89914e048632011a3985ead216e870852231  fakeroot_1.20.2.orig.tar.bz2
9024263f4452bcb46c9670f8b8106e67c2d9b4cf45215def7ff4e78d2c908e4f98d494dd6f514fb3325165b0f61571fa031632b4642163cf9b1b3386d0867c5f  busybox-getopt.patch
666f41d6adc5e65eba419e08d5bbc4f561e40b0fc7bfa82090eb87962a7f3193bf319754e04aca289e865c66df2ecced1dbb45c9aa9f093657f22193dda25354  fakeroot-hide-dlsym-errors.patch
7a832e6bed3838c7c488e0e12ba84b8d256e84bbb06d6020247452a991de505fa5c6bd7bcb84dce8753eb242e0fcab863b5461301cd56695f2b003fe8d6ff209  fakeroot-no64.patch
ed7a58b0d201139545420f9e5429f503c00e00f36dea84473e77ea99b23bb8d421da1a8a8ce98ff90e72e378dff4cb9ea3c1a863a969899a5f50dfac3b9c5fac  fakeroot-stdint.patch"