wok-next annotate uclibc-cross-compiler-x86_64/receipt @ rev 20147
uclibc-cross-compiler-x86_64: receipt v2
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 01 13:32:31 2017 +0100 (2017-11-01) |
parents | a436a235f098 |
children | 85798f84958b |
rev | line source |
---|---|
pascal@20147 | 1 # SliTaz package receipt v2. |
pascal@11673 | 2 |
pascal@11673 | 3 PACKAGE="uclibc-cross-compiler-x86_64" |
pascal@11673 | 4 VERSION="prebuilt" |
pascal@11673 | 5 CATEGORY="development" |
pascal@11673 | 6 SHORT_DESC="Toolchain for uclibc/x86_64." |
pascal@11673 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@14781 | 8 LICENSE="GPL2" |
pascal@11673 | 9 SOURCE="cross-compiler-x86_64" |
pascal@11673 | 10 TARBALL="$SOURCE.tar.bz2" |
pascal@11673 | 11 WEB_SITE="http://impactlinux.com/aboriginal" |
pascal@11673 | 12 WGET_URL="$WEB_SITE/downloads/binaries/cross-compiler/$TARBALL" |
pascal@13033 | 13 TAGS="compiler C" |
pascal@11673 | 14 |
pascal@20147 | 15 SPLIT="uclibc-armv4eb uclibc-armv4l uclibc-armv4tl uclibc-armv5l uclibc-armv6l \ |
pascal@20147 | 16 uclibc-cross-compiler-armv4eb uclibc-cross-compiler-armv4l \ |
pascal@20147 | 17 uclibc-cross-compiler-armv4tl uclibc-cross-compiler-armv5l \ |
pascal@20147 | 18 uclibc-cross-compiler-armv6l uclibc-cross-compiler-i486 \ |
pascal@20147 | 19 uclibc-cross-compiler-mips uclibc-cross-compiler-mips64 \ |
pascal@20147 | 20 uclibc-cross-compiler-mipsel uclibc-cross-compiler-powerpc \ |
pascal@20147 | 21 uclibc-cross-compiler-sh4 uclibc-cross-compiler-sparc \ |
pascal@20147 | 22 uclibc-cross-compiler-x86_64 uclibc-i486 uclibc-mips uclibc-mips64 \ |
pascal@20147 | 23 uclibc-mipsel uclibc-powerpc uclibc-sh4 uclibc-sparc uclibc-x86_64" |
pascal@20147 | 24 |
pascal@20147 | 25 # Rules to configure and make the package. |
pascal@20147 | 26 compile_rules() |
pascal@20147 | 27 { |
pascal@20147 | 28 ln -s . uclibc-cross-compiler-x86_64 |
pascal@20147 | 29 for i in $(echo " $SPLIT" | sed -e 's/uclibc-cross-compiler-//g' \ |
pascal@20147 | 30 -e 's/ uclibc-[^ ]*//g' -e 's/ x86_64//'); do |
pascal@20147 | 31 [ -s $SOURCES_REPOSITORY/${TARBALL/x86_64/$i} ] || |
pascal@20147 | 32 wget -P $SOURCES_REPOSITORY ${WGET_URL/x86_64/$i} |
pascal@20147 | 33 mkdir uclibc-cross-compiler-$i |
pascal@20147 | 34 busybox tar xf $SOURCES_REPOSITORY/${TARBALL/x86_64/$i} \ |
pascal@20147 | 35 -C uclibc-cross-compiler-$i |
pascal@20147 | 36 done |
pascal@20147 | 37 } |
pascal@11825 | 38 |
pascal@11673 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@11673 | 40 genpkg_rules() |
pascal@11673 | 41 { |
pascal@20147 | 42 case $PACKAGE in |
pascal@20147 | 43 uclibc-cross-compiler-*) |
pascal@20147 | 44 CAT="development|Toolchain for uclibc/${PACKAGE##*-}." |
pascal@20147 | 45 SUGGESTED="uclibc-${PACKAGE##*-}" |
pascal@20147 | 46 mkdir -p $fs/usr/share $fs/usr/bin |
pascal@20147 | 47 cp -a $src/$PACKAGE $fs/usr/share/$PACKAGE |
pascal@20147 | 48 for i in $(cd $src/$PACKAGE ; ls bin/${PACKAGE##*-}-*); do |
pascal@20147 | 49 file=$(basename $i) |
pascal@20147 | 50 ln -s ../share/$PACKAGE/bin/$file $fs/usr/bin/uclibc-$file |
pascal@20147 | 51 done |
pascal@20147 | 52 ;; |
pascal@20147 | 53 uclibc-*) |
pascal@20147 | 54 TAZBB_NO_INSTALL="because this is not the right target !" |
pascal@20147 | 55 CAT="base-system|UcLibc ${PACKAGE##*-} libraries." |
pascal@20147 | 56 mkdir -p $fs/lib |
pascal@20147 | 57 cp -a $src/${PACKAGE/cross-compiler-/}/lib/*.so* $fs/lib |
pascal@20147 | 58 ;; |
pascal@20147 | 59 esac |
pascal@20147 | 60 } |
pascal@20147 | 61 |
pascal@20147 | 62 # Pre and post install commands for Tazpkg. |
pascal@20147 | 63 post_install_uclibc_i486() |
pascal@20147 | 64 { |
pascal@20147 | 65 echo chroot "$1/" /usr/bin/uclibc-i486-ldconfig |
pascal@20147 | 66 } |
pascal@20147 | 67 |
pascal@20147 | 68 pre_remove_uclibc_i486() |
pascal@20147 | 69 { |
pascal@20147 | 70 for i in /lib/ld-uClibc.so*; do |
pascal@20147 | 71 case "$(readlink $i)" in |
pascal@20147 | 72 *usr/share/uclibc_i486/lib/*) rm -f $i ;; |
pascal@20147 | 73 esac |
pascal@11673 | 74 done |
pascal@11673 | 75 } |