3 archive_name
=$src_name-$version.
tar.xz
4 url0
=http
://ftpmirror.gnu.org
/$src_name/$archive_name
8 # linux-gnu counts as 1, gnu as gnu libc, or glibc, could become musl
9 target_triple
=$target_arch-unknown-linux-gnu
11 pkg_dir
=$pkgs_dir_root/$src_name-$version
13 mkdir
-p $pkgs_dir_root
14 cp -f $src_dir_root/$archive_name $pkgs_dir_root
18 build_dir
=$builds_dir_root/$pkg_name
23 export "CC=gcc -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib -Wl,-rpath-link,/nyan/glibc/current/lib -static-libgcc"
24 export 'CFLAGS=-O2 -pipe -fPIC'
26 --target=$target_triple \
27 --prefix=/nyan
/$target_arch-$src_name/$slot \
40 rm -Rf /nyan
/$target_arch-$src_name/$slot/share
/info
41 rm -Rf /nyan
/$target_arch-$src_name/$slot/share
/man
42 rmdir -p /nyan
/$target_arch-$src_name/$slot/share || true
43 find /nyan
/$target_arch-$src_name/$slot -type f
-name '*.la' |
xargs rm -f
44 find /nyan
/$target_arch-$src_name/$slot -type f |
while IFS
= read -r f
; do if file $f |
egrep 'ELF.+(shared|executable)' >/dev
/null
; then strip
-s $f; fi; done
46 rm -Rf $build_dir $pkg_dir