# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=kbuild pkgver=0.1.5_p2 _ver=${pkgver/_/-} pkgrel=0 pkgdesc="A makefile framework for writing simple makefiles for complex tasks" url="http://svn.netlabs.org/kbuild/wiki" arch="all" license="GPL-3" depends="" depends_dev="" makedepends="autoconf automake flex bison" install="" subpackages="$pkgname-doc" source="ftp://ftp.netlabs.org/pub/kbuild/kBuild-$_ver-src.tar.gz kbuild-0.1.5_p2-qa.patch lchmod.patch strlcpy.patch underlinking.patch sys_siglist.patch uclibc.patch" _builddir="$srcdir"/kBuild-$_ver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done cd "$_builddir"/src/kmk aclocal -I config && autoheader && autoconf && automake --add-missing \ || return 1 cd "$_builddir"/src/sed aclocal -I config && autoheader && autoconf && automake --add-missing \ || return 1 # the bootstrap process will create a symlink to the system shell, # which happens to be (/bin/sh) a symlink to /bin/busybox # and busybox will get confused since there are no applet named # kmk_ash. echo '#!/bin/sh' >"$srcdir"/sh echo 'exec /bin/busybox sh "$@"' >> "$srcdir"/sh chmod +x "$srcdir"/sh sed -i -e "s:/bin/sh:$srcdir/sh:" "$_builddir"/bootstrap.gmk } build() { cd "$_builddir" kBuild/env.sh --full make -f bootstrap.gmk AUTORECONF=true \ || return 1 } package() { cd "$_builddir" kBuild/env.sh kmk NIX_INSTALL_DIR=/usr PATH_INS="$pkgdir" install \ || return 1 } md5sums="5e4e2193aa6cb3f095af2f99bf90d01d kBuild-0.1.5-p2-src.tar.gz 79d4d445b28f0c50f2a7a8ca12bbed4b kbuild-0.1.5_p2-qa.patch b3dd26cc185c96658d9b554eef2f811c lchmod.patch 90cae3b53b4ec6fc5f1c336922083df0 strlcpy.patch ca09174d7c885fdea1e3c2dc580d80b3 underlinking.patch 234e03febb8eb35106ecf85682e9233a sys_siglist.patch 4bf9eead328a38059dadb56317e7aaa4 uclibc.patch"