diff options
Diffstat (limited to 'system/herculesstudio/herculesstudio.SlackBuild')
-rw-r--r-- | system/herculesstudio/herculesstudio.SlackBuild | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/system/herculesstudio/herculesstudio.SlackBuild b/system/herculesstudio/herculesstudio.SlackBuild index 4d078e6705..dbed3a8a96 100644 --- a/system/herculesstudio/herculesstudio.SlackBuild +++ b/system/herculesstudio/herculesstudio.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for herculesstudio # a GUI for the Hercules Emulator @@ -23,30 +23,40 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# revision date 2013/03/25 +# 20220211 bkw: Modified by SlackBuilds.org, BUILD=2. +# - fix build on 15.0: add qt4 as a dep now that we have it. +# - new-style icons. +# - i486 => i586. + +cd $(dirname $0) ; CWD=$(pwd) PRGNAM=herculesstudio VERSION=${VERSION:-1.4.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} PRGUNTARRED=HerculesStudio if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -70,11 +80,12 @@ cd $PRGUNTARRED chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ + -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + -exec chmod 644 {} \+ -qmake +# 20220211 bkw: this is all we needed to make it use qt4 instead of qt5. +qmake-qt4 # Accept our CXXFLAGS sed -i "/^CXXFLAGS/s/=/+=/" Makefile.Release @@ -83,19 +94,26 @@ sed -i "/^CXXFLAGS/s/=/+=/" Makefile.Release CXXFLAGS="$SLKCFLAGS" \ make CXX=g++ make install INSTALL_ROOT=$PKG - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -# Copy icon & desktop file to package -mkdir -p $PKG/usr/share/{applications,pixmaps} +strip $PKG/usr/bin/$PRGUNTARRED + +# 20220211 bkw: new-style icons, extracted from hercstudio.icns in source. +for i in $CWD/icons/*.png; do + px="$( basename $i | cut -d. -f1 )" + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + cat $i > $dir/$PRGNAM.png +done + +# 20220211 bkw: old-style icon, just a symlink. +mkdir -p $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +mkdir -p $PKG/usr/share/applications cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop -cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - COPYING INSTALL INSTALL-BIN \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -103,4 +121,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |