#!/bin/bash CWD=$(dirname $(readlink -f $0)) NAME=fluxbox VERSION=1.3.5 cd / REBUILD=/tmp/$NAME-rebuild-$$ apt-get update >>$OUTPUT 2>&1 apt-get --yes build-dep $NAME >>$OUTPUT 2>&1 mkdir -p $REBUILD >>$OUTPUT 2>&1 cd $REBUILD apt-get source $NAME >>$OUTPUT 2>&1 cd $NAME-$VERSION cat $CWD/patches/fluxbox-slax.diff > debian/patches/fluxbox-slax.diff echo fluxbox-slax.diff >> debian/patches/series dpkg-buildpackage -us -uc >>$OUTPUT 2>&1 rm -Rf debian/$NAME/DEBIAN >>$OUTPUT 2>&1 rm -Rf debian/$NAME/usr/share/doc >>$OUTPUT 2>&1 rm -Rf debian/$NAME/usr/share/images >>$OUTPUT 2>&1 cp debian/$NAME/usr/bin/fluxbox /squashfs-root/usr/bin >>$OUTPUT 2>&1 # add xlunch from sources wget -O /tmp/xlunch.tar.gz https://github.com/Tomas-M/xlunch/archive/v4.5.3.tar.gz >>$OUTPUT 2>&1 cd /tmp tar -xf xlunch.tar.gz >>$OUTPUT 2>&1 cd xlunch-4.5.3 make >>$OUTPUT 2>&1 cp xlunch /squashfs-root/usr/bin >>$OUTPUT 2>&1 cp extra/gentriesquick /squashfs-root/usr/bin/xlunch_genquick >>$OUTPUT 2>&1 mkdir -p /squashfs-root/usr/share/icons/hicolor/48x48/apps/ >>$OUTPUT 2>&1 cp extra/ghost.png /squashfs-root/usr/share/icons/hicolor/48x48/apps/xlunch_ghost.png # add tray icon launcher wget -O /tmp/systrayiconlauncher.tar.gz https://github.com/Tomas-M/SystrayIconLauncher/archive/master.tar.gz >>$OUTPUT 2>&1 cd /tmp tar -xf systrayiconlauncher.tar.gz >>$OUTPUT 2>&1 cd SystrayIconLauncher-master apt-get install --yes libgtk2.0-dev >>$OUTPUT 2>&1 make >>$OUTPUT 2>&1 cp systrayicon /squashfs-root/usr/bin >>$OUTPUT 2>&1 # add gtkdialog wget -O /tmp/gtkdialog.tar.gz https://github.com/Tomas-M/GTKdialog/archive/master.tar.gz >>$OUTPUT 2>&1 cd /tmp tar -xf gtkdialog.tar.gz >>$OUTPUT 2>&1 cd GTKdialog-master make >>$OUTPUT 2>&1 cp gtkdialog /squashfs-root/usr/bin >>$OUTPUT 2>&1 # battery icon app cd /tmp wget https://github.com/valr/cbatticon/archive/1.6.7.tar.gz >>$OUTPUT 2>&1 tar -xf 1.6.7.tar.gz >>$OUTPUT 2>&1 cd cbatticon-1.6.7 cp -R /usr/include/glib-2.0/* /usr/include >>$OUTPUT 2>&1 cp -R /usr/include/gtk-2.0/* /usr/include >>$OUTPUT 2>&1 apt install --yes libnotify-dev >>$OUTPUT 2>&1 sed -i "s/WITH_GTK3 = 1/WITH_GTK3 = 0/" Makefile CFLAGS="-O2 \ -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ \ -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include/ \ -I/usr/include/gdk-pixbuf-2.0/ \ -I/usr/include/atk-1.0/ \ -I/usr/include/cairo \ -I/usr/include/pango-1.0 \ -I/usr/include/glib-2.0 \ -I/usr/include/gtk-2.0" \ make >>$OUTPUT 2>&1 cp cbatticon /squashfs-root/usr/bin >>$OUTPUT 2>&1 dir2sb /squashfs-root /$MODULE.sb >>$OUTPUT 2>&1