summaryrefslogtreecommitdiff
path: root/extra/source/bash-completion/bash-completion.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'extra/source/bash-completion/bash-completion.SlackBuild')
-rwxr-xr-xextra/source/bash-completion/bash-completion.SlackBuild50
1 files changed, 50 insertions, 0 deletions
diff --git a/extra/source/bash-completion/bash-completion.SlackBuild b/extra/source/bash-completion/bash-completion.SlackBuild
new file mode 100755
index 00000000..153853dc
--- /dev/null
+++ b/extra/source/bash-completion/bash-completion.SlackBuild
@@ -0,0 +1,50 @@
+#!/bin/sh
+# Set initial variables:
+CWD=`pwd`
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+PKG=$TMP/package-bash-completion
+
+VERSION=20060301
+ARCH=noarch
+BUILD=2
+
+if [ ! -d $TMP ]; then
+ mkdir -p $TMP # location to build the source
+fi
+rm -rf $PKG
+mkdir -p $PKG
+
+cd $TMP
+rm -rf bash_completion
+tar xjvf $CWD/bash-completion-$VERSION.tar.bz2
+cd bash_completion
+
+# Add support for xz file formats:
+zcat $CWD/bash-completion-xz.diff.gz | patch -p1 || exit 1
+
+mkdir -p $PKG/etc/bash_completion.d $PKG/etc/profile.d
+cp -a $CWD/bash_completion.sh.gz $PKG/etc/profile.d
+gzip -d $PKG/etc/profile.d/bash_completion.sh.gz
+chmod 755 $PKG/etc/profile.d/bash_completion.sh
+cp -a bash_completion $PKG/etc
+chmod 644 $PKG/etc/bash_completion
+cp -a contrib/* $PKG/etc/bash_completion.d
+chmod 755 $PKG/etc/bash_completion.d/*
+mkdir -p $PKG/usr/doc/bash-completion-$VERSION
+cp -a BUGS COPYING README $PKG/usr/doc/bash-completion-$VERSION
+chmod 644 $PKG/usr/doc/bash-completion-$VERSION/*
+( cd $PKG ; chown -R root.root . )
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/bash-completion-$VERSION-$ARCH-$BUILD.txz
+
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/bash_completion
+ rm -rf $PKG
+fi