diff options
Diffstat (limited to 'source.local/a/sdparm/sdparm.SlackBuild')
-rwxr-xr-x | source.local/a/sdparm/sdparm.SlackBuild | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/source.local/a/sdparm/sdparm.SlackBuild b/source.local/a/sdparm/sdparm.SlackBuild index 782344b..7254cc4 100755 --- a/source.local/a/sdparm/sdparm.SlackBuild +++ b/source.local/a/sdparm/sdparm.SlackBuild @@ -24,33 +24,35 @@ PKGNAM=sdparm -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +VERSION=${VERSION:-1.07} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:-"-j6"} -# Automatically determine the architecture we're building on: -MARCH=$( uname -m ) -if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i486 ;; - armv7hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; - esac -fi - -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2" -elif [ "$ARCH" = "armv7hl" ]; then - SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" +if [ -e $CWD/machine.conf ]; then + . $CWD/machine.conf ] +elif [ -e /etc/slackbuild/machine.conf ]; then + . /etc/slackbuild/machine.conf ] else - SLKCFLAGS="-O2" + # 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 + # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: + if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + else + SLKCFLAGS="-O2" + fi fi case "$ARCH" in |