diff options
author | Eric Hameleers <alien@slackware.com> | 2015-06-08 13:13:27 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2015-06-08 13:13:27 +0000 |
commit | dc6c50281c74e7b535170f0b9e75924c64c4b959 (patch) | |
tree | 0bfebb07fee5291fc3b58ffd9aa8ded3e4468dc8 /nspluginwrapper/build/nspluginwrapper.SlackBuild | |
parent | df3229225fe5126083037aac94b527395216bae4 (diff) | |
download | asb-dc6c50281c74e7b535170f0b9e75924c64c4b959.tar.gz asb-dc6c50281c74e7b535170f0b9e75924c64c4b959.tar.xz |
nspluginwrapper: updated to 928c322_20111229git snapshot.
Diffstat (limited to 'nspluginwrapper/build/nspluginwrapper.SlackBuild')
-rwxr-xr-x | nspluginwrapper/build/nspluginwrapper.SlackBuild | 73 |
1 files changed, 47 insertions, 26 deletions
diff --git a/nspluginwrapper/build/nspluginwrapper.SlackBuild b/nspluginwrapper/build/nspluginwrapper.SlackBuild index c20a6d46..f6d4ec04 100755 --- a/nspluginwrapper/build/nspluginwrapper.SlackBuild +++ b/nspluginwrapper/build/nspluginwrapper.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2009 Eric Hameleers <alien@slackware.com> +# Copyright 2009, 2015 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -26,12 +26,15 @@ # =========================== # By: Eric Hameleers <alien@slackware.com> # For: nspluginwrapper -# Descr: compatibility plugin for Netscape 4 (NPAPI) plugins -# URL: http://gwenole.beauchesne.info/en/projects/nspluginwrapper -# Needs: +# Descr: compatibility plugin for NPAPI plugins +# URL: http://nspluginwrapper.org +# Needs: multilib gcc & glibc (64-bit OS only). # Changelog: # 1.2.2-1: 06/Sep/2009 by Eric Hameleers <alien@slackware.com> # * Initial build. +# 928c322_20111229git-1: +# 06/jun/2015 by Eric Hameleers <alien@slackware.com> +# * Update, mainly because ICAClient requires it. # # Run 'sh nspluginwrapper.SlackBuild' to build a Slackware package. # The package (.tgz) and .txt file as well as build logs are created in /tmp . @@ -42,13 +45,12 @@ # Set initial variables: PRGNAM=nspluginwrapper -VERSION=${VERSION:-1.2.2} -ARCH=${ARCH:-x86_64} +VERSION=${VERSION:-928c322_20111229git} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:" -j4 "} TAG=${TAG:-alien} -DOCS="COPYING ChangeLog NEWS README TODO" +DOCS="COPYING ChangeLog* NEWS README TODO" # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) @@ -58,20 +60,25 @@ TMP=${TMP:-/tmp/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.bz2" -SRCURL="http://gwenole.beauchesne.info/projects/${PRGNAM}/files/${PRGNAM}-${VERSION}.tar.bz2" +SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz" +# Stable releases here: +#SRCURL="https://github.com/davidben/nspluginwrapper/archive/${PRGNAM}-${VERSION}.tar.gz" +SRCURL="" ## ## --- with a little luck, you won't have to edit below this point --- ## ## -# Exit the script on errors: -set -e -trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR -# Catch unitialized variables: -set -u -P1=${1:-1} - +# Automatically determine the architecture we're building on: +MARCH=$( uname -m ) +if [ -z "$ARCH" ]; then + case "$MARCH" in + i?86) export ARCH=i486 ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$MARCH ;; + esac +fi +# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: case "$ARCH" in i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" @@ -81,23 +88,37 @@ case "$ARCH" in SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" ARCHOPT="--enable-biarch --with-lib32=lib --with-lib64=lib64" ;; + *) echo "Unsupported architecture '$ARCH'"; exit 1 + ;; esac +# Exit the script on errors: +set -e +trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR +# Catch unitialized variables: +set -u +P1=${1:-1} + +# Save old umask and set to 0022: +_UMASK_=$(umask) +umask 0022 + # Create working directories: mkdir -p $OUTPUT # place for the package to be saved mkdir -p $TMP/tmp-$PRGNAM # location to build the source mkdir -p $PKG # place for the package to be built rm -rf $PKG/* # always erase old package's contents rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build -rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log +rm -rf $OUTPUT/{checkout,configure,make,install,error,makepkg,patch}-$PRGNAM.log # remove old log files # Source file availability: if ! [ -f ${SOURCE} ]; then + echo "Source '$(basename ${SOURCE})' not available yet..." + # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT + [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" + if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL}" == "x" ]; then - # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT - [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" - echo "Source '$(basename ${SOURCE})' not available yet..." echo "Will download file to $(dirname $SOURCE)" wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then @@ -127,7 +148,7 @@ echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE} cd ${PRGNAM}-${VERSION} chown -R root:root . -chmod -R u+w,go+r-w,a-s . +chmod -R u+w,go+r-w,a+rX-st . echo Building ... LDFLAGS="$SLKLDFLAGS" \ @@ -135,6 +156,7 @@ CXXFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --pkglibdir=/usr/lib${LIBDIRSUFFIX}/${PRGNAM} \ $ARCHOPT \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log @@ -144,11 +166,7 @@ make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -cat $SRCDIR/$(basename $0) | sed \ - -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \ - -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \ - -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \ - > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; @@ -174,3 +192,6 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt +# Restore the original umask: +umask ${_UMASK_} + |