-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgimp
65 lines (56 loc) · 3.19 KB
/
gimp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
APP=gimp
mkdir tmp;
cd tmp;
# DOWNLOADING THE DEPENDENCIES
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-i686.AppImage -O appimagetool
wget https://github.com/ivan-hc/pkg2appimage-32bit/releases/download/continuous/pkg2appimage-i386.AppImage -O pkg2appimage
chmod a+x ./appimagetool ./pkg2appimage
# CREATING THE APPIMAGE
DEBIANBRANCH=stable
GIMP=$(echo $(wget -q https://packages.debian.org/stable/i386/gimp/download -O - | grep "gimp_" | tail -1 | grep -o -P '(?<=<kbd>).*(?=</kbd>)'))
GIMP_DATA=$(echo $(wget -q https://packages.debian.org/stable/all/gimp-data/download -O - | grep "gimp-data_" | tail -1 | grep -o -P '(?<=<kbd>).*(?=</kbd>)'))
libgimp=$(echo $(wget -q https://packages.debian.org/stable/gimp -O - | grep libgimp | head -1 | grep -o -P '(?<=">).*(?=</a>)'))
LIBGIMP=$(echo $(wget -q https://packages.debian.org/stable/i386/$libgimp/download -O - | grep "$libgimp""_" | tail -1 | grep -o -P '(?<=<kbd>).*(?=</kbd>)'))
VERSION=$(echo $(wget -q https://packages.debian.org/stable/i386/gimp/download -O - | grep ".deb" | head -1 | grep -o -P '(?<=gimp_).*(?=_i386)'))
echo "app: gimp
binpatch: true
ingredients:
dist: $DEBIANBRANCH
script:
- wget http://ftp.debian.org/debian/pool/main/g/gimp/$GIMP
- wget http://ftp.debian.org/debian/pool/main/g/gimp/$GIMP_DATA
- wget http://ftp.debian.org/debian/pool/main/g/gimp/$LIBGIMP
sources:
- deb http://ftp.debian.org/debian/ $DEBIANBRANCH main" >> recipe.yml
ARCH=i386 ./pkg2appimage ./recipe.yml;
# CUSTOMIZE THE APPRUN
rm -R -f ./$APP/$APP.AppDir/AppRun
cat >> ./$APP/$APP.AppDir/AppRun << 'EOF'
#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
export UNION_PRELOAD="${HERE}"
export PATH="${HERE}"/usr/bin/:"${HERE}"/usr/sbin/:"${HERE}"/usr/games/:"${HERE}"/bin/:"${HERE}"/sbin/:"${PATH}"
export LD_LIBRARY_PATH="${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/usr/lib32/:"${HERE}"/usr/lib64/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${HERE}"/lib32/:"${HERE}"/lib64/:"${LD_LIBRARY_PATH}"
export PKG_CONFIG_PATH="${HERE}"/usr/share/pkgconfig:$PKG_CONFIG_PATH
export GIMP2_LOCALEDIR="${HERE}"/usr/share/locale/
export GIMP2_DATADIR="${HERE}"/usr/share/gimp/2.0/
export GIMP2_SYSCONFDIR="${HERE}"/etc/gimp/2.0/
export GIMP2_PLUGINDIR="${HERE}"/usr/lib/gimp/2.0/
export GIMP3_LOCALEDIR="${HERE}"/usr/share/locale/
export GIMP3_DATADIR="${HERE}"/usr/share/gimp/2.99/
export GIMP3_SYSCONFDIR="${HERE}"/etc/gimp/2.99/
export GIMP3_PLUGINDIR="${HERE}"/usr/lib/gimp/2.99/
export GEGL_PATH="${HERE}"/usr/lib/x86_64-linux-gnu/gegl-0.4/
export BABL_PATH="${HERE}"/usr/lib/x86_64-linux-gnu/babl-0.1/
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's| %.||g')
exec ${HERE}/usr/bin/${EXEC} "$@"
EOF
sed -i 's/x86_64/i386/g' ./$APP/$APP.AppDir/AppRun
sed -i 's/64/x32/g' ./$APP/$APP.AppDir/AppRun
chmod a+x ./$APP/$APP.AppDir/AppRun
# ..IMPORT THE DESKTOP FILE TO THE ROOT OF THE APPDIR...
cp ./$APP/$APP.AppDir/usr/share/applications/*$APP* ./$APP/$APP.AppDir/$APP.desktop
ARCH=i386 ./appimagetool -n ./$APP/$APP.AppDir
cd ..
mv ./tmp/*.AppImage ./GNU-Image-Manipulation-Program_"$VERSION"-i386.AppImage