summaryrefslogtreecommitdiffstats
path: root/source.local/ap/mc/mc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source.local/ap/mc/mc.SlackBuild')
-rwxr-xr-xsource.local/ap/mc/mc.SlackBuild86
1 files changed, 52 insertions, 34 deletions
diff --git a/source.local/ap/mc/mc.SlackBuild b/source.local/ap/mc/mc.SlackBuild
index 84e06f2..44004a9 100755
--- a/source.local/ap/mc/mc.SlackBuild
+++ b/source.local/ap/mc/mc.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,33 +23,36 @@
# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
-VERSION=${VERSION:-$(echo mc-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+PKGNAM=mc
+VERSION=${VERSION:-4.8.4}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
-# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
-if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
-fi
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
else
- SLKCFLAGS="-O2"
+ # Automatically determine the architecture we're building on:
+ if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ else
+ SLKCFLAGS="-O2"
+ fi
fi
case "$ARCH" in
@@ -59,14 +62,14 @@ esac
CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=$TMP/package-mc
+PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
mkdir -p $TMP $PKG/usr
cd $TMP
-rm -rf mc-$VERSION
-tar xvf $CWD/mc-$VERSION.tar.xz || exit 1
-cd mc-$VERSION || exit 1
+rm -rf ${PKGNAM}-$VERSION
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.xz || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -74,8 +77,11 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix tmp path for saving files:
+zcat $CWD/mc.save.file.diff.gz | patch -p1 --verbose || exit 1
+
# Use geeqie instead of gqview as an external image viewer:
-zcat $CWD/mc.ext.in.geeqie.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/mc.image.sh.geeqie.diff.gz | patch -p1 --verbose || exit 1
if [ ! -x ./configure ]; then
./autogen.sh
@@ -87,7 +93,7 @@ CFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--mandir=/usr/man \
--localstatedir=/var \
- --docdir=/usr/doc/mc-$VERSION \
+ --docdir=/usr/doc/${PKGNAM}-$VERSION \
--enable-extcharset \
--enable-netcode \
--enable-background \
@@ -117,17 +123,29 @@ cp -a $CWD/profile.d/mc.* $PKG/etc/profile.d
chown root:root $PKG/etc/profile.d/*
chmod 755 $PKG/etc/profile.d/*
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
-mkdir -p $PKG/usr/doc/mc-$VERSION
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS doc/COPYING* doc/FAQ doc/HACKING doc/INSTALL doc/MAINTAINERS doc/NEWS doc/README* doc/TODO \
- $PKG/usr/doc/mc-$VERSION
+ $PKG/usr/doc/$PKGNAM-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/mc-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz