diff options
Diffstat (limited to 'graphics/qelectrotech/qelectrotech.SlackBuild')
-rw-r--r-- | graphics/qelectrotech/qelectrotech.SlackBuild | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/graphics/qelectrotech/qelectrotech.SlackBuild b/graphics/qelectrotech/qelectrotech.SlackBuild index 080f4fab63..92c5d92bad 100644 --- a/graphics/qelectrotech/qelectrotech.SlackBuild +++ b/graphics/qelectrotech/qelectrotech.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for QElectroTech @@ -22,26 +22,37 @@ # 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=qelectrotech -VERSION=${VERSION:-0.6} +SRCNAM=qet +VERSION=${VERSION:-0.8.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; 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} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -59,9 +70,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION-src -tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz -cd $PRGNAM-$VERSION-src +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION sed -i s,usr\/local,usr,g qelectrotech.pro sed -i s,..\/share\/mime\/,share\/mime\/,g qelectrotech.pro @@ -143,4 +154,4 @@ GenericName[it_IT]=Un programma per disegnare schemi elettrici EOF 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 |