lynx:use untrusted gcc machine code generator (moved to opt)
[nyanlinux.git] / builders / mudev-13aee00ee402b187841d77da3c484f195f61fe89 / builder.sh
blobb84361b6647915c5c8c72034d523edad638eebdb
1 src_name=mudev
2 mkdir /nyan/$src_name
4 git_commit=${pkg_name##*-}
5 slot=$git_commit
6 mkdir /nyan/$src_name/$slot
8 git_url0=
10 pkg_dir=$pkgs_dir_root/$pkg_name
11 rm -Rf $pkg_dir
12 src_dir=$src_dir_root/$src_name
13 cp -r $src_dir $pkg_dir
15 cd $pkg_dir
17 PATH_SAVED=$PATH
18 export PATH="\
19 /opt/toolchains/x64/elf/binutils-gcc/current/bin:\
20 $PATH\
23 if test x$git_commit != x; then
24 git checkout --force $git_commit
25 git reset --hard
28 build_dir=$builds_dir_root/$pkg_name
29 rm -Rf $build_dir
30 mkdir $build_dir
31 cd $build_dir
33 # We still configure the package in /nyan/mudev/$slot and this "make" script is way too complex.
34 # It needs pkgconf removal too.
35 # usb and pci database are currently shared with libpciaccess still required by Xorg.
36 $pkg_dir/make \
37 --prefix=/nyan/$src_name/$slot \
38 --usb-database=/share/hwdata/usb.ids \
39 --pci-database=/share/hwdata/pci.ids \
40 --enable-logging \
41 "--bin-cc=gcc -std=c99 -O2 -pipe -fPIC -c -isystem /nyan/glibc/current/include -isystem /nyan/linux-headers/current/include -static-libgcc" \
42 "--bin-ccld=gcc -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib -Wl,--as-needed -Wl,-s -Wl,-rpath-link,/nyan/glibc/current/lib -static-libgcc" \
43 "--libudev-cc=gcc -std=c99 -O2 -pipe -fPIC -c -isystem /nyan/glibc/current/include -isystem /nyan/linux-headers/current/include -static-libgcc" \
44 "--libudev-ccld=gcc -shared -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib -Wl,-s -Wl,-rpath-link,/nyan/glibc/current/lib -static-libgcc -Wl,--as-needed -Wl,-soname,libudev.so.0"
46 rm -Rf /nyan/$src_name/$slot
47 cp -r $build_dir/fake_root/* /
49 mkdir /nyan/$src_name/$slot/hwdata
50 cp -f $src_dir_root/pci.ids /nyan/$src_name/$slot/hwdata/pci.ids
51 cp -f $src_dir_root/usb.ids /nyan/$src_name/$slot/hwdata/usb.ids
53 export PATH=$PATH_SAVED
54 unset PATH_SAVED
55 rm -Rf $build_dir $pkg_dir