summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/trrntzip/trrntzip.SlackBuild33
-rw-r--r--system/trrntzip/trrntzip.info2
-rw-r--r--system/trrntzip/trrntzip_permission_fix.diff47
3 files changed, 77 insertions, 5 deletions
diff --git a/system/trrntzip/trrntzip.SlackBuild b/system/trrntzip/trrntzip.SlackBuild
index 42019beee3..ab434d1ceb 100644
--- a/system/trrntzip/trrntzip.SlackBuild
+++ b/system/trrntzip/trrntzip.SlackBuild
@@ -1,7 +1,26 @@
#!/bin/sh
-
+#
# Slackware build script for trrntzip
-# Written by Erik Hanson erik@slackbuilds.org
+#
+# Copyright 2009 Erik W. Hanson, Minneapolis, MN, USA
+# 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.
set -eu
@@ -19,6 +38,8 @@ 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
rm -rf $PKG
@@ -30,11 +51,13 @@ cd $PRGNAM
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
+# A small patch to fix a permissions issue:
+patch -p1 < $CWD/trrntzip_permission_fix.diff
+
./autogen.sh
CFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr \
- --disable-static
+ --prefix=/usr
make
make install-strip DESTDIR=$PKG
@@ -46,4 +69,4 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/trrntzip/trrntzip.info b/system/trrntzip/trrntzip.info
index 1c0db224dc..8966c2c66a 100644
--- a/system/trrntzip/trrntzip.info
+++ b/system/trrntzip/trrntzip.info
@@ -2,7 +2,9 @@ PRGNAM="trrntzip"
VERSION="v02"
HOMEPAGE="http://sourceforge.net/projects/trrntzip/"
DOWNLOAD="http://downloads.sourceforge.net/trrntzip/trrntzip_v02_src.tar.gz"
+DOWNLOAD_x86_64=""
MD5SUM="2635a4042b3cf5611ffdffb4019ec8b7"
+MD5SUM_x86_64=""
MAINTAINER="Erik Hanson"
EMAIL="erik@slackbuilds.org"
APPROVED="David Somero" \ No newline at end of file
diff --git a/system/trrntzip/trrntzip_permission_fix.diff b/system/trrntzip/trrntzip_permission_fix.diff
new file mode 100644
index 0000000000..6e6f93929e
--- /dev/null
+++ b/system/trrntzip/trrntzip_permission_fix.diff
@@ -0,0 +1,47 @@
+diff -Nru trrntzip/src/trrntzip.c trrntzip_v2patched/src/trrntzip.c
+--- trrntzip/src/trrntzip.c 2005-05-02 10:38:40.000000000 -0300
++++ trrntzip_v2patched/src/trrntzip.c 2009-07-09 23:50:57.833279724 -0300
+@@ -732,7 +732,15 @@
+
+ if (strstr (szTmpBuf, ".zip\0"))
+ {
+- chmod (direntp->d_name, S_IRUSR);
++ //chmod (direntp->d_name, S_IRUSR);
++#ifndef S_ISVTX
++ // On windows we just set the file to read-only
++ chmod (direntp->d_name, S_IRUSR);
++#else
++ // On Unix systems we use the sticky bit
++ // We also retain all other flags
++ chmod (direntp->d_name, S_ISVTX | istat.st_mode);
++#endif
+ }
+ }
+ // Zip file is actually a dir
+@@ -780,9 +788,22 @@
+ sprintf (szTmpBuf, "%s", direntp->d_name);
+ strlwr (szTmpBuf);
+
+- if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR))
+- {
+- chmod (direntp->d_name, S_IWUSR);
++ //if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR))
++ //{
++ // chmod (direntp->d_name, S_IWUSR);
++ if (strstr (szTmpBuf, ".zip\0") &&
++
++#ifndef S_ISVTX
++ !(istat.st_mode & S_IWUSR))
++ {
++ // Remove the read only bit we set earlier on Windows systems
++ chmod (direntp->d_name, S_IWUSR);
++#else
++ istat.st_mode & S_ISVTX)
++ {
++ // Remove the sticky bit we set earlier on Unix systems
++ chmod (direntp->d_name, istat.st_mode - S_ISVTX);
++#endif
+ mig.cEncounteredZips++;
+
+ if (!mig.fProcessLog)
+