summaryrefslogtreecommitdiff
path: root/system/pmount/pmount.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/pmount/pmount.SlackBuild')
-rw-r--r--system/pmount/pmount.SlackBuild53
1 files changed, 39 insertions, 14 deletions
diff --git a/system/pmount/pmount.SlackBuild b/system/pmount/pmount.SlackBuild
index e753187661..0cd834f0e2 100644
--- a/system/pmount/pmount.SlackBuild
+++ b/system/pmount/pmount.SlackBuild
@@ -1,21 +1,41 @@
#!/bin/sh
# Slackware build script for pmount
-# Written by Menno E. Duursma <druiloor@zonnet.nl>
-# Modified by the SlackBuilds.org project
-# Exit on most errors
+# Copyright 2007 by Guillermo Bonvehi (gbonvehi@gmail.com)
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 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.
+
+# Modified by Robby Workman <http://rlworkman.net>
+# No additional license terms added.
+
set -e
PRGNAM=pmount
-VERSION=0.9.13
+VERSION=0.9.16
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
+OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -27,7 +47,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/${PRGNAM}_${VERSION}.orig.tar.gz
+tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || ( echo "Cannot find sources file: $PRGNAM-$VERSION.tar.gz"; exit 1; )
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -39,26 +59,31 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
- --enable-static=no
+ --enable-hal
make
make install-strip DESTDIR=$PKG
-# Change goup ownership of the binary as it's suid
-# This means 'hotpluggin' users need to be in that group!
-chgrp plugdev $PKG/usr/bin/pmount
-chmod 4750 $PKG/usr/bin/pmount
+# Give pmount/pumount suid bit.
+chown root.plugdev $PKG/usr/bin/pmount $PKG/usr/bin/pumount
+chmod 4750 $PKG/usr/bin/pmount $PKG/usr/bin/pumount
-# Let's not clobber an existing ACL file
+# Let's not clobber the config file
mv $PKG/etc/pmount.allow $PKG/etc/pmount.allow.new
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a [A-Z][A-Z]* ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS README COPYING ChangeLog INSTALL NEWS TODO README.devel \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install