mirror of
https://github.com/libretro/libretro-super
synced 2025-01-03 23:37:11 +00:00
115 lines
2.7 KiB
Plaintext
115 lines
2.7 KiB
Plaintext
# In this example, we use a trusty deb
|
|
|
|
APP=RetroArch
|
|
LOWERAPP=${APP,,}
|
|
|
|
mkdir -p ./$APP/$APP.AppDir/usr/lib
|
|
|
|
cd ./$APP/
|
|
|
|
. ./functions.sh
|
|
|
|
generate_status
|
|
|
|
# Needs a specific version (FIXME)
|
|
sed -i -e 's|libegl1-mesa|xxxlibegl1-mesa|g' status
|
|
cat > status <<\EOF
|
|
Package: libegl-mesa
|
|
Status: install ok installed
|
|
Architecture: all
|
|
Version: 9:999.999.999
|
|
|
|
Package: libegl1-mesa
|
|
Status: install ok installed
|
|
Architecture: all
|
|
Version: 9:999.999.999
|
|
|
|
Package: libwayland-egl1-mesa
|
|
Status: install ok installed
|
|
Architecture: all
|
|
Version: 9:999.999.999
|
|
|
|
Package: libgl1-mesa-glx
|
|
Status: install ok installed
|
|
Architecture: all
|
|
Version: 9:999.999.999
|
|
|
|
Package: libgl1-mesa-dri
|
|
Status: install ok installed
|
|
Architecture: all
|
|
Version: 9:999.999.999
|
|
|
|
Package: debconf
|
|
Status: install ok installed
|
|
Architecture: all
|
|
Version: 9:999.999.999
|
|
|
|
Package: libc6
|
|
Status: install ok installed
|
|
Architecture: all
|
|
Version: 9:999.999.999
|
|
|
|
Package: libstdc++6
|
|
Status: install ok installed
|
|
Architecture: all
|
|
Version: 9:999.999.999
|
|
|
|
Package: libgcc1
|
|
Status: install ok installed
|
|
Architecture: all
|
|
Version: 9:999.999.999
|
|
|
|
EOF
|
|
|
|
echo "deb http://archive.ubuntu.com/ubuntu/ trusty main universe multiverse
|
|
deb http://ppa.launchpad.net/libretro/testing/ubuntu trusty main
|
|
" > sources.list
|
|
apt-get $OPTIONS update
|
|
URLS=$(apt-get $OPTIONS -y install --print-uris $LOWERAPP | cut -d "'" -f 2 | grep -e "^http")
|
|
wget -c $URLS
|
|
|
|
cd ./$APP.AppDir/
|
|
|
|
find ../*.deb -exec dpkg -x {} . \; || true
|
|
|
|
get_desktop
|
|
# get_icon
|
|
# Dear upstream developers, this is a nonstandard location for an app icon;
|
|
# please consider using a standard location instead
|
|
cp ./usr/share/libretro/assets/xmb/retroactive/png/retroarch.png .
|
|
get_apprun
|
|
|
|
mv ./usr/lib/x86_64-linux-gnu/pulseaudio/* ./usr/lib/x86_64-linux-gnu/ || true
|
|
|
|
# Workaround for:
|
|
# /usr/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1: error: symbol lookup error:
|
|
# undefined symbol: drmGetNodeTypeFromFd (fatal)
|
|
# libGL error: unable to load driver: swrast_dri.so
|
|
# libGL error: failed to load driver: swrast
|
|
rm -rf ./usr/lib/x86_64-linux-gnu/libdrm.* || true
|
|
|
|
# patch_usr
|
|
# Patching only the executable files seems not to be enough for some apps
|
|
find usr/ -type f -exec sed -i -e "s|/usr|././|g" {} \;
|
|
|
|
# Patch to make it load usr/share/retroarch from inside the AppDir
|
|
mv etc e
|
|
sed -i -e 's|/etc|../e|g' ./usr/bin/retroarch
|
|
sed -i -e 's|/usr|././|g' e/retroarch.cfg
|
|
|
|
# Workaround for:
|
|
# Two icons in dock
|
|
# https://github.com/probonopd/AppImageKit/issues/260
|
|
echo "StartupWMClass=retroarch" >> retroarch.desktop
|
|
|
|
VERSION=$(find ../*.deb -name $LOWERAPP"_*" | head -n 1 | cut -d "~" -f 1 | cut -d "_" -f 2 | cut -d "-" -f 1 | sed -e 's|1%3a||g' )
|
|
|
|
echo $VERSION
|
|
|
|
get_desktopintegration $LOWERAPP
|
|
|
|
# Go out of AppImage
|
|
cd ..
|
|
|
|
generate_type2_appimage
|