summaryrefslogtreecommitdiffstats
path: root/system/ansible/ansible.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/ansible/ansible.SlackBuild')
-rw-r--r--system/ansible/ansible.SlackBuild35
1 files changed, 16 insertions, 19 deletions
diff --git a/system/ansible/ansible.SlackBuild b/system/ansible/ansible.SlackBuild
index 38df6cae55..76914fce5c 100644
--- a/system/ansible/ansible.SlackBuild
+++ b/system/ansible/ansible.SlackBuild
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ansible
# Copyright 2014 Alex Diaconu <alex.diaconu@gmx.com>
# Copyright 2016 Ciorceri Petru Sorin <cpsorin@gmail.com>
-# Copyright 2017-2020 Marek Wodzinski <majek@w7i.pl>
+# Copyright 2017-2024 Marek Wodzinski <majek@w7i.pl>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,10 +24,13 @@
# 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=ansible
-VERSION=${VERSION:-2.9.6}
+VERSION=${VERSION:-8.7.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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}
@@ -73,25 +83,12 @@ find -L . \
python3 setup.py install --root=$PKG
-# Copy docs, remove git traces, compress manpages
-cp -a docs/man $PKG/usr/man
-find $PKG/usr/man \
- \( -iname '.git*' \
- -o -iname 'man3' \) -delete # "man3" contains a single ".gitdir" file (yeah)
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-mkdir -p $PKG/etc/ansible
-cp -a examples/ansible.cfg $PKG/etc/ansible/ansible.cfg.new
-cp -a examples/hosts $PKG/etc/ansible/hosts.new
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a examples COPYING *.rst $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING *.rst $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:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE