diff options
Diffstat (limited to 'slacker-gui')
| -rw-r--r-- | slacker-gui/README | 9 | ||||
| -rw-r--r-- | slacker-gui/doinst.sh | 9 | ||||
| -rw-r--r-- | slacker-gui/slack-desc | 19 | ||||
| -rw-r--r-- | slacker-gui/slacker-gui.SlackBuild | 110 | ||||
| -rw-r--r-- | slacker-gui/slacker-gui.info | 12 |
5 files changed, 159 insertions, 0 deletions
diff --git a/slacker-gui/README b/slacker-gui/README new file mode 100644 index 0000000..67a1d4c --- /dev/null +++ b/slacker-gui/README @@ -0,0 +1,9 @@ +slacker-gui is a GTK4/libadwaita front-end for the slacker package +manager. It holds no package logic of its own: it runs the slacker +binary and lays out what slacker prints. + +Read-only views run slacker as the desktop user. Actions that change +the system (install, upgrade, remove, pins, frozen rules) run +"pkexec slacker ...", a polkit policy for that is installed. + +Rust sources are built offline from upstream's vendored crates. diff --git a/slacker-gui/doinst.sh b/slacker-gui/doinst.sh new file mode 100644 index 0000000..65c7e2e --- /dev/null +++ b/slacker-gui/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/slacker-gui/slack-desc b/slacker-gui/slack-desc new file mode 100644 index 0000000..eeed03a --- /dev/null +++ b/slacker-gui/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +slacker-gui: slacker-gui (GTK4 front-end for the slacker package manager) +slacker-gui: +slacker-gui: A GTK4/libadwaita window for slacker. It searches, installs, +slacker-gui: upgrades and removes packages, and shows repositories, mirrors, +slacker-gui: pins and history. It runs the slacker binary and shows what it +slacker-gui: prints; changes to the system run as root through pkexec. +slacker-gui: +slacker-gui: Homepage: https://forge.slackware.nl/rizitis/slacker +slacker-gui: +slacker-gui: +slacker-gui: diff --git a/slacker-gui/slacker-gui.SlackBuild b/slacker-gui/slacker-gui.SlackBuild new file mode 100644 index 0000000..e67f2d2 --- /dev/null +++ b/slacker-gui/slacker-gui.SlackBuild @@ -0,0 +1,110 @@ +#!/bin/bash + +# Slackware build script for slacker-gui + +# Copyright 2026 danix <danix@danix.xyz> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# 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=slacker-gui +SRCNAM=slacker +VERSION=${VERSION:-0.14.3_beta.7} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +# Release tag is 0.14.3_beta.7, the tarballs are named 0.14.3. +SRCVER=${VERSION%%_*} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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" = "i586" -o "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=$ARCH -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" -o "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$SRCVER-source +tar xvf $CWD/slacker-$SRCVER-source.tar.gz +cd $SRCNAM-$SRCVER-source +chown -R root:root . +find . ! -type l -a \( \ + \( -perm /111 -a ! -perm 755 -a -exec chmod -f 755 {} + \) -o \ + \( ! -perm /111 -a ! -perm 644 -a -exec chmod -f 644 {} + \) \) + +cd slacker-gui + +# Build offline from upstream's vendored crates (vendors.tar.gz). +tar xf $CWD/vendors.tar.gz +tar xf vendors/slacker-gui-*.tar.gz +tar xf slacker-gui-vendor-*/slacker-gui-vendor-*.tar.gz +mkdir -p .cargo +cat slacker-gui-vendor-*/cargo-config.toml > .cargo/config.toml + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +cargo build --frozen --release + +install -Dm0755 target/release/slacker-gui $PKG/usr/bin/slacker-gui +strip --strip-unneeded $PKG/usr/bin/slacker-gui + +install -Dm0644 data/*.desktop -t $PKG/usr/share/applications +mkdir -p $PKG/usr/share/icons +cp -a data/icons/hicolor $PKG/usr/share/icons +# Lets pkexec run slacker as root for the actions that change the system. +install -Dm0644 data/nl.slackware.forge.rizitis.slacker.policy \ + -t $PKG/usr/share/polkit-1/actions + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ../LICENSE ../NEWS data/README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +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 diff --git a/slacker-gui/slacker-gui.info b/slacker-gui/slacker-gui.info new file mode 100644 index 0000000..32d3805 --- /dev/null +++ b/slacker-gui/slacker-gui.info @@ -0,0 +1,12 @@ +PRGNAM="slacker-gui" +VERSION="0.14.3_beta.7" +HOMEPAGE="https://forge.slackware.nl/rizitis/slacker" +DOWNLOAD="https://forge.slackware.nl/rizitis/slacker/releases/download/0.14.3_beta.7/slacker-0.14.3-source.tar.gz \ + https://forge.slackware.nl/rizitis/slacker/releases/download/0.14.3_beta.7/vendors.tar.gz" +MD5SUM="508a6da408c5cb4c1d43fee5d6ecb330 \ + bb88386ac64264cc653beb1abef367e2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="slacker" +MAINTAINER="danix" +EMAIL="danix@danix.xyz" |
