aboutsummaryrefslogtreecommitdiff
path: root/office/leafpad/leafpad.SlackBuild
diff options
context:
space:
mode:
authorGrigorios Bouzakis <grbzks@gmail.com>2010-05-12 17:44:46 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 17:44:46 +0200
commit0c4a3cc8d0a9aa74b2aeeb0f6421557b8a75482b (patch)
tree76702108db65ee2bcdf073614029d25463e49d58 /office/leafpad/leafpad.SlackBuild
parent836ae015207bdbb9a2030d425db95aa1003a1885 (diff)
office/leafpad: Updated for version 0.8.16
Diffstat (limited to 'office/leafpad/leafpad.SlackBuild')
-rw-r--r--office/leafpad/leafpad.SlackBuild32
1 files changed, 21 insertions, 11 deletions
diff --git a/office/leafpad/leafpad.SlackBuild b/office/leafpad/leafpad.SlackBuild
index 831592fa1998..365c03896da8 100644
--- a/office/leafpad/leafpad.SlackBuild
+++ b/office/leafpad/leafpad.SlackBuild
@@ -1,52 +1,62 @@
#!/bin/sh
# Slackware build script for leafpad
-# Written by Grigorios Bouzakis (grbzks@gmail.com)
-# Slightly modified by the SlackBuilds.org project
-set -e
+# Written by Grigorios Bouzakis (grbzks@gmail.com)
PRGNAM=leafpad
-VERSION=0.8.11
+VERSION=${VERSION:-0.8.16}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
+DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README"
+
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --enable-chooser
+ --enable-chooser \
+ --build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | 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
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install