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.SlackBuild31
1 files changed, 23 insertions, 8 deletions
diff --git a/extra/source/bash-completion/bash-completion.SlackBuild b/extra/source/bash-completion/bash-completion.SlackBuild
index 3fb915c0..d2e59446 100755
--- a/extra/source/bash-completion/bash-completion.SlackBuild
+++ b/extra/source/bash-completion/bash-completion.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,9 +22,9 @@
# Slackware build script for bash-completion
-VERSION=1.1
+VERSION=1.3
ARCH=noarch
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -43,26 +43,35 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Add support for txz packages instead of only tgz
-zcat $CWD/bash-completion-1.1-pkgtools_tgxz.diff.gz | patch -p1 || exit 1
+# Fixup sh completion for us
+zcat $CWD/fixup-sh-script-completions.diff.gz | patch -p1 --verbose || exit 1
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/man \
--infodir=/usr/info \
- --docdir=/usr/doc/bash_completion-$VERSION
+ --docdir=/usr/doc/bash-completion-$VERSION
make || exit 1
make install DESTDIR=$PKG || exit 1
-
+
mkdir -p $PKG/etc/profile.d
zcat $CWD/bash_completion.sh.gz > $PKG/etc/profile.d/bash_completion.sh
chmod 0755 $PKG/etc/profile.d/bash_completion.sh
+# Sorry, but these contrib scripts have been causing a lot of problems.
+# If these are merged with upstream (and hopefully debugged) then we
+# will have them, but adding them at this level is IMHO a mistake.
+## https://github.com/GArik/bash-completion
+## GArik has a 'slackware' branch with quite a few enhancements
+#for i in pkgtools rpm2tgz sbopkg slackpkg slapt ; do
+# cat $CWD/contrib/$i > $PKG/etc/bash_completion.d/$i ;
+#done
+
mkdir -p $PKG/usr/doc/bash-completion-$VERSION
cp -a \
- AUTHORS COPYING README TODO \
+ AUTHORS COPYING* README* TODO \
$PKG/usr/doc/bash-completion-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
@@ -73,6 +82,12 @@ if [ -r CHANGES ]; then
touch -r CHANGES $DOCSDIR/CHANGES
fi
+# Contrib scripts can go in with the documentation:
+cp -a $CWD/contrib $PKG/usr/doc/bash-completion-$VERSION
+chown -R root:root $PKG/usr/doc/bash-completion-$VERSION
+chmod 755 $PKG/usr/doc/bash-completion-$VERSION/contrib
+chmod 644 $PKG/usr/doc/bash-completion-$VERSION/contrib/*
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc