aboutsummaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/libc0.9.32/APKBUILD')
-rw-r--r--main/libc0.9.32/APKBUILD91
1 files changed, 91 insertions, 0 deletions
diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD
new file mode 100644
index 0000000000..4ec21af227
--- /dev/null
+++ b/main/libc0.9.32/APKBUILD
@@ -0,0 +1,91 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+_abiver=0.9.32
+pkgname=libc$_abiver
+_gitver=100427
+pkgver=${_abiver}_alpha0_git$_gitver
+pkgrel=0
+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
+
+source="
+ http://git.uclibc.org/uClibc/snapshot/master.tar.bz2
+ compat-stack-guard.patch
+ uclibcconfig.x86
+ uclibcconfig.i486
+ "
+
+_config="$srcdir"/uclibcconfig.${ARCH:-x86}
+_builddir="$srcdir"/master
+
+snapshot() {
+ local _date=$(date +%y%m%d%H%M)
+ rm -f "$SRCDEST"/master.tar.bz2
+ 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
+ sleep 1
+ make silentoldconfig
+ 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 "$_p"/usr/bin/getent
+ # provided by linux-headers
+ rm -f "$_p"/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="1189f8f739b1977a86b7afa8637e6827 master.tar.bz2
+4d408f72142ce55a0754948cc9cfe447 compat-stack-guard.patch
+791e2fc050cab523ce1c907ca39a2486 uclibcconfig.x86
+791e2fc050cab523ce1c907ca39a2486 uclibcconfig.i486"