2010-05-13 01:00:35 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for PDFedit
|
|
|
|
# written by <pedro@gepasi.org> and hereby put in the public domain
|
|
|
|
|
|
|
|
PRGNAM=pdfedit
|
2010-08-14 20:40:35 +02:00
|
|
|
VERSION=0.4.5
|
2012-09-26 00:50:55 +02:00
|
|
|
BUILD=${BUILD:-2}
|
2010-05-13 01:00:35 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
2010-06-04 07:14:55 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2010-05-13 01:00:35 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
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"
|
2010-06-04 07:14:55 +02:00
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-13 01:00:35 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
chown -R root:root .
|
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
|
|
|
# Add a good path for docbook.xsl
|
2010-08-14 20:40:35 +02:00
|
|
|
printf "/usr/share/xml/docbook/xsl-stylesheets-*/html\n" >> \
|
2010-05-13 01:00:35 +02:00
|
|
|
doc/tools/docbook_xslt_paths
|
|
|
|
|
2012-09-26 00:50:55 +02:00
|
|
|
# Patch for gcc 4.7.
|
|
|
|
patch -p0 -i $CWD/gcc47.patch
|
|
|
|
|
2010-05-13 01:00:35 +02:00
|
|
|
ARCH="" \
|
|
|
|
C_EXTRA="$SLKCFLAGS" \
|
|
|
|
CXX_EXTRA="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libdir=/usr/lib$LIBDIRSUFFIX \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
|
|
|
--enable-stack-protector \
|
|
|
|
--enable-release \
|
|
|
|
--enable-gui \
|
|
|
|
--disable-kernel-tests \
|
|
|
|
--disable-advanced-doc \
|
|
|
|
--enable-user-manual \
|
|
|
|
--enable-doxygen-doc \
|
|
|
|
--enable-pdfedit-core-dev \
|
|
|
|
--with-parallel-make=auto \
|
|
|
|
--with-root-dir=$PKG \
|
|
|
|
--with-qmake=/opt/kde3/bin/qmake
|
|
|
|
|
|
|
|
make install
|
|
|
|
|
|
|
|
( cd $PKG/usr/man
|
|
|
|
find . -type f -exec gzip -9 {} \;
|
|
|
|
for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
|
|
|
)
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/share/applications
|
|
|
|
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
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.${PKGTYPE:-tgz}
|