summaryrefslogtreecommitdiffstats
path: root/source/ap/nano
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2012-09-26 01:10:42 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:51:55 +0200
commit9664bee729d487bcc0a0bc35859f8e13d5421c75 (patch)
treeb428a16618e36ed864a8d76ea3435e19a452bf90 /source/ap/nano
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.gz
current-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.xz
Slackware 14.0slackware-14.0
Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-)
Diffstat (limited to 'source/ap/nano')
-rw-r--r--source/ap/nano/doinst.sh13
-rwxr-xr-xsource/ap/nano/nano.SlackBuild28
2 files changed, 38 insertions, 3 deletions
diff --git a/source/ap/nano/doinst.sh b/source/ap/nano/doinst.sh
new file mode 100644
index 000000000..3cd3405f7
--- /dev/null
+++ b/source/ap/nano/doinst.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/nanorc.new
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