summaryrefslogtreecommitdiffstats
path: root/desktop/gsimplecal/gsimplecal.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/gsimplecal/gsimplecal.SlackBuild')
-rw-r--r--desktop/gsimplecal/gsimplecal.SlackBuild27
1 files changed, 19 insertions, 8 deletions
diff --git a/desktop/gsimplecal/gsimplecal.SlackBuild b/desktop/gsimplecal/gsimplecal.SlackBuild
index 39fc79a169..a0947de7f3 100644
--- a/desktop/gsimplecal/gsimplecal.SlackBuild
+++ b/desktop/gsimplecal/gsimplecal.SlackBuild
@@ -1,29 +1,37 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for gsimplecal
# Written by Oleg O. Chukaev <oleg.chukaev@mail.ru>
+# Copyright 2024 Isaac Yu <isaacyu@protonmail.com>
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gsimplecal
-VERSION=${VERSION:-2.0}
+VERSION=${VERSION:-2.5.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
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"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
@@ -47,6 +55,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# If GTK3=yes, then build gsimplecal with gtk3 instead of gtk2
+[ ! ${GTK3:-no} = yes ] && ENABLE_GTK2=--enable-gtk2
+
./autogen.sh
CFLAGS="$SLKCFLAGS" \
@@ -54,7 +65,7 @@ CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--mandir=/usr/man \
- --enable-gtk2
+ $ENABLE_GTK2
make
make install DESTDIR=$PKG
@@ -73,4 +84,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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