diff options
Diffstat (limited to '')
-rwxr-xr-x | source/l/libdiscid/libdiscid.SlackBuild (renamed from source/l/libgtkhtml/libgtkhtml.SlackBuild) | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/source/l/libgtkhtml/libgtkhtml.SlackBuild b/source/l/libdiscid/libdiscid.SlackBuild index c22966fd3..f30ed7bf8 100755 --- a/source/l/libgtkhtml/libgtkhtml.SlackBuild +++ b/source/l/libdiscid/libdiscid.SlackBuild @@ -1,6 +1,7 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2010 Eric Hameleers, Eindhoven, NL +# Copyright 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,19 +22,26 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PKGNAM=libgtkhtml -VERSION=${VERSION:-2.11.1} -ARCH=${ARCH:-x86_64} -NUMJOBS=${NUMJOBS:-" -j7 "} -BUILD=${BUILD:-2} - +PKGNAM=libdiscid +VERSION=${VERSION:-0.2.2} +BUILD=${BUILD:-1} CWD=$(pwd) TMP=${TMP:-/tmp} -PKG=$TMP/package-${PKGNAM} +PKG=$TMP/package-$PKGNAM rm -rf $PKG mkdir -p $TMP $PKG +# 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 + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" @@ -43,20 +51,23 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi cd $TMP rm -rf ${PKGNAM}-${VERSION} -tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1 -cd ${PKGNAM}-$VERSION +tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1 +cd ${PKGNAM}-$VERSION || exit 1 # Make sure ownerships and permissions are sane: chown -R root:root . find . \ - \( -perm 777 -o -perm 775 -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 {} \; + \( -perm 777 -o -perm 775 -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 {} \; # Configure: CFLAGS="$SLKCFLAGS" \ @@ -64,12 +75,10 @@ CFLAGS="$SLKCFLAGS" \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ - --localstatedir=/var/lib \ - --mandir=/usr/man \ --disable-static \ + --mandir=/usr/man \ --program-prefix= \ --program-suffix= \ - --disable-accessibility \ --build=$ARCH-slackware-linux # Build and install: @@ -77,8 +86,8 @@ make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 # Strip binaries: -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 # Compress and link manpages, if any: if [ -d $PKG/usr/man ]; then @@ -95,23 +104,15 @@ if [ -d $PKG/usr/man ]; then ) fi -# Compress info files, if any: -if [ -d $PKG/usr/info ]; then - ( cd $PKG/usr/info - rm -f dir - gzip -9 * - ) -fi - # Add a documentation directory: mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION cp -a \ - AUTHORS COPYING.LIB INSTALL NEWS README TODO docs/IDEAS \ + AUTHORS COPYING ChangeLog README \ $PKG/usr/doc/${PKGNAM}-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz |