# $Id: PKGBUILD 22942 2008-12-30 00:10:14Z thomas $ # Maintainer: Aaron Griffin # Maintainer: Thomas Baechler ### ### NOTE: Do not build this package with anything except gcc - using ccache ### forces others to use it as well as it becomes hardcoded in the klibc ### script. ### pkgname=klibc pkgver=1.5.15 _klibcbranch=Testing #Stable/Testing _kver=2.6.28-ARCH pkgrel=1 pkgdesc="A minimal libc made for early-userspace" arch=(i686 x86_64) url="http://www.kernel.org/pub/linux/libs/klibc/" license=('BSD') groups=('base') options=(!ccache !strip) source=(http://www.kernel.org/pub/linux/libs/klibc/${_klibcbranch}/${pkgname}-${pkgver}.tar.gz klibc-compile-shared-by-default.patch klibc-Kbuild.patch klibc-x86_64-fix-io.h.patch klibc-fix-2.6.28-includes.patch klibc-fix-ext4-detection.patch) md5sums=('b5527be46f24779884557b11888c8075' 'c263a7c3fd290fcc84a4e230d456d022' 'ff5b113024256de31af59c2f1a966516' 'fcee75cfaa65638b07f9cc4a7719fa29' '85e39751debc304119eb481d6bc26d59' '3884d68f83e63a7e83301d55adbea40c') build() { cd $startdir/src/$pkgname-$pkgver #INI_DEBUG causes ipconfig to fail within kinit sed -i "/#define INI_DEBUG/d" usr/kinit/kinit.h || return 1 ln -sf /usr/src/linux-${_kver} linux # compile binaries shared by default patch -p1 -i ../klibc-compile-shared-by-default.patch || return 1 # don't build gzip, cpio, kill, build shared binaries for kinit and sh patch -p1 -i ../klibc-Kbuild.patch || return 1 # fix errors in io.h header patch -p1 -i ../klibc-x86_64-fix-io.h.patch || return 1 # fix includes for 2.6.28 build patch -p1 -i ../klibc-fix-2.6.28-includes.patch || return 1 # fix ext4 detection # patch -p1 -i ../klibc-fix-ext4-detection.patch || return 1 make EXTRA_KLIBCFLAGS='' || return 1 make INSTALLROOT=$startdir/pkg install || return 1 ln -sf asm-x86 $startdir/pkg/usr/lib/klibc/include/asm cp -a linux/arch/x86/include/asm/* $startdir/pkg/usr/lib/klibc/include/asm provides[${#provides[@]}]="$(basename $startdir/pkg/lib/klibc-*.so .so)" export provides }