Simplify snap build using the new desktop-launcher parts
This commit is contained in:
parent
e50a4ed32b
commit
90b9c826ac
|
@ -6,104 +6,10 @@ export JAVA_HOME=$SNAP/oracle-java
|
||||||
export PATH=$JAVA_HOME/jre/bin:$PATH
|
export PATH=$JAVA_HOME/jre/bin:$PATH
|
||||||
|
|
||||||
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$SNAP_ARCH/jli:$JAVA_HOME/jre/lib/$SNAP_ARCH:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$SNAP_ARCH/jli:$JAVA_HOME/jre/lib/$SNAP_ARCH:$LD_LIBRARY_PATH
|
||||||
export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/gtk-2.0/2.10.0/engines:$SNAP/usr/lib/$ARCH/gtk-2.0/modules:$SNAP/usr/lib/$ARCH/pulseaudio:$LD_LIBRARY_PATH
|
|
||||||
export LD_LIBRARY_PATH=$SNAP/filebot/lib/$SNAP_ARCH:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$SNAP/filebot/lib/$SNAP_ARCH:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
export GDK_PIXBUF_MODULEDIR=$SNAP/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0
|
|
||||||
export GDK_PIXBUF_MODULE_FILE=$SNAP/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
|
|
||||||
|
|
||||||
export GTK2_RC_FILES=$SNAP/usr/share/themes/Ambiance/gtk-2.0/gtkrc
|
|
||||||
export GTK_THEME=$SNAP/usr/share/themes/Ambiance/gtk-3.0/gtk.css
|
|
||||||
|
|
||||||
export GTK_PATH=$SNAP/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0
|
|
||||||
export GTK_MODULES=
|
|
||||||
export GTK2_MODULES=
|
|
||||||
|
|
||||||
export XKB_CONFIG_ROOT=$SNAP/usr/share/X11/xkb
|
|
||||||
|
|
||||||
export XDG_CONFIG_DIRS=$SNAP/usr/xdg:$SNAP/etc/xdg:$XDG_CONFIG_DIRS
|
|
||||||
export XDG_DATA_DIRS=$SNAP/usr/share:$SNAP_USER_DATA:$XDG_DATA_DIRS
|
|
||||||
|
|
||||||
export FONTCONFIG_PATH=$SNAP/etc/fonts/config.d
|
|
||||||
export FONTCONFIG_FILE=$SNAP/etc/fonts/fonts.conf
|
|
||||||
|
|
||||||
export LIBGL_DRIVERS_PATH=$SNAP/usr/lib/$ARCH/dri
|
|
||||||
|
|
||||||
|
|
||||||
# export JAVA_TOOL_OPTIONS=-javaagent:$SNAP/usr/share/java/jayatanaag.jar
|
# export JAVA_TOOL_OPTIONS=-javaagent:$SNAP/usr/share/java/jayatanaag.jar
|
||||||
# export JAVA_OPTS=-Dsun.java2d.opengl=True
|
# export JAVA_OPTS=-Dsun.java2d.xrender=True
|
||||||
export JAVA_OPTS=-Dsun.java2d.xrender=True
|
|
||||||
|
|
||||||
|
|
||||||
# Set XDG_DATA_HOME to local path, dependent on snap version
|
|
||||||
export XDG_DATA_HOME=$SNAP_USER_DATA/XDG/data-$SNAP_VERSION
|
|
||||||
export XDG_DATA_DIRS=$XDG_DATA_HOME:$XDG_DATA_DIRS
|
|
||||||
mkdir -p $XDG_DATA_HOME
|
|
||||||
|
|
||||||
# Set cache folder to local path, dependent on snap version
|
|
||||||
export XDG_CACHE_HOME=$SNAP_USER_DATA/XDG/cache-$SNAP_VERSION
|
|
||||||
mkdir -p $XDG_CACHE_HOME
|
|
||||||
|
|
||||||
# Not good, needed for fontconfig and themes
|
|
||||||
ln -sf $SNAP/usr/share/{fonts,themes} $XDG_DATA_HOME
|
|
||||||
|
|
||||||
# Build mime.cache
|
|
||||||
if [ ! -d $XDG_DATA_HOME/mime ]; then
|
|
||||||
cp -r $SNAP/usr/share/mime $XDG_DATA_HOME
|
|
||||||
$SNAP/usr/bin/update-mime-database $XDG_DATA_HOME/mime
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup GDK pixbuf loaders
|
|
||||||
export GDK_PIXBUF_MODULE_FILE=$XDG_CACHE_HOME/gdk-pixbuf-loaders.cache
|
|
||||||
export GDK_PIXBUF_MODULEDIR=$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/2.10.0/loaders
|
|
||||||
|
|
||||||
if [ ! -e $GDK_PIXBUF_MODULE_FILE ]; then
|
|
||||||
$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders > $GDK_PIXBUF_MODULE_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Gio modules and cache
|
|
||||||
export GIO_MODULE_DIR=$XDG_CACHE_HOME/gio-modules
|
|
||||||
|
|
||||||
if [ ! -d $GIO_MODULE_DIR ]; then
|
|
||||||
mkdir -p $GIO_MODULE_DIR
|
|
||||||
ln -sf $SNAP/usr/lib/$ARCH/gio/modules/*.so $GIO_MODULE_DIR
|
|
||||||
$SNAP/usr/lib/$ARCH/glib-2.0/gio-querymodules $GIO_MODULE_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Keep an array of data dirs, for looping through them
|
|
||||||
IFS=':' read -r -a data_dirs_array <<< "$XDG_DATA_DIRS"
|
|
||||||
|
|
||||||
# Setup compiled gsettings schema
|
|
||||||
GS_SCHEMA_DIR=$XDG_DATA_HOME/glib-2.0/schemas
|
|
||||||
|
|
||||||
if [ ! -d $GS_SCHEMA_DIR ]; then
|
|
||||||
mkdir -p $GS_SCHEMA_DIR
|
|
||||||
for d in "${data_dirs_array[@]}"; do
|
|
||||||
if [ -d "$d/glib-2.0/schemas" ]; then
|
|
||||||
# hack for empty system schemas dir
|
|
||||||
if [ "$d" != "/usr/share/" ]; then
|
|
||||||
ln -sf $d/glib-2.0/schemas/* $GS_SCHEMA_DIR
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
$SNAP/usr/lib/$ARCH/glib-2.0/glib-compile-schemas $GS_SCHEMA_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Icon themes cache
|
|
||||||
if [ ! -d $XDG_DATA_HOME/icons ]; then
|
|
||||||
mkdir -p $XDG_DATA_HOME/icons
|
|
||||||
for d in "${data_dirs_array[@]}"; do
|
|
||||||
for i in $d/icons/*; do
|
|
||||||
if [ -d "$i" ]; then
|
|
||||||
theme_dir=$XDG_DATA_HOME/icons/$(basename "$i")
|
|
||||||
mkdir -p "$theme_dir"
|
|
||||||
ln -sf $i/* "$theme_dir"
|
|
||||||
$SNAP/usr/sbin/update-icon-caches "$theme_dir"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
export APP_ROOT="$SNAP/filebot"
|
export APP_ROOT="$SNAP/filebot"
|
||||||
export APP_DATA="$SNAP_USER_DATA/data"
|
export APP_DATA="$SNAP_USER_DATA/data"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: filebot
|
name: filebot
|
||||||
version: 4.7~snap1
|
version: 4.7~snap2
|
||||||
summary: The ultimate TV and Movie Renamer / Subtitle Downloader
|
summary: The ultimate TV and Movie Renamer / Subtitle Downloader
|
||||||
description: FileBot is the ultimate tool for renaming your movies, tv shows or anime and even downloading subtitles. It's smart, streamlined for simplicity and just works. Putting the super-efficient UI aside, it's also got a full-featured command-line interface and scripting engine for all sorts of automation. Anything is possible.
|
description: FileBot is the ultimate tool for renaming your movies, tv shows or anime and even downloading subtitles. It's smart, streamlined for simplicity and just works. Putting the super-efficient UI aside, it's also got a full-featured command-line interface and scripting engine for all sorts of automation. Anything is possible.
|
||||||
|
|
||||||
|
@ -9,34 +9,21 @@ architectures: [amd64]
|
||||||
|
|
||||||
apps:
|
apps:
|
||||||
filebot:
|
filebot:
|
||||||
command: bin/filebot
|
command: desktop-launch $SNAP/filebot/filebot.sh
|
||||||
plugs: [home, network, network-bind, unity7, x11, opengl, pulseaudio]
|
plugs: [unity7, opengl, gsettings, home, x11, network, network-bind, pulseaudio]
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
filebot:
|
filebot:
|
||||||
plugin: copy
|
plugin: copy
|
||||||
files:
|
files:
|
||||||
filebot.sh: bin/filebot
|
filebot.sh: filebot/filebot.sh
|
||||||
FileBot.jar: filebot/FileBot.jar
|
FileBot.jar: filebot/FileBot.jar
|
||||||
lib7-Zip-JBinding.so: filebot/lib/amd64/lib7-Zip-JBinding.so
|
lib7-Zip-JBinding.so: filebot/lib/amd64/lib7-Zip-JBinding.so
|
||||||
|
|
||||||
oracle-java:
|
oracle-java:
|
||||||
plugin: copy
|
plugin: copy
|
||||||
files:
|
files:
|
||||||
oracle-java: oracle-java
|
oracle-java: oracle-java
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
plugin: nil
|
plugin: nil
|
||||||
stage-packages:
|
stage-packages: [jayatana]
|
||||||
- libgl1-mesa-dri
|
after: [desktop/gtk2]
|
||||||
- fontconfig
|
|
||||||
- gtk2-engines-murrine
|
|
||||||
- light-themes
|
|
||||||
- libcanberra-gtk-module
|
|
||||||
- jayatana
|
|
||||||
- unity-gtk2-module
|
|
||||||
- overlay-scrollbar-gtk2
|
|
||||||
- libmediainfo0v5
|
|
||||||
- libchromaprint-tools
|
|
||||||
- libgdk-pixbuf2.0-0
|
|
||||||
- librsvg2-common
|
|
||||||
|
|
Loading…
Reference in New Issue