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