blob: 84fe97a84274463e2f09aa418f3e4ecfbd89ae27 (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_abiver=0.9.32
pkgname=libc$_abiver
_gitver=100507
pkgver=${_abiver}_alpha0_git$_gitver
pkgrel=1
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
subpackages="uclibc-dev:dev uclibc-utils:utils"
depends_dev="linux-headers=>2.6.32"
#options="!strip"
replaces=uclibc
_snapurl="http://git.uclibc.org/uClibc/snapshot/master.tar.bz2"
_snapfile="$pkgname-$pkgver.tar.bz2"
source="http://build.alpinelinux.org:8010/distfiles/$_snapfile
compat-stack-guard.patch
0001-static-build-fix-internal-locking-weaks-to-get-pulle.patch
0002-resolv-various-memory-corruption-and-off-by-one-fixe.patch
uclibc-libm-pic.patch
uclibcconfig.x86
uclibcconfig.i486
"
_config="$srcdir"/uclibcconfig.${ARCH:-x86}
_builddir="$srcdir"/master
snapshot() {
local _date=$(date +%y%m%d%H%M)
pkgver=${_abiver}_alpha0_git$_gitver
rm -f "$SRCDEST"/$_snapfile
wget -O "$SRCDEST"/$_snapfile $_snapurl
pkgrel=0
sed -i -e "s/^_gitver=.*/_gitver=$(date +%y%m%d)/" \
-e "s/^pkgrel=.*/pkgrel=$pkgrel/" \
APKBUILD
checksum
}
prepare() {
local i
cd "$_builddir"
# patches goes here
for i in ../*.patch ../*.diff; do
[ -r "$i" ] || continue
msg "Applying $i..."
patch -p1 < $i || return 1
done
# set abi version and remove unsupported warnings c flag
sed -i -e "s/^ABI_VERSION.*/ABI_VERSION := $_abiver/" \
-e "s/-Wold-style-declaration//g" \
Rules.mak
}
build() {
local _kh=
cd "$_builddir"
if [ -n "$SYSROOT" ]; then
_kh=KERNEL_HEADERS="$SYSROOT/include"
fi
cp "$_config" .config
make silentoldconfig
make -j1 pregen KERNEL_HEADERS="$SYSROOT"/usr/include \
CROSS="$CROSS" || return 1
make all KERNEL_HEADERS="$SYSROOT/usr/include" CROSS="$CROSS" || return 1
make utils CROSS="$CROSS" || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" KERNEL_HEADERS="$SYSROOT/usr/include" \
CROSS="$CROSS" install install_utils
install -Dm755 extra/scripts/getent "$pkgdir"/usr/bin/getent
# provided by linux-headers
rm -f "$pkgdir"/usr/include/scsi/scsi.h
}
dev() {
default_dev
replaces=uclibc
mkdir "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.so "$subpkgdir"/usr/lib/
}
utils() {
pkgdesc="uClibc utility programs"
replaces=uclibc
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/sbin
mv "$pkgdir"/sbin/* "$subpkgdir"/sbin/
mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/
}
md5sums="46e98672dc2a4309d9a7c65b4e626845 libc0.9.32-0.9.32_alpha0_git100507.tar.bz2
4d408f72142ce55a0754948cc9cfe447 compat-stack-guard.patch
826666b365f2d63a71d67eb76c94f7bc 0001-static-build-fix-internal-locking-weaks-to-get-pulle.patch
0800a489a738c7b1d8c3643cb9806926 0002-resolv-various-memory-corruption-and-off-by-one-fixe.patch
2f9739a980be24a842c57516155c7885 uclibc-libm-pic.patch
e2eb3bb00a0fe4d6f3d5b5c56b027bab uclibcconfig.x86
e2eb3bb00a0fe4d6f3d5b5c56b027bab uclibcconfig.i486"
|