summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-01-21 09:51:41 +0100
committer Eric Hameleers <alien@slackware.com>2016-01-21 09:51:41 +0100
commitdf908ef2874685229fd4c8e4fbe6d0da0468ed63 (patch)
tree0b22787e089557ccf94eeb9074c1ece2bbaf59df
parentd35b569b0d7e8eee543799832edb62abd0453541 (diff)
downloadktown-df908ef2874685229fd4c8e4fbe6d0da0468ed63.tar.gz
ktown-df908ef2874685229fd4c8e4fbe6d0da0468ed63.tar.xz
deps/unar: possible new dependency for KDE Ark.
However, it was not built because it depends itself again on gnustep-make and gnustep-base, which we do not (yet?) have. Unar will give Ark the capability to open RAR files. Otherwise, unrar will be needed to give Ark that functionality.
-rw-r--r--deps/unar/.url1
-rw-r--r--deps/unar/slack-desc19
-rwxr-xr-xdeps/unar/unar.SlackBuild137
3 files changed, 157 insertions, 0 deletions
diff --git a/deps/unar/.url b/deps/unar/.url
new file mode 100644
index 0000000..745232c
--- /dev/null
+++ b/deps/unar/.url
@@ -0,0 +1 @@
+http://unarchiver.c3.cx/downloads/unar1.9.1_src.zip
diff --git a/deps/unar/slack-desc b/deps/unar/slack-desc
new file mode 100644
index 0000000..f042476
--- /dev/null
+++ b/deps/unar/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+unar: unar (Unarchiver for a variety of file formats)
+unar:
+unar: The Unarchiver is an archive unpacker program with support for the
+unar: popular zip, RAR, 7z, tar, gzip, bzip2, LZMA, XZ, CAB, MSI, NSIS, EXE,
+unar: ISO, BIN, and split file formats, as well as the old Stuffit,
+unar: Stuffit X, DiskDouble, Compact Pro, Packit, cpio, compress (.Z), ARJ,
+unar: ARC, PAK, ACE, ZOO, LZH, ADF, DMS, LZX, PowerPacker, LBR, Squeeze,
+unar: Crunch, and other old formats.
+unar:
+unar: See also: http://unarchiver.c3.cx/commandline
+unar:
diff --git a/deps/unar/unar.SlackBuild b/deps/unar/unar.SlackBuild
new file mode 100755
index 0000000..c69f017
--- /dev/null
+++ b/deps/unar/unar.SlackBuild
@@ -0,0 +1,137 @@
+#!/bin/sh
+
+# Copyright 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 2015 Patrick J. Volkerding, Sebeka, 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.
+
+PKGNAM=unar
+VERSION=${VERSION:-1.9.1}
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX="64"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+
+rm -rf $PKGNAM-$VERSION
+unzip $CWD/${PKGNAM}${VERSION}_src.zip || exit 1
+mv The* $PKGNAM-$VERSION || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+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 {} \;
+
+export CXXFLAGS="$SLKCFLAGS"
+export LDFLAGS="$SLKLDFLAGS"
+
+# Build and install:
+cd XADMaster
+ make -f Makefile.linux || exit 1
+ mkdir -p ${PKG}/usr/bin
+ install -p -m0755 lsar unar ${PKG}/usr/bin/ || exit 1
+cd -
+
+# Add the man pages:
+mkdir -p ${PKG}/usr/man/man1
+install -p -m0644 Extra/*.1 ${PKG}/usr/man/man1/
+
+# Add bash-completions:
+mkdir -p ${PKG}/usr/share/bash-completion/completions
+for FILE in lsar unar ; do
+ install -p -m0644 Extra/${FILE}.bash_completion \
+ ${PKG}/usr/share/bash-completion/completions/${FILE}
+done
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ README.md \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+