system/xdg-ninja: Added ($HOME Dir Cleaner)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
a4cd5630a7
commit
653c533c6e
|
@ -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.
|
|
@ -0,0 +1,6 @@
|
|||
Changelog for xdg-ninja SlackBuild Script
|
||||
--------------------------------------------------------------------
|
||||
|
||||
27/05/2023:
|
||||
|
||||
Submitted to slackbuilds.org
|
|
@ -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:
|
|
@ -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
|
|
@ -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"
|
Loading…
Reference in New Issue