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