diff options
Diffstat (limited to '')
-rwxr-xr-x | source/l/json-c/json-c.SlackBuild (renamed from source/n/obexfs/obexfs.SlackBuild) | 57 |
1 files changed, 34 insertions, 23 deletions
diff --git a/source/n/obexfs/obexfs.SlackBuild b/source/l/json-c/json-c.SlackBuild index 05c9ceb32..528e4a0c0 100755 --- a/source/n/obexfs/obexfs.SlackBuild +++ b/source/l/json-c/json-c.SlackBuild @@ -1,9 +1,8 @@ -#!/bin/bash +#!/bin/sh -# Slackware build script for obexfs +# Slackware build script for json-c -# Copyright 2009 Robby Workman, Northport, Alabama, USA -# Copyright 2010 Patrick Volkerding, Sebeka, MN, USA +# Copyright 2015 Robby Workman, Tuscaloosa, Alabama, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -12,7 +11,7 @@ # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, @@ -23,28 +22,30 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PKGNAM=obexfs +PKGNAM=json-c VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-1} -NUMJOBS=${NUMJOBS:-" -j7 "} - # Automatically determine the architecture we're building on: +MARCH=$( uname -m ) if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) export ARCH=i486 ;; - arm*) export ARCH=arm ;; + case "$MARCH" in + i?86) export ARCH=i586 ;; + armv7hl) export ARCH=$MARCH ;; + arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$( uname -m ) ;; + *) export ARCH=$MARCH ;; esac fi +NUMJOBS=${NUMJOBS:-" -j7 "} + CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -61,15 +62,23 @@ rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf $PKGNAM-$VERSION -tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 -cd $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1 +cd $PKGNAM-$VERSION || exit 1 chown -R root:root . -find . \ - \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Either of these approaches will solve the set but unused variable issue +# Pick one :-) +# Drop -Werror +#sed -i 's|-Werror ||g' Makefile.am.inc +zcat $CWD/unset-vars-build-fix.diff.gz | patch -p1 || exit 1 + +autoreconf -vif + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -77,19 +86,21 @@ CXXFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ + --disable-static \ --mandir=/usr/man \ - --build=$ARCH-slackware-linux + --docdir=/usr/doc/$PKGNAM-$VERSION \ + --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ - AUTHORS COPYING* INSTALL NEWS README* \ - $PKG/usr/doc/$PKGNAM-$VERSION + AUTHORS COPYING* NEWS README* doc/html \ + $PKG/usr/doc/$PKGNAM-$VERSION # 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: |