summaryrefslogtreecommitdiff
path: root/desktop/slock/slock.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/slock/slock.SlackBuild')
-rw-r--r--desktop/slock/slock.SlackBuild47
1 files changed, 26 insertions, 21 deletions
diff --git a/desktop/slock/slock.SlackBuild b/desktop/slock/slock.SlackBuild
index 0f31887c72..4b100b2832 100644
--- a/desktop/slock/slock.SlackBuild
+++ b/desktop/slock/slock.SlackBuild
@@ -1,21 +1,33 @@
#!/bin/sh
-
# Slackware build script for slock
-# Written by Grigorios Bouzakis (grbzks@gmail.com)
-# Modified by Robby Workman <rworkman@slackbuilds.org>
+# Copyright 2007-2012 Grigorios Bouzakis <grbzks@imap.cc>
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for any purpose
+# with or without fee is hereby granted, provided that the above copyright
+# notice and this permission notice appear in all copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
+# AUTHORS AND COPYRIGHT HOLDERS AND THEIR CONTRIBUTORS 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.
PRGNAM=slock
-VERSION=${VERSION:-0.9}
+VERSION=${VERSION:-1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -39,6 +51,8 @@ else
LIBDIRSUFFIX=""
fi
+DOCS="LICENSE README"
+
set -e
rm -rf $PKG
@@ -57,26 +71,17 @@ find . \
# This uses our CFLAGS defined above
sed "s/@SLACKCFLAGS@/$SLKCFLAGS/" $CWD/config.mk.patch | patch -p1
-# This makes slock requires sgid shadow instead of suid root
-patch -p1 < $CWD/slock-use_shadow_group.patch
-
-make \
- PREFIX=/usr \
- X11INC=/usr/include/X11 \
- X11LIB=/usr/lib${LIBDIRSUFFIX}/X11
+make PREFIX=/usr X11INC=/usr/include/X11 X11LIB=/usr/lib${LIBDIRSUFFIX}/X11
+make install PREFIX=/usr X11INC=/usr/include/X11 X11LIB=/usr/lib${LIBDIRSUFFIX}/X11 DESTDIR=$PKG
-make install \
- PREFIX=/usr \
- X11INC=/usr/include/X11 \
- X11LIB=/usr/lib${LIBDIRSUFFIX}/X11 \
- DESTDIR=$PKG
-
-strip --strip-unneeded $PKG/usr/bin/slock
chown root:shadow $PKG/usr/bin/slock
chmod 2755 $PKG/usr/bin/slock
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install