aboutsummaryrefslogtreecommitdiff
path: root/system/iscan/iscan.SlackBuild
diff options
context:
space:
mode:
authorFrank Caraballo <fecaraballo{at}gmail{dot}com>2010-05-11 19:46:30 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 19:46:30 +0200
commit5cd991c2e598d439026f6ca12a3c3428eb65c158 (patch)
tree5b7729658d674ad49d08114f5dd3daf200755014 /system/iscan/iscan.SlackBuild
parent010bed7991ab9cd5de345c89e8e0e2b0419cf9df (diff)
system/iscan: Updated for version 2.10.0
Diffstat (limited to 'system/iscan/iscan.SlackBuild')
-rw-r--r--system/iscan/iscan.SlackBuild51
1 files changed, 29 insertions, 22 deletions
diff --git a/system/iscan/iscan.SlackBuild b/system/iscan/iscan.SlackBuild
index 832495abcaa58..656caf72f7a35 100644
--- a/system/iscan/iscan.SlackBuild
+++ b/system/iscan/iscan.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for Iscan
-# Copyright 2007 MagicMan <MagicMan07@bluebottle.com>
+# Copyright 2007-2008 Frank Caraballo <fecaraballo{at}gmail{dot}com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,23 +22,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-if [ "$(id -u)" != "0" ]; then
- echo "This script must be run as root!"
- exit 1
-fi
-
PRGNAM=iscan
-VERSION=2.6.0
+VERSION=2.10.0
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-CWD=`pwd`
+
+CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-PDOCS="ABOUT-NLS AUTHORS ChangeLog COPYING COPYING.LIB \
- INSTALL NEWS README non-free/EAPL.en.txt"
+DOCS="ABOUT-NLS AUTHORS ChangeLog COPYING* INSTALL NEWS README non-free/EAPL.en.txt"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -50,27 +45,36 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
-tar -xvf $CWD/$PRGNAM-$VERSION-0.c2.tar.* || exit 1
+tar xvf $CWD/${PRGNAM}_$VERSION-1.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+# This program will not build unless static is enabled.
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
+ --mandir=/usr/man \
+ --program-prefix="" \
+ --program-suffix="" \
+ --enable-shared=yes \
+ --enable-static=yes \
|| exit 1
make || exit 1
make install-strip DESTDIR=$PKG || exit 1
-# Include files that are needed for Iscan to work properly:
-mkdir -p $PKG/etc/{hotplug/usb,sane.d}
-cp -a utils/hotplug/* $PKG/etc/hotplug/usb
-cp -a backend/epkowa.conf $PKG/etc/sane.d
+# Add configuration file:
+mkdir -p $PKG/etc/sane.d
+install -m 0644 backend/epkowa.conf $PKG/etc/sane.d || exit 1
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
@@ -78,18 +82,21 @@ cp -a backend/epkowa.conf $PKG/etc/sane.d
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $PDOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+
+mkdir -p $PKG/usr/share/applications
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-# Remove empty directory:
-rm -rf $PKG/usr/include
+( cd $PKG
+ find . -type d -depth -exec rmdir {} \; 2>/dev/null
+ find . -type f -size 0c -exec rm {} \; 2>/dev/null
+)
mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
-mkdir -p $PKG/usr/share/applications
-cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-
cd $PKG
/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz