summaryrefslogtreecommitdiff
path: root/source/n/obexftp/obexftp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/obexftp/obexftp.SlackBuild')
-rwxr-xr-xsource/n/obexftp/obexftp.SlackBuild53
1 files changed, 34 insertions, 19 deletions
diff --git a/source/n/obexftp/obexftp.SlackBuild b/source/n/obexftp/obexftp.SlackBuild
index 821db8d2..e2992d55 100755
--- a/source/n/obexftp/obexftp.SlackBuild
+++ b/source/n/obexftp/obexftp.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,17 +21,24 @@
PKGNAM=obexftp
-VERSION=${VERSION:-0.23}
-ARCH=${ARCH:-x86_64}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3}
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-BUILD=${BUILD:-1}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # 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-${PKGNAM}
-rm -rf $PKG
-mkdir -p $TMP $PKG
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -42,11 +49,16 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
+rm -rf $PKG
+mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}-$VERSION || exit 1
# Make sure ownerships and permissions are sane:
@@ -57,6 +69,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fixes the RSTRINGLEN for ruby-1.9
+zcat $CWD/ruby_rstringlen.diff.gz | patch -p1 --verbose || exit 1
+
# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -110,27 +125,27 @@ fi
# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
- AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO contrib \
+ AUTHORS COPYING* INSTALL NEWS README* THANKS TODO contrib \
$PKG/usr/doc/${PKGNAM}-$VERSION
rm -f $PKG/usr/doc/${PKGNAM}-$VERSION/contrib/Makefile*
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
# Remove perllocal files:
find $PKG -name perllocal.pod -exec rm "{}" \;
# This removes our DESTDIR from the packlist filenames, to keep perl's
# internal inventories consistent and correct.
find $PKG -name .packlist | while read plist ; do
- sed -e "s%/share/man%/man%g" \
- -e "s%$PKG%%g" \
- -e "s%\.1$%\.1\.gz%g" \
- -e "s%\.2$%\.2\.gz%g" \
- -e "s%\.3$%\.3\.gz%g" \
- -e "s%\.3pm$%\.3pm\.gz%g" \
- -e "s%\.4$%\.4\.gz%g" \
- -e "s%\.5$%\.5\.gz%g" \
- -e "s%\.6$%\.6\.gz%g" \
- -e "s%\.7$%\.7\.gz%g" \
- -e "s%\.8$%\.8\.gz%g" \
+ sed -e "s%$PKG%%g" \
+ -e "s%/share/man%/man%g" \
+ -re "s%\.([1-9]n?|3pm)$%&.gz%g # extend man filenames for .gz" \
${plist} > ${plist}.new
mv -f ${plist}.new ${plist}
done