summaryrefslogtreecommitdiffstats
path: root/source/ap/nano/nano.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/nano/nano.SlackBuild')
-rwxr-xr-xsource/ap/nano/nano.SlackBuild28
1 files changed, 25 insertions, 3 deletions
diff --git a/source/ap/nano/nano.SlackBuild b/source/ap/nano/nano.SlackBuild
index c6e3c3ade..0f9e114c6 100755
--- a/source/ap/nano/nano.SlackBuild
+++ b/source/ap/nano/nano.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
PKGNAM=nano
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -39,12 +39,24 @@ fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ ARCHQUADLET=""
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET="-gnueabi"
else
SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
fi
CWD=$(pwd)
@@ -80,7 +92,8 @@ CFLAGS="$SLKCFLAGS" \
--enable-nanorc \
--enable-all \
--enable-utf8 \
- --build=$ARCH-slackware-linux
+ --disable-wrapping-as-root \
+ --build=$ARCH-slackware-linux$ARCHQUADLET || exit 1
# Build and install:
make $NUMJOBS || make || exit 1
@@ -113,6 +126,13 @@ if [ -d $PKG/usr/info ]; then
)
fi
+# Install a default /etc/nanorc file. This is the standard sample
+# file from the doc directory that loads the colour configurations
+# from /usr/share/nano.
+mkdir -vpm755 $PKG/etc
+sed 's?^# include?include?g' doc/nanorc.sample > $PKG/etc/nanorc.new
+chmod 644 $PKG/etc/nanorc.new
+
# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
@@ -128,8 +148,10 @@ if [ -r ChangeLog ]; then
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
+# Place the package description and installation script:
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz