aboutsummaryrefslogtreecommitdiff
path: root/office/epdfview/epdfview.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/epdfview/epdfview.SlackBuild')
-rw-r--r--office/epdfview/epdfview.SlackBuild39
1 files changed, 26 insertions, 13 deletions
diff --git a/office/epdfview/epdfview.SlackBuild b/office/epdfview/epdfview.SlackBuild
index 7ff0f29e32433..afdf7fabd69ee 100644
--- a/office/epdfview/epdfview.SlackBuild
+++ b/office/epdfview/epdfview.SlackBuild
@@ -37,19 +37,22 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2"
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvjf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
@@ -59,32 +62,42 @@ find . \
-exec chmod 644 {} \;
# Add patch to fix mouse-scrolling in 0.1.7
-patch -Np0 -i $CWD/mouse-scroll-fix.patch
+patch -p0 < $CWD/mouse-scroll-fix.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
# Add some default icons
install -d $PKG/usr/share/icons/hicolor/{24x24,32x32,48x48}/apps
-install -m644 data/icon_epdfview-24.png "$PKG/usr/share/icons/hicolor/24x24/apps/epdfview.png"
-install -m644 data/icon_epdfview-32.png "$PKG/usr/share/icons/hicolor/32x32/apps/epdfview.png"
-install -m644 data/icon_epdfview-48.png "$PKG/usr/share/icons/hicolor/48x48/apps/epdfview.png"
+install -m644 data/icon_epdfview-24.png \
+ $PKG/usr/share/icons/hicolor/24x24/apps/epdfview.png
+install -m644 data/icon_epdfview-32.png \
+ $PKG/usr/share/icons/hicolor/32x32/apps/epdfview.png
+install -m644 data/icon_epdfview-48.png \
+ $PKG/usr/share/icons/hicolor/48x48/apps/epdfview.png
+
+# Fix path to icons in .desktop file
+sed -i 's#Icon=icon_epdfview-48#Icon=epdfview#' \
+ $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING INSTALL NEWS README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# Fix path to icons in .desktop file
-sed -i 's#Icon=icon_epdfview-48#Icon=epdfview#' $PKG/usr/share/applications/$PRGNAM.desktop
-
mkdir -p $PKG/install
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}