summaryrefslogtreecommitdiffstats
path: root/vde/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2006-08-22 11:20:37 +0000
committer Eric Hameleers <alien@slackware.com>2006-08-22 11:20:37 +0000
commitff6cb8fb13b71dd8e5547ada014642fb89f631ca (patch)
tree361910f31437b5d20a62f79b560c8a1fcc92b6d8 /vde/build
parent7f3403832650a19008d0830697fb2d3b992e0431 (diff)
downloadasb-ff6cb8fb13b71dd8e5547ada014642fb89f631ca.tar.gz
asb-ff6cb8fb13b71dd8e5547ada014642fb89f631ca.tar.xz
Updated the SlackBuild to newer standard :-) Now autodownloads the source.
Diffstat (limited to 'vde/build')
-rwxr-xr-xvde/build/vde.SlackBuild72
1 files changed, 52 insertions, 20 deletions
diff --git a/vde/build/vde.SlackBuild b/vde/build/vde.SlackBuild
index f82ab9c9..c1f85329 100755
--- a/vde/build/vde.SlackBuild
+++ b/vde/build/vde.SlackBuild
@@ -31,6 +31,8 @@
# * New release, adapted to qemu >= 0.8
# 2.0.2-1: 23/jul/2006 by Eric Hameleers <alien@slackware.com>
# * New release.
+# 2.1.1-1: 22/aug/2006 by Eric Hameleers <alien@slackware.com>
+# * New release.
#
#
# Run 'sh SlackBuild --cleanup' to build a Slackware package.
@@ -47,15 +49,25 @@ if [ "$TMP" = "" ]; then
fi
PRGNAM=vde
-VERSION=2.0.2
+VERSION=2.1.1
ARCH=${ARCH:-i486}
BUILD=1
CVS=no
+SOURCE="${PRGNAM}2-${VERSION}.tar.bz2"
+SRCURL="http://dl.sourceforge.net/${PRGNAM}/${PRGNAM}2-${VERSION}.tar.bz2"
+
+# Slackware 11 and up need other option (gcc > 3.3.x)
+if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then
+ MOPT=tune
+else
+ MOPT=cpu
+fi
+
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -66,11 +78,32 @@ PKG=$TMP/package-$PRGNAM
if [ ! -d $TMP/tmp-$PRGNAM ]; then
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+elif [ "$1" != "--oldbuild" ]; then
+ # If the "--oldbuild" parameter is present, we keep
+ # the old build files and continue;
+ # By default we remove the remnants of previous build and continue:
+ rm -rf $TMP/tmp-$PRGNAM/*
fi
+
if [ ! -d $PKG ]; then
mkdir -p $PKG # place for the package to be built
fi
+if ! [ -f ${CWD}/${SOURCE} ]; then
+ if ! [ "${SRCURL}" = "" ]; then
+ echo "Source '${SOURCE}' not available yet... will download now:"
+ wget -nv -O "${CWD}/${SOURCE}" "${SRCURL}"
+ if [ $? -ne 0 ]; then
+ echo "Downloading '${SOURCE}' failed... aborting the build."
+ mv ${CWD}/${SOURCE} ${CWD}/${SOURCE}.FAIL
+ exit 1
+ fi
+ else
+ echo "File '${SOURCE}' not available... aborting the build."
+ exit 1
+ fi
+fi
+
# --- PACKAGE BUILDING ---
@@ -92,21 +125,16 @@ cd $TMP/tmp-$PRGNAM
# --- TARBALL EXTRACTION,PATCH,MODIFY ---
-echo "Extracting the program tarball for $PRGNAM..."
-if [ -f $CWD/${PRGNAM}-${VERSION}.tar.gz ]; then
- tar -xzvf $CWD/${PRGNAM}-${VERSION}.tar.gz
-elif [ -f $CWD/${PRGNAM}-${VERSION}.tar.bz2 ]; then
- tar -xjvf $CWD/${PRGNAM}-${VERSION}.tar.bz2
-elif [ -f $CWD/${PRGNAM}-${VERSION}.tgz ]; then
- tar -xzvf $CWD/${PRGNAM}-${VERSION}.tgz
+echo "Extracting the program tarball(s) for $PRGNAM..."
+if `file $CWD/${SOURCE} | grep -q ": bzip2"`; then
+ tar -xjvf $CWD/${SOURCE}
+elif `file $CWD/${SOURCE} | grep -qi ": zip"`; then
+ unzip $CWD/${SOURCE}
+else
+ tar -xzvf $CWD/${SOURCE}
fi
-cd ${PRGNAM}-${VERSION}
-# No longer needed with vde-1.5.9:
-#patch -p1 < $CWD/vde-DESTDIR.patch
-# The vde-2.0.1 solved the bug in 2.0.0 which prevented it to work with qemu:
-#(cd qemu && patch -p0 < $CWD/vde_vdeq.patch
-#)
+cd ${PRGNAM}2-${VERSION}
# Get rid of the references to /usr/local in vdetap output, man page
sed -i 's|local/lib|lib|g' vdetaplib/vdetap.c
@@ -120,11 +148,14 @@ chown -R root.root *
echo Building ...
# For the CVS snapshot:
-[ "$CVS" = "yes" ] && autoreconf --install
+[ "$CVS" = "yes" ] && CFLAGS="$SLKCFLAGS" autoreconf --install
+CFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
+ --datarootdir=/usr \
+ --datadir=/usr/share \
2>&1 | tee $CWD/configure-${PRGNAM}.log
make 2>&1 | tee $CWD/make-${PRGNAM}.log
@@ -152,19 +183,20 @@ fi
cp qemu/README README.qemu
cp bochs/README README.bochs
+cp libvdeplug/COPYING COPYING.libvdeplug
cp slirpvde/README README.slirpvde
cp uml/README README.uml
-DOCS="COPYING LICENSE README* VERSION qemu/qemu-vde-HOWTO \
+DOCS="COPYING* LICENSE README* VERSION qemu/qemu-vde-HOWTO \
$CWD/rc.vdenetwork $CWD/Using_VDE_with_QEMU_HOWTO.txt"
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS \
$PKG/usr/doc/$PRGNAM-$VERSION
-chmod -R -w $PKG/usr/doc/$PRGNAM-$VERSION/*
+chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
# Compress the man page(s)
-find $PKG/usr/man -type f -exec gzip -9f {} \;
+find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \;
# Strip binaries
( cd $PKG