summaryrefslogtreecommitdiff
path: root/misc/recode/recode.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/recode/recode.SlackBuild')
-rw-r--r--misc/recode/recode.SlackBuild27
1 files changed, 20 insertions, 7 deletions
diff --git a/misc/recode/recode.SlackBuild b/misc/recode/recode.SlackBuild
index 7c5cafa4c4..c8063e50ae 100644
--- a/misc/recode/recode.SlackBuild
+++ b/misc/recode/recode.SlackBuild
@@ -8,6 +8,8 @@
# Modified by Robby Workman <rworkman@slackbuilds.org>
# Further small mods by Richard Hoyle <hoyle.richard@gmail.com>
+# Updating and testing for Slackware 13 (including x86_64 and Multilib)
+# by Chris Abela <chris.abela>
PRGNAM=recode
VERSION=3.6
@@ -22,8 +24,13 @@ 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"
fi
set -e
@@ -46,19 +53,25 @@ for patch in $CWD/patches/* ; do
bzcat $patch | patch -p1 --verbose --backup || exit 1
done
+# libdir and target are critical for x86_64
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --enable-static=no
+ --enable-static=no \
+ --libdir=/usr/lib"$LIBDIRSUFFIX" \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux \
+ --target=$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 || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
+chown -R root:root .
+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 {} \;
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
@@ -77,4 +90,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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}