aboutsummaryrefslogtreecommitdiff
path: root/graphics/djview4/djview4.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/djview4/djview4.SlackBuild')
-rw-r--r--graphics/djview4/djview4.SlackBuild59
1 files changed, 37 insertions, 22 deletions
diff --git a/graphics/djview4/djview4.SlackBuild b/graphics/djview4/djview4.SlackBuild
index 4f6daa9207b6..5ea593245547 100644
--- a/graphics/djview4/djview4.SlackBuild
+++ b/graphics/djview4/djview4.SlackBuild
@@ -1,11 +1,29 @@
#!/bin/sh
-# Slackware build script for djview4
-
-# Written by Murat D. Kadirov <banderols@gmail.com
+# Slackware build script for DjView4
+
+# Copyright 2008-2009 Murat D. Kadirov <banderols@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=djview4
-VERSION=${VERSION:-4.4}
+VERSION=${VERSION:-4.5}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -17,10 +35,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -38,17 +59,14 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# We don't want configure to think we're trying to build with qt3, so:
-unset QTDIR
-
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
- --infodir=/usr/info \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
@@ -56,7 +74,11 @@ make
make install DESTDIR=$PKG
# This plugin *should* work with Mozilla-based browsers
-mv $PKG/usr/lib/netscape $PKG/usr/lib/mozilla
+if [ "$ARCH" = "x86_64" ]; then
+ mv $PKG/usr/lib$LIBDIRSUFFIX/netscape $PKG/usr/lib$LIBDIRSUFFIX/mozilla
+else
+ mv $PKG/usr/lib/netscape $PKG/usr/lib/mozilla
+fi
mkdir -p $PKG/usr/share/{applications,pixmaps,}
cp $PKG/usr/share/djvu/djview4/desktop/*.desktop \
@@ -65,8 +87,10 @@ cp $PKG/usr/share/djvu/djview4/desktop/hi32-djview4.png \
$PKG/usr/share/pixmaps/djvulibre-djview4.png
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
( cd $PKG/usr/man
@@ -74,17 +98,8 @@ cp $PKG/usr/share/djvu/djview4/desktop/hi32-djview4.png \
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
-( cd $PKG
- # Remove 'special' files
- find . -name perllocal.pod \
- -o -name ".packlist" \
- -o -name "*.bs" \
- | xargs rm -f
-)
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYRIGHT COPYING INSTALL NEWS README* TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYRIGHT COPYING INSTALL NEWS README* TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -92,4 +107,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}