Browse Source

d/binutils-mingw32: Cleaned up.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent
commit
a2bc359d71
  1. 18
      d/binutils-mingw32/binutils-mingw32.SlackBuild

18
d/binutils-mingw32/binutils-mingw32.SlackBuild

@ -30,11 +30,12 @@ VERSION=${VERSION:-2.19.1}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-src.tar.gz}
WGET=${WGET:-http://ovh.dl.sourceforge.net/mingw/$ARCHIVE}
# Built package infos
# Build infos
NAMETGZ=${NAMETGZ:-binutils-mingw32}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i686-pc-mingw32}
TARGET=${TARGET:-$ARCH-pc-mingw32}
JOBS=${JOBS:-1}
# Directories
TMP=${TMP:-/tmp}
@ -42,7 +43,7 @@ OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
set -e
# Sanity checks
if [ $UID -eq 0 ]; then
@ -59,6 +60,9 @@ case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
;;
*)
CPUOPT="-O2"
;;
@ -66,7 +70,9 @@ esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget "$WGET"
rm -f $ARCHIVE.part
wget -vc "$WGET" -O $ARCHIVE.part
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
@ -85,7 +91,7 @@ CFLAGS=$CPUOPT \
--with-gnu-ld \
--disable-nls \
--disable-debug
make -j 3
make -j $JOBS
make install DESTDIR=$PKG
# Strip binaries
@ -93,7 +99,7 @@ find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Delete man and info pages, since we already have those of
# the native binutils in /usr.
# the native binutils in /usr
rm -rf $PKG/opt/mingw32/{info,man}
# Copy slack-desc file

Loading…
Cancel
Save