#!/bin/bash # # diylc.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # diylc.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="diylc" PACKAGE_EXT="zip" VERSION=${VERSION:=5.10.0} BUILD=${BUILD:=1} ARCH=$(uname -m) if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required # The universal linux version is not so universal and has some extra dependencies. # So, just use the AppImage package and add some files from the universal and source package. SRC="diylc-${VERSION}-linux.zip" URL="https://github.com/bancika/diy-layout-creator/releases/download/v${VERSION}/${SRC}" get_source $SRC $URL mkdir -p $PKG/usr/bin cd $PKG/usr/bin unzip $CWD/$SRC # This is an AppImage, give it a normal name. mv DIYLayoutCreator-${VERSION}-x86_64.AppImage diylc cd - # Install application icons for isize in 16 32 48 64 512 ; do install -D -m 644 $CWD/icons/icon_${isize}x${isize}.png $PKG/usr/share/icons/hicolor/${isize}x${isize}/apps/diylc.png done mkdir -p $DOCS cp -a $CWD/doc/* $DOCS # Desktop entries install -D -m 644 $CWD/diylc.desktop $PKG/usr/share/applications/diylc.desktop install -D -m 644 $CWD/icons/diylc.png $PKG/usr/share/pixmaps/diylc.png # Create package without using the fixup_package function because that will # strip (and corrupt) AppImage. cd $PKG mkdir -p $PKG/install cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc makepkg -p -l y -c n $TMP/$PACKAGE-$PVERSION-$ARCH-$BUILD$TAG.txz tail -n 11 $PKG/install/slack-desc > $TMP/$PACKAGE-$PVERSION-$ARCH-$BUILD$TAG.txt md5sum $TMP/$PACKAGE-$PVERSION-$ARCH-$BUILD$TAG.txz > $TMP/$PACKAGE-$PVERSION-$ARCH-$BUILD$TAG.txz.md5 # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi