diff options
author | Vijay Marcel <vijaymarcel@outlook.com> | 2023-06-01 19:43:24 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-06-03 10:38:16 +0700 |
commit | 653c533c6e7adfb17fb4d5bb9ea9acf37b489e4e (patch) | |
tree | c8e029213a215051f4c9caca1443530533ead14a /system | |
parent | a4cd5630a7fbcc384498e82b8c00e06a45c61238 (diff) |
system/xdg-ninja: Added ($HOME Dir Cleaner)
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/xdg-ninja/README | 26 | ||||
-rw-r--r-- | system/xdg-ninja/changelog | 6 | ||||
-rw-r--r-- | system/xdg-ninja/slack-desc | 19 | ||||
-rw-r--r-- | system/xdg-ninja/xdg-ninja.SlackBuild | 79 | ||||
-rw-r--r-- | system/xdg-ninja/xdg-ninja.info | 10 |
5 files changed, 140 insertions, 0 deletions
diff --git a/system/xdg-ninja/README b/system/xdg-ninja/README new file mode 100644 index 000000000000..e619af035636 --- /dev/null +++ b/system/xdg-ninja/README @@ -0,0 +1,26 @@ +A shell script wich checks your $HOME for unwanted files +and directories. When it encounters a file it knows +about, it will tell you weather it is possible to move this +file to an appropriate location and how to do it. + +The configuration is done in the programs/ directory, which +should be located in the same working directory as the xdg-ninja.sh +script. This can be overriden with the XN_PROGRAMS_DIR environment +variable. + +You define a program, and then a list of files and directories +which this program ruthlessly puts into your $HOME directory. + +For each file/directory, you specify if it can be (re)moved. + +If this is the case, you also specify instructions +on how to accomplish this in Markdown. + +Files in this directory can have any name, but using the +name of the program is encouraged. + +bashrc file should be in your $HOME directory for it to work properly +and expects XDG environment variables to be in your bashrc. +set XN_PROGRAMS_DIR=/opt/$PRGNAM-$VERSION/programs in your bashrc. +This program is installed in /opt/$PRGNAM-$VERSION/ update $PATH +accordingly. diff --git a/system/xdg-ninja/changelog b/system/xdg-ninja/changelog new file mode 100644 index 000000000000..2ce013532897 --- /dev/null +++ b/system/xdg-ninja/changelog @@ -0,0 +1,6 @@ +Changelog for xdg-ninja SlackBuild Script +-------------------------------------------------------------------- + +27/05/2023: + +Submitted to slackbuilds.org diff --git a/system/xdg-ninja/slack-desc b/system/xdg-ninja/slack-desc new file mode 100644 index 000000000000..d6a1d5069932 --- /dev/null +++ b/system/xdg-ninja/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------------------------------------------------------| +xdg-ninja: xdg-ninja ($HOME Dir Cleaner) +xdg-ninja: +xdg-ninja: A shell script wich checks your $HOME for unwanted files +xdg-ninja: and directories. When it encounters a file it knows +xdg-ninja: about, it will tell you weather it is possible to move this +xdg-ninja: file to an appropriate location and how to do it. +xdg-ninja: +xdg-ninja: Homepage:https://github.com/b3nj5m1n +xdg-ninja: +xdg-ninja: +xdg-ninja: diff --git a/system/xdg-ninja/xdg-ninja.SlackBuild b/system/xdg-ninja/xdg-ninja.SlackBuild new file mode 100644 index 000000000000..99185ac586ce --- /dev/null +++ b/system/xdg-ninja/xdg-ninja.SlackBuild @@ -0,0 +1,79 @@ +#!/bin/bash + +# Slackware build script for xdg-ninja + +# Copyright 2023 Vijay Marcel +# 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=xdg-ninja +VERSION=${VERSION:-0.2.0.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} +ARCH=noarch + +# 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} + +set -e +trap 'echo "$0 FAILED at line $LINENO!" | tee -a $OUTPUT/error-${PRGNAM}.log' ERR + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +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 \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +mkdir -pv $PKG/opt/$PRGNAM-$VERSION/ +mkdir -pv $PKG/opt/$PRGNAM-$VERSION/programs + +install -vm0755 xdg-ninja.sh -T $PKG/opt/$PRGNAM-$VERSION/xdg-ninja +install -vDm0644 programs/* -t $PKG/opt/$PRGNAM-$VERSION/programs + +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 LICENSE README.md $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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/xdg-ninja/xdg-ninja.info b/system/xdg-ninja/xdg-ninja.info new file mode 100644 index 000000000000..f2a66e86c707 --- /dev/null +++ b/system/xdg-ninja/xdg-ninja.info @@ -0,0 +1,10 @@ +PRGNAM="xdg-ninja" +VERSION="0.2.0.1" +HOMEPAGE="https://github.com/b3nj5m1n/xdg-ninja/" +DOWNLOAD="https://github.com/b3nj5m1n/xdg-ninja/archive/v0.2.0.1/xdg-ninja-0.2.0.1.tar.gz" +MD5SUM="5790f1d0cdad46bb84bdd89ec2d0629b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="jq glow" +MAINTAINER="Vijay Marcel" +EMAIL="vijaymarcel@outlook.com" |