diff options
author | Lukc <lukc@upyum.com> | 2011-01-16 15:01:39 +0100 |
---|---|---|
committer | Lukc <lukc@upyum.com> | 2011-01-16 15:01:39 +0100 |
commit | 74d33e071a6b11a708b76cfafbd563fb2fc24f1e (patch) | |
tree | 0558531fc5f9ea2695def95ab2ceb551bb0d4176 /uclibc/Pkgfile | |
parent | c83bc5a370317a5f5d06bbad542c542a9cbc20a4 (diff) | |
download | base-74d33e071a6b11a708b76cfafbd563fb2fc24f1e.tar.gz base-74d33e071a6b11a708b76cfafbd563fb2fc24f1e.tar.bz2 base-74d33e071a6b11a708b76cfafbd563fb2fc24f1e.tar.xz base-74d33e071a6b11a708b76cfafbd563fb2fc24f1e.zip |
Recette de uClibc bricolée. \o/
(bon, je l’ai cross-compilée, quoi \o/)
Diffstat (limited to 'uclibc/Pkgfile')
-rw-r--r-- | uclibc/Pkgfile | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/uclibc/Pkgfile b/uclibc/Pkgfile index 6eb6f00..e96e1dc 100644 --- a/uclibc/Pkgfile +++ b/uclibc/Pkgfile @@ -25,9 +25,28 @@ grep -v '<' | sort -k3 | tail -n 1" license=LGPL function build { + if [[ "$CROSS" = yes ]]; then + UCLIBC_CROSS=${CHOST}- + fi + case $CHOST in + i?86-*) + if [[ -z "$UCLIBC_CPU" ]]; then + UCLIBC_CPU=${CHOST%%-*} + UCLIBC_CPU=${UCLIBC_CPU#i} + fi + ;; + esac cd ${name/c/C}-$version - gmake CROSS= defconfig - gmake CROSS= DESTDIR=$PKG install + gmake CROSS=${UCLIBC_CROSS} defconfig + # XXX: Largement au dessus de 80 caractères et dépend de gsed. + info "Configuring for $UCLIBC_CPU." + if [[ -n "$UCLIBC_CPU" ]]; then + sed -i -e "s/^CONFIG_GENERIC_386=y$/# CONFIG_GENERIC_386 is not set/;s/# CONFIG_$UCLIBC_CPU is not set/CONFIG_$UCLIBC_CPU=y/" .config + fi + # Installation dans un $prefix… standard ? + sed -i -e "s:^RUNTIME_PREFIX=.*:RUNTIME_PREFIX=\"$prefix\":" .config + sed -i -e "s:^DEVEL_PREFIX=.*:DEVEL_PREFIX=\"$prefix\":" .config + gmake CROSS=${UCLIBC_CROSS} DESTDIR=$PKG install } function check { |