diff options
Diffstat (limited to '')
-rwxr-xr-x | source/l/lcms2/lcms2.SlackBuild (renamed from pasture/source/gxine/gxine.SlackBuild) | 80 |
1 files changed, 44 insertions, 36 deletions
diff --git a/pasture/source/gxine/gxine.SlackBuild b/source/l/lcms2/lcms2.SlackBuild index 172d17aa2..e695b74b1 100755 --- a/pasture/source/gxine/gxine.SlackBuild +++ b/source/l/lcms2/lcms2.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,16 +20,24 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=0.5.905 +# Modified 2012 by Eric Hameleers <alien at slackware.com> + + +PKGNAM=lcms2 +VERSION=${VERSION:-2.3} 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=i486 ;; + 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 @@ -42,23 +50,30 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi -NUMJOBS=${NUMJOBS:-" -j7 "} +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac CWD=$(pwd) TMP=${TMP:-/tmp} -PKG=$TMP/package-gxine +PKG=$TMP/package-$PKGNAM + rm -rf $PKG mkdir -p $TMP $PKG cd $TMP -rm -rf gxine-$VERSION -tar xvf $CWD/gxine-$VERSION.tar.bz2 || exit 1 -cd gxine-$VERSION || exit 1 +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 +cd $PKGNAM-$VERSION chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -70,42 +85,35 @@ CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var/lib \ --mandir=/usr/man \ - --disable-static \ - --with-browser-plugin \ - --build=$ARCH-slackware-linux + --enable-static=no \ + --build=$TARGET make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 -#zcat $CWD/gxine.desktop.gz > $PKG/usr/share/applications/gxine.desktop -#if [ ! -r $PKG/usr/share/pixmaps/gxine.png ]; then -# exit 1 -#fi - -# I'm sorry, but making this link was the worst suggestion I ever -# went along with. I'll continue to include it (for now), but having -# (buggy) gxine pop up without prompting all the time is ANNOYING!!! -#mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins -#( cd $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins -# ln -sf /usr/lib${LIBDIRSUFFIX}/gxine/gxineplugin.so . -#) +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 +gzip -9 $PKG/usr/man/man?/*.? -find $PKG/usr/man -type f -exec gzip -9 {} \; - -mkdir -p $PKG/usr/doc/gxine-$VERSION +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ - ABOUT-NLS AUTHORS COPYING* INSTALL NEWS README TODO \ - $PKG/usr/doc/gxine-$VERSION + AUTHORS COPYING INSTALL NEWS README* doc \ + $PKG/usr/doc/$PKGNAM-$VERSION +find $PKG/usr/doc/$PKGNAM-$VERSION -type f -exec chmod 644 {} \; + +# 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: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $TMP/gxine-$VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz |