alsa:udpate and moved to simplified /usr/lib
[nyanlinux.git] / builders / alsa-lib-1.2.12 / builder.sh
blob776c25c9ed82623e432bb4bd750ee6bfdb4a1830
1 src_name=alsa-lib
2 mkdir /nyan/$src_name
4 version=${pkg_name##*-}
5 slot=$version
6 mkdir /nyan/$src_name/$version
8 archive_name=$src_name-$version.tar.bz2
9 url0=ftp://ftp.alsa-project.org/pub/lib/$archive_name
11 pkg_dir=$pkgs_dir_root/$src_name-$version
12 rm -Rf $pkg_dir
13 mkdir $pkgs_dir_root
14 cp $src_dir_root/$archive_name $pkgs_dir_root
15 cd $pkgs_dir_root
16 tar xf $archive_name
18 build_dir=$builds_dir_root/$pkg_name
19 rm -Rf $build_dir
20 mkdir $build_dir
21 cd $build_dir
23 PATH_SAVED=$PATH
24 export PATH="\
25 /nyan/make/current/bin:\
26 $PATH\
28 export AR=/opt/toolchains/x64/elf/binutils-gcc/current/bin/ar
29 export OBJDUMP=/opt/toolchains/x64/elf/binutils-gcc/current/bin/objdump
30 export "CC=/opt/toolchains/x64/elf/binutils-gcc/current/bin/gcc \
31 -isystem /nyan/linux-headers/current/include \
32 -isystem /nyan/glibc/current/include \
33 -B/nyan/glibc/current/lib \
34 -L/nyan/glibc/current/lib \
35 -static-libgcc \
36 -Wl,-s \
38 export 'CFLAGS=-O2 -pipe -fPIC -fpic'
39 $pkg_dir/configure \
40 --prefix=/usr \
41 --disable-static \
42 --enable-shared \
43 --disable-ucm \
44 --disable-topology \
45 --disable-old-symbols \
46 --disable-python \
47 --without-debug \
48 --without-softfloat
49 unset AR
50 unset OBJDUMP
51 unset CFLAGS
52 unset CC
54 make -j $threads_n
56 # install in a fake root
57 install_dir=$build_dir/nyan_install_root
58 mkdir -p $install_dir
59 make install DESTDIR=$install_dir
61 rm -Rf /nyan/$src_name/$slot/include
62 cp -r $install_dir/usr/include /nyan/$src_name/$slot/include
64 rm -Rf /nyan/$src_name/$slot/lib
65 mkdir /nyan/$src_name/$slot/lib
66 cp $install_dir/usr/lib/libasound.so.2.0.0 /nyan/$src_name/$slot/lib/libasound.so.2.0.0
67 ln -s libasound.so.2.0.0 /nyan/$src_name/$slot/lib/libasound.so
68 ln -s libasound.so.2.0.0 /nyan/$src_name/$slot/lib/libasound.so.2
70 rm -Rf /nyan/$src_name/$slot/share
71 mkdir /nyan/$src_name/$slot/share
72 cp -r $install_dir/usr/share/alsa /nyan/$src_name/$slot/share/alsa
74 export PATH=$PATH_SAVED
75 unset PATH_SAVED
76 rm -f $pkgs_dir_root/$archive_name
77 rm -Rf $build_dir $pkg_dir