summaryrefslogtreecommitdiff
path: root/source/d/slacktrack/slacktrack-project/slacktrack.SlackBuild
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/d/slacktrack/slacktrack-project/slacktrack.SlackBuild
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/d/slacktrack/slacktrack-project/slacktrack.SlackBuild')
-rwxr-xr-xsource/d/slacktrack/slacktrack-project/slacktrack.SlackBuild107
1 files changed, 107 insertions, 0 deletions
diff --git a/source/d/slacktrack/slacktrack-project/slacktrack.SlackBuild b/source/d/slacktrack/slacktrack-project/slacktrack.SlackBuild
new file mode 100755
index 00000000..244d92ed
--- /dev/null
+++ b/source/d/slacktrack/slacktrack-project/slacktrack.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+#################################################################
+# Program: slacktrack.SlackBuild
+# Purpose: Build a Slackware Package of slacktrack
+# Author : Stuart Winter <mozes@slackware.com>
+# Version: 1.06
+# Date...: 05-Apr-2013
+#################################################################
+
+PKGNAM=slacktrack
+VERSION=${VERSION:-2.18}
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+case "$( uname -m )" in
+ i?86) export ARCH=i586
+ PKGEXT=txz ;;
+ arm*) export ARCH=arm
+ PKGEXT=txz ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m )
+ PKGEXT=txz ;;
+esac
+
+SLACKPACKAGE=$PKGNAM-$VERSION-$ARCH-$BUILD.$PKGEXT
+
+# Resting place for the package .t?z:
+PKGSTORE=${PKGSTORE:=/tmp}
+
+# Temporary unarchive, compile & package-root directory:
+TMP=/tmp/build-slacktrack
+PKG=/tmp/package-slacktrack
+
+# Work out where we are now so we can untar our source ball from it:
+CWD=$PWD
+
+# Delete previous build dirs
+rm -rf $PKG $TMP
+mkdir -pm755 $PKG $TMP
+
+# Create package framework:
+mkdir -pm755 $PKG/{install,usr/{libexec/slacktrack,bin,doc/$PKGNAM-${VERSION},man/man8}}
+
+# slacktrack's docs:
+cp -fav $CWD/docs/* $PKG/usr/doc/$PKGNAM-${VERSION}
+rm -fv $PKG/usr/doc/$PKGNAM-${VERSION}/INSTALL
+
+# Fix any wonky permissions the docs may have attracted:
+find $PKG/usr/doc -type f -print0 | xargs -0 chmod 644
+find $PKG/usr/doc -type f -print0 | xargs -0 chown root:root
+
+# Install man pages:
+( cd $CWD/man
+ ./man.build
+ gzip -9c slacktrack.8 > $PKG/usr/man/man8/slacktrack.8.gz
+ gzip -9c slackdtxt.8 > $PKG/usr/man/man8/slackdtxt.8.gz
+ rm -f *.8 )
+
+# Install slacktrack & friends:
+install -oroot -groot -vpm755 $CWD/scripts/{slacktrack,slackdtxt} \
+ $PKG/usr/bin
+
+# Build the ln wrapper:
+gcc -O3 $CWD/ln-wrapper.c -o $PKG/usr/libexec/slacktrack/ln || exit 1
+strip --strip-unneeded $PKG/usr/libexec/slacktrack/ln
+
+# Install package description:
+install -vpm644 $CWD/slack-desc $PKG/install
+
+# Build package:
+cd $PKG
+chown -R root:root .
+chmod -R og-w .
+makepkg -l y -c n $PKGSTORE/$SLACKPACKAGE
+
+# Create the corresponding .txt description file:
+( cd $PKGSTORE && $CWD/scripts/slackdtxt $SLACKPACKAGE )
+
+# Package maintainer stuff:
+PARAMS="$( getopt -qn "$( basename $0 )" -o iz -- "$@" )"
+if [ $? -eq 0 ]; then
+ eval set -- "$PARAMS"
+ for option in $* ; do
+ case "${option}" in
+ -i)
+ removepkg slacktrack
+ installpkg $PKGSTORE/$SLACKPACKAGE
+ shift ;;
+
+ -z)
+ echo -n "Making a distributable source archive"
+ ( cd $CWD/..
+ # Don't worry, you're not missing much!
+ chown -R root:root .
+ tar --exclude slacktrack/2bourbon \
+ --exclude slacktrack/old_stuff \
+ -Ixz -cf $CWD/../slackware-package-dir/slacktrack/$PKGNAM-${VERSION}-source.tar.xz slacktrack-project )
+ echo " ... done"
+ shift ;;
+ esac done
+fi
+
+# Delete temporary build dir and package-root.
+# I don't like doing this anymore - I prefer to be able to refer back to
+# the compiled source tree after the build.
+#rm -rf $TMP $PKG