glibc is lost
[nyanlinux.git] / builders / alsa-lib-0 / builder-target.sh
blob7f9b100885709eabfbef234a82310cd67a63e64e
1 src_name=alsa-lib
2 version=1.1.6
3 archive_name=$src_name-$version.tar.bz2
4 url0=ftp://ftp.alsa-project.org/pub/lib/$archive_name
6 src_dir=$src_dir_root/$src_name-$version
7 cd $src_dir_root
8 rm -Rf $src_name-$version
9 tar xf $archive_name
11 build_dir=$builds_dir_root/$pkg_name-$version-$target_gnu_triple
12 rm -Rf $build_dir
13 mkdir -p $build_dir
14 cd $build_dir
16 OLD_PATH=$PATH
17 export PATH=$cross_toolchain_dir_root/bin:$PATH
19 # at link time, the only way to tell gnu ld where to look for shared lib dependencies is to pass the -rpath-link option
20 export "CC=$target_gnu_triple-gcc -B$target_sysroot/nyan/glibc/current/lib -L$target_sysroot/nyan/glibc/current/lib -Wl,-rpath-link,$target_sysroot/nyan/glibc/current/lib -static-libgcc"
21 export 'CFLAGS=-O2 -pipe -fPIC'
22 $src_dir/configure \
23 --build=$build_gnu_triple \
24 --host=$target_gnu_triple \
25 --prefix=/nyan/alsa-lib/0 \
26 --disable-static \
27 --enable-shared \
28 --disable-old-symbols \
29 --disable-python \
30 --with-versioned \
31 --without-debug \
32 --without-softfloat
33 unset CFLAGS
34 unset CC
36 make
37 make install DESTDIR=$target_sysroot
39 # it wants an "audio" entry in /etc/group with a GID of 116
40 if ! egrep -q '^audio:' $target_sysroot/etc/group; then
41 echo 'audio::116:' >>$target_sysroot/etc/group
44 # cleanup and tidying
45 find $target_sysroot/nyan/$src_name/0 -type f -name '*.la' | xargs rm -f
46 find $target_sysroot/nyan/$src_name/0 -type f | while read f; do if file $f | egrep 'ELF.+(shared|executable)' >/dev/null; then $target_gnu_triple-strip -s $f; fi; done
48 rm -Rf $build_dir $src_dir
49 export PATH=$OLD_PATH