summaryrefslogtreecommitdiffstats
path: root/desktop/sun
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/sun')
-rw-r--r--desktop/sun/README7
-rw-r--r--desktop/sun/doinst.sh6
-rw-r--r--desktop/sun/slack-desc10
-rw-r--r--desktop/sun/sun.SlackBuild38
-rw-r--r--desktop/sun/sun.info12
5 files changed, 54 insertions, 19 deletions
diff --git a/desktop/sun/README b/desktop/sun/README
index b7adb3ff77..8c873a01f5 100644
--- a/desktop/sun/README
+++ b/desktop/sun/README
@@ -1,3 +1,10 @@
SUN (Slackware Update Notifier) is a tray notification applet
for informing about package updates in Slackware and CLI tool for
monitoring upgraded packages.
+
+SUN works with slackpkg as well as with others tools and
+repositories. Probably, you can use the SUN with other's Slackware
+based Linux distributionsc as well.
+
+Edit the configuration /etc/sun/repositories.toml file and change the
+http mirror for your country. NOTE: ftp mirrors not supported.
diff --git a/desktop/sun/doinst.sh b/desktop/sun/doinst.sh
index 5dc84af9c0..f59a2090af 100644
--- a/desktop/sun/doinst.sh
+++ b/desktop/sun/doinst.sh
@@ -8,8 +8,12 @@ config() {
fi
}
-config etc/sun/sun.conf.new
+config etc/sun/sun.toml.new
+config etc/sun/repositories.toml.new
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
+
+cmp etc/xdg/autostart/sun-daemon.desktop etc/xdg/autostart/sun-daemon.desktop.sample 2> /dev/null && \
+ rm etc/xdg/autostart/sun-daemon.desktop.sample
diff --git a/desktop/sun/slack-desc b/desktop/sun/slack-desc
index 6df4357611..35d6b0e7f2 100644
--- a/desktop/sun/slack-desc
+++ b/desktop/sun/slack-desc
@@ -9,11 +9,11 @@
sun: sun (Slackware Update Notifier)
sun:
sun: SUN is a tray notification applet for informing about package updates
-sun: in Slackware and CLI tool for monitoring upgraded packages.
-sun:
-sun: Homepage: https://gitlab.com/dslackw/sun
-sun:
-sun:
+sun: in Slackware and CLI tool for monitoring upgraded packages. SUN works
+sun: with slackpkg as well as with others tools and repositories. Probably
+sun: you can use the SUN with other's Slackware based Linux distributions
+sun: as well.
sun:
+sun: Homepage: https://dslackw.gitlab.io/sun
sun:
sun:
diff --git a/desktop/sun/sun.SlackBuild b/desktop/sun/sun.SlackBuild
index 5903063579..ed30f5c3d9 100644
--- a/desktop/sun/sun.SlackBuild
+++ b/desktop/sun/sun.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for sun
-# Copyright 2015-2021 Dimitris Zlatanidis Orestiada, Greece
+# Copyright 2015-2024 Dimitris Zlatanidis Orestiada, Greece
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=sun
-VERSION=${VERSION:-1.3.1}
+VERSION=${VERSION:-1.6.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+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}
@@ -69,13 +79,27 @@ 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 {} \;
-python3 setup.py install --root=$PKG
+python3 -m build --wheel --no-isolation
+python3 -m installer --destdir "$PKG" dist/*.whl
+
+# Install configuration and data files
+mkdir -p $PKG/usr/sbin $PKG/etc/$PRGNAM $PKG/usr/share/pixmaps/ $PKG/usr/share/applications/ \
+ $PKG/etc/xdg/autostart/
+
+install -D -m0644 conf/sun.toml $PKG/etc/sun/sun.toml.new
+install -D -m0644 conf/repositories.toml $PKG/etc/sun/repositories.toml.new
+
+mv $PKG/usr/bin/sun-autostart $PKG/usr/sbin/
+cp -a extra/icon/sun.png $PKG/usr/share/pixmaps/
+cp -a extra/desktop/sun.desktop $PKG/usr/share/applications/
+cp -a extra/xdg/sun-daemon.desktop.sample $PKG/etc/xdg/autostart/
+cp -a extra/xdg/sun.desktop $PKG/etc/xdg/autostart/
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README.rst CHANGES.md LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README.md CHANGELOG.md LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -83,4 +107,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
diff --git a/desktop/sun/sun.info b/desktop/sun/sun.info
index 112aa31c77..fe151f8c96 100644
--- a/desktop/sun/sun.info
+++ b/desktop/sun/sun.info
@@ -1,10 +1,10 @@
PRGNAM="sun"
-VERSION="1.3.1"
-HOMEPAGE="https://gitlab.com/dslackw/sun"
-DOWNLOAD="https://gitlab.com/dslackw/sun/-/archive/1.3.1/sun-1.3.1.tar.gz"
-MD5SUM="739857d3e5587638466c8f0257e12f22"
+VERSION="1.6.0"
+HOMEPAGE="https://dslackw.gitlab.io/sun"
+DOWNLOAD="https://gitlab.com/dslackw/sun/-/archive/1.6.0/sun-1.6.0.tar.gz"
+MD5SUM="b0dc5f38d68e056c00052d2b494665a4"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python-notify2 dbus-python3 pygobject3-python3 python-urllib3"
+REQUIRES="python3-build"
MAINTAINER="Dimitris Zlatanidis"
-EMAIL="d.zlatanidis@gmail.com"
+EMAIL="dslackw@gmail.com"