wip update
[nyanlinux.git] / builders / mesa-gl / builder.sh
blobe993a5badd68a32ec6125f1350dbd5e441b286e8
1 src_name=mesa
2 git_url0=git://anongit.freedesktop.org/mesa/$src_name
4 pkg_dir=/run/pkgs/$pkg_name
5 src_dir=$src_dir_root/$src_name
6 rm -Rf $pkg_dir
7 mkdir -p /run/pkgs
8 cp -Hr $src_dir $pkg_dir
10 #-------------------------------------------------------------------------------
12 cd $pkg_dir
14 PATH_SAVED=$PATH
15 export PATH="\
16 /nyan/git/current/bin:\
17 $PATH\
20 if test x$git_commit != x; then
21 git checkout --force $git_commit
22 git reset --hard
25 # copy the canonical lean build scripts
26 cp -r $nyan_root/builders/$pkg_name/contrib .
28 #-------------------------------------------------------------------------------
30 build_dir=/run/builds/$pkg_name
31 rm -Rf $build_dir
32 mkdir -p $build_dir
33 cd $build_dir
35 # create the local configuration file
36 cat >$build_dir/local_conf.sh <<EOF
37 sysconfdir=/nyan/mesa-gl/$slot/etc
39 datadir_runtime=/usr/share
40 datadir_store=/nyan/mesa-gl/$slot/share
41 datadir_store_virtual=/nyan/mesa-gl/current/share
43 libdir=/usr/lib
44 libdir_store=/nyan/mesa-gl/$slot/lib
45 libdir_store_virtual=/nyan/mesa-gl/current/lib
47 incdir_store=/nyan/mesa-gl/$slot/include
48 incdir_store_virtual=/nyan/mesa-gl/current/include
50 dri_driver_store_dir=/nyan/mesa-gl/$slot/lib/dri
51 dri_driver_store_virtual_dir=/nyan/mesa-gl/current/lib/dri
52 EOF
54 #-------------------------------------------------------------------------------
56 $pkg_dir/contrib/x86_64_linux_glibc_amdgpu.sh
58 #-------------------------------------------------------------------------------
60 rm -Rf /nyan/mesa-gl/$slot
61 mkdir -p \
62 /usr/lib/dri \
63 /usr/share/glvnd/egl_vendor.d \
64 /usr/share/drirc.d \
65 /nyan/mesa-gl/$slot
67 cp -Prf $build_dir/install_root/nyan/mesa-gl/$slot/* /nyan/mesa-gl/$slot
69 cp -Pf \
70 $build_dir/install_root/usr/lib/libEGL_mesa.so.0 \
71 $build_dir/install_root/usr/lib/libGLX_mesa.so.0 \
72 $build_dir/install_root/usr/lib/libgbm.so.1 \
73 $build_dir/install_root/usr/lib/libglapi.so.0 \
74 /usr/lib
75 cp -Pf $build_dir/install_root/usr/lib/dri/radeonsi_dri.so \
76 /usr/lib/dri
77 cp -Pf $build_dir/install_root/usr/share/drirc.d/00-mesa-defaults.conf \
78 /usr/share/drirc.d
79 cp -Pf $build_dir/install_root/usr/share/glvnd/egl_vendor.d/50_mesa.json \
80 /usr/share/glvnd/egl_vendor.d/50_mesa.json
82 export PATH=$PATH_SAVED
83 unset PATH_SAVED
84 rm -Rf $build_dir $pkg_dir