mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-05 00:55:44 +01:00
b6b4c16515
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
70 lines
1.7 KiB
Bash
70 lines
1.7 KiB
Bash
#!/bin/sh
|
|
|
|
# Slackware build script for cups-pdf
|
|
# Written by Sebastien Ballet (phenixi@aliceadsl.fr)
|
|
# Modified by SlackBuilds.org
|
|
|
|
PRGNAM=cups-pdf
|
|
VERSION=${VERSION:-3.0beta1}
|
|
BUILD=${BUILD:-1}
|
|
TAG=${TAG:-_SBo}
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
case "$( uname -m )" in
|
|
i?86) ARCH=i486 ;;
|
|
arm*) ARCH=arm ;;
|
|
*) ARCH=$( uname -m ) ;;
|
|
esac
|
|
fi
|
|
|
|
CWD=$(pwd)
|
|
TMP=${TMP:-/tmp/SBo}
|
|
PKG=$TMP/package-$PRGNAM
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
set -e
|
|
|
|
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"
|
|
else
|
|
SLKCFLAGS="-O2"
|
|
LIBDIRSUFFIX=""
|
|
fi
|
|
|
|
rm -rf $PKG
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
cd $TMP
|
|
rm -rf $PRGNAM-$VERSION
|
|
tar -xvf $CWD/$PRGNAM'_'$VERSION.tar.gz
|
|
cd $PRGNAM-$VERSION
|
|
chown -R root:root .
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/cups/backend
|
|
gcc $SLCKFLAGS -s -lcups -o $PKG/usr/lib${LIBDIRSUFFIX}/cups/backend/cups-pdf src/cups-pdf.c
|
|
|
|
chmod 0700 $PKG/usr/lib${LIBDIRSUFFIX}/cups/backend/cups-pdf
|
|
|
|
mkdir -p $PKG/etc/cups
|
|
cat extra/cups-pdf.conf > $PKG/etc/cups/cups-pdf.conf.new
|
|
|
|
mkdir -p $PKG/usr/share/cups/model
|
|
cp -a extra/CUPS-PDF_opt.ppd $PKG/usr/share/cups/model/CUPS-PDF.ppd
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
cp -a COPYING ChangeLog README $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}
|