summaryrefslogtreecommitdiff
path: root/source/n/whois/whois.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/whois/whois.SlackBuild')
-rwxr-xr-xsource/n/whois/whois.SlackBuild37
1 files changed, 18 insertions, 19 deletions
diff --git a/source/n/whois/whois.SlackBuild b/source/n/whois/whois.SlackBuild
index 26baacf8..589b57db 100755
--- a/source/n/whois/whois.SlackBuild
+++ b/source/n/whois/whois.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,10 +20,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=4.7.26
-ARCH=${ARCH:-x86_64}
+PKGNAM=whois
+VERSION=${VERSION:-$(echo ${PKGNAM}_*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d _ | rev)}
BUILD=${BUILD:-1}
+# Automatically determine architecture for build & packaging:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-whois
@@ -42,27 +51,17 @@ find . \
-exec chmod 644 {} \;
make || exit
+make install install-pos BASEDIR=$PKG || exit 1
-mkdir -p $PKG/usr/bin
-cat whois > $PKG/usr/bin/whois
-chmod 755 $PKG/usr/bin/whois
-
-( cd po
- make
- for n in *.mo ; do \
- l=`basename $n .mo`; \
- /usr/bin/install -c -m 755 -d $PKG/usr/share/locale/$l; \
- /usr/bin/install -c -m 755 -d $PKG/usr/share/locale/$l/LC_MESSAGES; \
- /usr/bin/install -c -m 644 $n $PKG/usr/share/locale/$l/LC_MESSAGES/whois.mo; \
- done
-)
+mv $PKG/usr/share/man $PKG/usr
+gzip -9 $PKG/usr/man/man1/*.1
-mkdir -p $PKG/usr/man/man1
-cat whois.1 | gzip -9c > $PKG/usr/man/man1/whois.1.gz
+# Remove mkpasswd stuff:
+find $PKG -iname "mkpasswd*" -exec rm -f {} \;
mkdir -p $PKG/usr/doc/whois-$VERSION
cp -a \
- COPYING* README \
+ COPYING README \
$PKG/usr/doc/whois-$VERSION
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \