summaryrefslogtreecommitdiff
path: root/system/numlockx/numlockx.SlackBuild
diff options
context:
space:
mode:
authorMenno Duursma <druiloor@zonnet.nl>2010-05-12 17:45:35 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 17:45:35 +0200
commit6fed33e55a2c565398f688f36b37d8c1bba061bc (patch)
treefa150a0e668e41f7cfe5f31929d2ddcb1a49c77c /system/numlockx/numlockx.SlackBuild
parent4302fa55794dfd0953c3b287fb10d8b80fa912a2 (diff)
downloadslackbuilds-6fed33e55a2c565398f688f36b37d8c1bba061bc.tar.gz
system/numlockx: Updated for version 1.1
Diffstat (limited to 'system/numlockx/numlockx.SlackBuild')
-rw-r--r--system/numlockx/numlockx.SlackBuild63
1 files changed, 30 insertions, 33 deletions
diff --git a/system/numlockx/numlockx.SlackBuild b/system/numlockx/numlockx.SlackBuild
index e81e4fbdfa..99d96d551a 100644
--- a/system/numlockx/numlockx.SlackBuild
+++ b/system/numlockx/numlockx.SlackBuild
@@ -2,71 +2,68 @@
# Slackware build script for NumLockX
-# Copyright 2007 Frank Caraballo <fecaraballo[AT]gmail.com>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Written by Menno Duursma <druiloor@zonnet.nl>
-# Modified by the SlackBuilds.org project
-
-set -e
+# This program is free software. It comes without any warranty.
+# Granted WTFPLv2, as published by Sam Hocevar dec'04.
+# For details see http://sam.zoy.org/wtfpl/COPYING
PRGNAM=numlockx
-VERSION=1.1
+VERSION=${VERSION:-1.1}
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-PDOCS="AUTHORS ChangeLog INSTALL LICENSE README TODO"
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
+set -e # Exit on most errors
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xvf $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" \
+CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
- --x-includes=/usr/include \
- --x-libraries=/usr/lib
+ --mandir=/usr/man \
+ --x-libraries="/usr/lib/X11" \
+ --x-includes="/usr/include/X11" \
+ --build=$ARCH-slackware-linux
make
-make install-strip DESTDIR=$PKG
+make install DESTDIR=$PKG
+
+# help2man --no-info numlockx > numlockx.1
+mkdir -p $PKG/usr/man/man1
+gzip -9c $CWD/numlockx.1 > $PKG/usr/man/man1/numlockx.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $PDOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS ChangeLog INSTALL LICENSE README TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc