diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2010-05-19 08:58:23 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:43:05 +0200 |
commit | b76270bf9e6dd375e495fec92140a79a79415d27 (patch) | |
tree | 3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/n/iproute2/iproute2.SlackBuild | |
parent | 5a12e7c134274dba706667107d10d231517d3e05 (diff) | |
download | current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz |
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010
Slackware 13.1 x86_64 stable is released!
Lots of thanks are due -- see the RELEASE_NOTES and the rest of the
ChangeLog for credits. The ISOs are on their way to replication,
a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We are taking pre-orders now at store.slackware.com, and offering
a discount if you sign up for a subscription. Consider picking up
a copy to help support the project. Thanks again to the Slackware
community for testing, contributing, and generally holding us to a
high level of quality. :-)
Enjoy!
Diffstat (limited to 'source/n/iproute2/iproute2.SlackBuild')
-rwxr-xr-x | source/n/iproute2/iproute2.SlackBuild | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/source/n/iproute2/iproute2.SlackBuild b/source/n/iproute2/iproute2.SlackBuild index 2a97fd43..d9e8622c 100755 --- a/source/n/iproute2/iproute2.SlackBuild +++ b/source/n/iproute2/iproute2.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2005-2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2005-2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,20 @@ # Build this against 2.6.x kernel source and headers... -VERSION=2.6.29-1 -ARCH=${ARCH:-x86_64} -NUMJOBS=${NUMJOBS:-" -j7 "} -BUILD=${BUILD:-2} +VERSION=2.6.33 +BUILD=${BUILD:-1} + +#NUMJOBS=${NUMJOBS:-" -j7 "} + +# 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 if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -36,6 +46,9 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi CWD=$(pwd) @@ -49,16 +62,6 @@ rm -rf iproute2-$VERSION tar xvf $CWD/iproute2-$VERSION.tar.bz2 || exit 1 cd iproute2-$VERSION -# Fix up path to bdb -zcat $CWD/iproute2.dbpath.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 -# Fix up iptables lib path -zcat $CWD/iproute2.iptablespath.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 -if [ "$ARCH" = "x86_64" ]; then - sed -i -e "s#/lib/tc#/lib${LIBDIRSUFFIX}/tc#" $(grep -lr '/lib/tc' *) || exit 1 - sed -i -e "s#/usr/lib/#/usr/lib${LIBDIRSUFFIX}/#" include/iptables.h || exit 1 - sed -i -e "s#/usr/lib/#/usr/lib${LIBDIRSUFFIX}/#" tc/m_ipt.c || exit 1 -fi - chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -66,14 +69,23 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -export CFLAGS="$SLKCFLAGS" -make $NUMJOBS DOCDIR=doc/iproute2-$VERSION MANDIR=man/ || exit 1 +# Fix up path to bdb and iptables libs +zcat $CWD/iproute2-2.6.33-fixup_dbpath_and_iptablespath.diff.gz | sed \ + -e "s,@LIBDIR@,/usr/lib${LIBDIRSUFFIX},g" \ + -e "s,@VERSION@,$VERSION,g" | patch -p1 || exit 1 + +# Use our custom SLKCFLAGS +sed -i "s/-O2 /-O2 -fPIC /" Makefile + +./configure # This is okay, really :-) +make $NUMJOBS || exit 1 -# This doesn't embed any $TMP or $PKG paths in anything -# Have a look at what the Makefile does for why :) mkdir -p $PKG/usr -make install DOCDIR=doc/iproute2-$VERSION MANDIR=man/ DESTDIR=$PKG/usr/ \ - || exit 1 +make install LIBDIR=/usr/lib${LIBDIRSUFFIX} DESTDIR=$PKG/usr/ || exit 1 + +# I can't seem to make this go to the right place on x86_64, but all the +# relevant stuff looks correct :/ +[ "$ARCH" = "x86_64" ] && mv $PKG/usr/lib $PKG/usr/lib${LIBDIRSUFFIX} # This stuff has always been installed under /sbin rather than # /usr/sbin, as the latter could possibly be network-mounted, and @@ -96,6 +108,7 @@ done # Remove junk: [ -d $PKG/usr/usr ] && rm -r $PKG/usr/usr +[ -d $PKG/usr/var ] && rm -r $PKG/usr/var mkdir -p $PKG/var/lib/arpd |