summaryrefslogtreecommitdiff
path: root/system/spman
diff options
context:
space:
mode:
Diffstat (limited to 'system/spman')
-rw-r--r--system/spman/README28
-rw-r--r--system/spman/doinst.sh15
-rw-r--r--system/spman/slack-desc19
-rw-r--r--system/spman/spman.SlackBuild120
-rw-r--r--system/spman/spman.info10
5 files changed, 192 insertions, 0 deletions
diff --git a/system/spman/README b/system/spman/README
new file mode 100644
index 0000000000..ca5949410a
--- /dev/null
+++ b/system/spman/README
@@ -0,0 +1,28 @@
+Spman is a powerful Slackware package manager implemented on Python3
+and licensed under the MIT license.
+
+Main features:
+ - check packages for upgrade
+ - download package or source code from allowed repositories
+ - download, build and install package(s) in the queue from SBo
+ repository
+ - show list all dependencies for package from SBo repository
+ - view the contents of files included in SlackBuild archive
+ - search package from each enabled repository and view info
+ - show complete list of the packages in the repository
+ - search dependency problems in the system packages using
+ Slackware binary dependency checker (sbbdep) tool or ldd
+ - search for links to nonexistent files/dir in the specified
+ directory
+ - check health installed packages
+ - search for *.new config files on the system
+ - autocompletion of input parameters
+
+Supported repositories:
+ Slackware.com
+ SlackBuilds.org
+ Alien's
+ Alien's multilib
+
+Optional dependencies:
+ - sbbdep (for search dependency problems functionality)
diff --git a/system/spman/doinst.sh b/system/spman/doinst.sh
new file mode 100644
index 0000000000..1a56316bdd
--- /dev/null
+++ b/system/spman/doinst.sh
@@ -0,0 +1,15 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+CONFIGS="blacklist repo-list spman.conf"
+
+for file in $CONFIGS; do
+ config etc/spman/${file}.new
+done
diff --git a/system/spman/slack-desc b/system/spman/slack-desc
new file mode 100644
index 0000000000..770c41a5f3
--- /dev/null
+++ b/system/spman/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------------------------------------------------------|
+spman: spman (Slackware package manager)
+spman:
+spman: Spman is a powerful Slackware package manager implemented on Python3
+spman: and licensed under the MIT license. Main features: check packages for
+spman: upgrade, download binary package or source code, build and install
+spman: package(s) in the queue, search packages on repositories, search
+spman: dependency problems, check health installed packages, search for
+spman: *.new config files on the system and more.
+spman:
+spman: Homepage: https://github.com/MyRequiem/spman
+spman:
diff --git a/system/spman/spman.SlackBuild b/system/spman/spman.SlackBuild
new file mode 100644
index 0000000000..0ae7709d19
--- /dev/null
+++ b/system/spman/spman.SlackBuild
@@ -0,0 +1,120 @@
+#!/bin/sh
+
+# Slackware build script for spman
+#
+# spman - Slackware package manager
+# Home page: https://github.com/MyRequiem/spman
+#
+# Copyright (c) 2018 Vladimir MyRequiem Astrakhan, Russia
+# <mrvladislavovich@gmail.com>
+# 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.
+
+
+PRGNAM=spman
+VERSION=${VERSION:-1.4.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+if ! which python3 &>/dev/null; then
+ echo "Error: python3 not found"
+ exit 1
+fi
+
+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 -p $PKG/usr/sbin
+install --mode=755 src/$PRGNAM $PKG/usr/sbin
+
+# etc/{spman,bash_completion.d}
+cp -R etc $PKG
+(
+ cd $PKG/etc/$PRGNAM || exit 1
+ CONFIGS=$(ls)
+ for CONFIG in $CONFIGS; do
+ chmod 644 $CONFIG
+ mv $CONFIG $CONFIG.new
+ done
+)
+chmod 755 $PKG/etc/bash_completion.d/$PRGNAM-bash-complition.sh
+
+# python libs
+PY3VER="$(python3 -c 'import sys; ver = sys.version_info; \
+ print("{0}.{1}".format(ver.major, ver.minor))')"
+LIBS=$PKG/usr/lib$LIBDIRSUFFIX/python$PY3VER/site-packages/$PRGNAM
+mkdir -p "${LIBS}"
+install --mode=644 src/*.py $LIBS
+
+# copy man pages
+mkdir -p $PKG/usr/man/man8
+cp man/$PRGNAM.8 $PKG/usr/man/man8
+# compress man pages
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+# copy program documentation into the package
+DOCS=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $DOCS
+cat $CWD/$PRGNAM.SlackBuild > $DOCS/$PRGNAM.SlackBuild
+cat $CWD/README > $DOCS/README
+cp -a AUTHORS ChangeLog.txt INSTALL LICENSE README.md requirements.txt $DOCS
+
+# copy the slack-desc and custom doinst.sh into ./install
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+# make the package
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/spman/spman.info b/system/spman/spman.info
new file mode 100644
index 0000000000..a1141dd8a9
--- /dev/null
+++ b/system/spman/spman.info
@@ -0,0 +1,10 @@
+PRGNAM="spman"
+VERSION="1.4.2"
+HOMEPAGE="https://github.com/MyRequiem/spman"
+DOWNLOAD="https://github.com/MyRequiem/spman/archive/1.4.2/spman-1.4.2.tar.gz"
+MD5SUM="851e43636398ed27ac16b84a1a6c6abc"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3"
+MAINTAINER="Vladimir MyRequiem"
+EMAIL="mrvladislavovich@gmail.com"