diff options
Diffstat (limited to 'libraries/allegro/allegro.SlackBuild')
-rw-r--r-- | libraries/allegro/allegro.SlackBuild | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/libraries/allegro/allegro.SlackBuild b/libraries/allegro/allegro.SlackBuild index 6ad7d5af6c..4201cdc093 100644 --- a/libraries/allegro/allegro.SlackBuild +++ b/libraries/allegro/allegro.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for allegro # Yth | Pont-en-Royans, France | yth@ythogtha.org # Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org @@ -23,11 +23,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=allegro SRCNAM=allegro5 -VERSION=${VERSION:-5.2.5.0} +VERSION=${VERSION:-5.2.9.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -53,6 +63,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" @@ -85,6 +98,12 @@ cd build make install DESTDIR=$PKG cd .. +# Better handling of /usr/lib${LIBDIRSUFFIX} +[ ! -d "$PKG/usr/lib${LIBDIRSUFFIX}/cmake" ] && mv $PKG/usr/lib*/cmake $PKG/usr/lib${LIBDIRSUFFIX}/cmake +[ ! -d "$PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig" ] && mv $PKG/usr/lib*/pkgconfig $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig +# At least for x86_64 libs are copied into both usr/lib/ and usr/lib64/ +rm -rf $(ls -d $PKG/usr/lib* | grep -v "usr/lib${LIBDIRSUFFIX}") | true + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -96,4 +115,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |