diff options
Diffstat (limited to '')
-rwxr-xr-x | extra/source/emacspeak/emacspeak.SlackBuild (renamed from source/kde/mplayerthumbs/mplayerthumbs.SlackBuild) | 79 |
1 files changed, 54 insertions, 25 deletions
diff --git a/source/kde/mplayerthumbs/mplayerthumbs.SlackBuild b/extra/source/emacspeak/emacspeak.SlackBuild index 959802729..3235c94c5 100755 --- a/source/kde/mplayerthumbs/mplayerthumbs.SlackBuild +++ b/extra/source/emacspeak/emacspeak.SlackBuild @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2008, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,11 +22,19 @@ CWD=$(pwd) -PKGNAM=mplayerthumbs -VERSION=${VERSION:-1.2} -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-2} -NUMJOBS=${NUMJOBS:--j4} +PKGNAM=emacspeak +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} + +# 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 [ "$TMP" = "" ]; then TMP=/tmp @@ -42,13 +50,15 @@ elif [ "$ARCH" = "i486" ]; then elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-O2" +else + SLKCFLAGS="-O2" fi cd $TMP rm -rf ${PKGNAM}-${VERSION} -tar xvf $CWD/${PKGNAM}-$VERSION.tar.gz -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 . @@ -64,19 +74,30 @@ find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; -mkdir -p build -cd build - cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DMAN_INSTALL_DIR=/usr/man \ - -DSYSCONF_INSTALL_DIR=/etc/kde \ - .. - make $NUMJOBS || exit 1 - make install DESTDIR=$PKG || exit 1 -cd - +# Patch to use Tcl 8.5: +zcat $CWD/emacspeak-32.0.tcl8.5.diff.gz | patch -p1 || exit 1 + +# Compile the main program against Emacs: +make config +make emacspeak + +# Install: +make prefix=$PKG/usr install || exit 1 + +# Build the linux-outload server: +( cd $PKG/usr/share/emacs/site-lisp/emacspeak/servers/linux-outloud + CFLAGS="$SLKCFLAGS" make + rm -f *.o +) + +# Fix path in emacspeak: +( cd $PKG/usr/bin + cat emacspeak | sed -e "s/\/tmp\/package-emacspeak//" > $TMP/emacspeak-filtered + cat $TMP/emacspeak-filtered > emacspeak + rm -f $TMP/emacspeak-filtered +) + +mv $PKG/usr/share/info $PKG/usr # Strip binaries: ( cd $PKG @@ -109,9 +130,17 @@ fi # Add a documentation directory: mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION -cp -a \ - AUTHORS COPYING* ChangeLog INSTALL NEWS README* TODO \ - $PKG/usr/doc/${PKGNAM}-$VERSION +( cd $PKG/usr/doc/${PKGNAM}-$VERSION + ln -sf /usr/share/emacs/site-lisp/emacspeak/etc . + ln -sf /usr/share/emacs/site-lisp/emacspeak/install-guide . + ln -sf /usr/share/emacs/site-lisp/emacspeak/user-guide . + ln -sf etc/COPYRIGHT . + ln -sf etc/FAQ . + ln -sf etc/HELP . + ln -sf etc/NEWS . + ln -sf etc/applications.html . + ln -sf etc/remote.txt . +) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |