diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-28 20:06:00 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-28 20:06:00 +0100 |
| commit | 190228d4b755161169e77ed38c42f71711d06cd7 (patch) | |
| tree | 9dc7bfb1d025e63f02060cc8285c7d27d6bcce9f /slacker-gui/slacker-gui.SlackBuild | |
| parent | 00c6e0c25e39474ca3e993164bd53fabadce7c2c (diff) | |
| download | my-slackbuilds-190228d4b755161169e77ed38c42f71711d06cd7.tar.gz my-slackbuilds-190228d4b755161169e77ed38c42f71711d06cd7.zip | |
slacker-gui: add version 0.14.3_beta.7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'slacker-gui/slacker-gui.SlackBuild')
| -rw-r--r-- | slacker-gui/slacker-gui.SlackBuild | 110 |
1 files changed, 110 insertions, 0 deletions
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 |
