mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
system/mount-zip: Updated for version 1.0.9, new maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
ebf9a08e0b
commit
79675726a5
5 changed files with 65 additions and 31 deletions
|
@ -1,7 +1,8 @@
|
|||
mount-zip is a tool allowing to open, explore and extract ZIP
|
||||
archives.
|
||||
mount-zip (FUSE file system for zip archives)
|
||||
|
||||
mount-zip mounts a ZIP archive as a read-only FUSE file system, which
|
||||
can then be explored and read by any application.
|
||||
|
||||
mount-zip aspires to be an excellent ZIP mounter. It starts quickly,
|
||||
uses little memory, decodes encrypted files, and provides on-the-go
|
||||
decompression and caching for maximum efficiency.
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# Slackware build script for mount-zip
|
||||
|
||||
# Copyright 2022 Charadon
|
||||
# Copyright 2023 B. Watson
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -22,10 +23,16 @@
|
|||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# 20230828 bkw: take over maintenance, update for v1.0.9.
|
||||
# - actually use SLKCFLAGS.
|
||||
# - add CONTRIBUTING.md to the doc dir.
|
||||
# - add patch to allow v1.0.9 to build on Slackware 15.0.
|
||||
# - trim down README and slack-desc a bit.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=mount-zip
|
||||
VERSION=${VERSION:-1.0.7}
|
||||
VERSION=${VERSION:-1.0.9}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
@ -49,16 +56,12 @@ OUTPUT=${OUTPUT:-/tmp}
|
|||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
@ -70,25 +73,34 @@ rm -rf $PRGNAM-$VERSION
|
|||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
|
||||
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
# 20230829 bkw: Stop mount-zip from requiring a version of libzip
|
||||
# greater than 1.8.0. Long explanation:
|
||||
|
||||
# mount-zip calls zip_file_is_seekable() to decide whether it should
|
||||
# bother to cache the zip file it's working with. This call was added
|
||||
# to libzip in its version 1.9.0, and Slackware 15.0 only has 1.8.0.
|
||||
|
||||
# It turns out, zip_file_is_seekable() only returns true for zip
|
||||
# files that are not compressed (and not encrypted). This means that
|
||||
# "stored" zip files are the only ones that don't get cached. This
|
||||
# patch causes all zip files to get cached. It won't have much impact
|
||||
# because non-compressed zip files are pretty rare anyway.
|
||||
|
||||
# This patch should go away when Slackware 15.1 get released.
|
||||
|
||||
patch -p1 < $CWD/slackware-15.0-libzip.diff
|
||||
|
||||
# 20230829 bkw: actually use SLKCFLAGS.
|
||||
sed -i "/^CXXFLAGS/s,-O2,$SLKCFLAGS," Makefile lib/Makefile
|
||||
make
|
||||
install -Dm755 mount-zip $PKG/usr/bin/mount-zip
|
||||
|
||||
|
||||
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
|
||||
|
||||
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
|
||||
install -s -Dm755 mount-zip $PKG/usr/bin/mount-zip
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a LICENSE changelog README.md $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
rm -f INSTALL.md
|
||||
cp -a LICENSE changelog *.md $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
PRGNAM="mount-zip"
|
||||
VERSION="1.0.7"
|
||||
VERSION="1.0.9"
|
||||
HOMEPAGE="https://github.com/google/mount-zip"
|
||||
DOWNLOAD="https://github.com/google/mount-zip/archive/v1.0.7/mount-zip-1.0.7.tar.gz"
|
||||
MD5SUM="38b59f61fd30c524a660502659d1b3e8"
|
||||
DOWNLOAD="https://github.com/google/mount-zip/archive/v1.0.9/mount-zip-1.0.9.tar.gz"
|
||||
MD5SUM="e6fec7d09427d46d0233f33a5da48246"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="Charadon"
|
||||
EMAIL="dev@iotib.net"
|
||||
MAINTAINER="B. Watson"
|
||||
EMAIL="urchlay@slackware.uk"
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
mount-zip: mount-zip (FUSE file system for ZIP archives)
|
||||
mount-zip:
|
||||
mount-zip: mount-zip is a tool allowing to open, explore and extract ZIP
|
||||
mount-zip: archives.
|
||||
mount-zip: mount-zip (FUSE file system for zip archives)
|
||||
mount-zip:
|
||||
mount-zip: mount-zip mounts a ZIP archive as a read-only FUSE file system, which
|
||||
mount-zip: can then be explored and read by any application.
|
||||
|
@ -17,3 +14,6 @@ mount-zip:
|
|||
mount-zip: mount-zip aspires to be an excellent ZIP mounter. It starts quickly,
|
||||
mount-zip: uses little memory, decodes encrypted files, and provides on-the-go
|
||||
mount-zip: decompression and caching for maximum efficiency.
|
||||
mount-zip:
|
||||
mount-zip:
|
||||
mount-zip:
|
||||
|
|
21
system/mount-zip/slackware-15.0-libzip.diff
Normal file
21
system/mount-zip/slackware-15.0-libzip.diff
Normal file
|
@ -0,0 +1,21 @@
|
|||
diff -Naur mount-zip-1.0.9/lib/data_node.cc mount-zip-1.0.9.patched/lib/data_node.cc
|
||||
--- mount-zip-1.0.9/lib/data_node.cc 2023-08-17 01:41:40.000000000 -0400
|
||||
+++ mount-zip-1.0.9.patched/lib/data_node.cc 2023-08-29 02:59:18.342998941 -0400
|
||||
@@ -269,7 +269,7 @@
|
||||
ZipFile file = Reader::Open(zip, id);
|
||||
assert(file);
|
||||
|
||||
- const bool seekable = zip_file_is_seekable(file.get()) > 0;
|
||||
+ const bool seekable = false;
|
||||
if (seekable) {
|
||||
Log(LOG_DEBUG, "No need to cache ", file_node, ": File is seekable");
|
||||
return false;
|
||||
@@ -293,7 +293,7 @@
|
||||
ZipFile file = Reader::Open(zip, id);
|
||||
assert(file);
|
||||
|
||||
- const bool seekable = zip_file_is_seekable(file.get()) > 0;
|
||||
+ const bool seekable = false;
|
||||
Reader::Ptr reader(seekable ? new UnbufferedReader(std::move(file), id, size)
|
||||
: new BufferedReader(zip, std::move(file), id,
|
||||
size, &cached_reader));
|
Loading…
Reference in a new issue