aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/smpq/8b978dd4b0b264cebd82445a25ccce57c41e7bb5.patch52
-rw-r--r--system/smpq/README6
-rw-r--r--system/smpq/slack-desc19
-rw-r--r--system/smpq/smpq.SlackBuild112
-rw-r--r--system/smpq/smpq.info10
5 files changed, 199 insertions, 0 deletions
diff --git a/system/smpq/8b978dd4b0b264cebd82445a25ccce57c41e7bb5.patch b/system/smpq/8b978dd4b0b264cebd82445a25ccce57c41e7bb5.patch
new file mode 100644
index 000000000000..8b978dd4b0b2
--- /dev/null
+++ b/system/smpq/8b978dd4b0b264cebd82445a25ccce57c41e7bb5.patch
@@ -0,0 +1,52 @@
+--- a/CMakeLists.txt 2016-12-12 23:31:14.000000000 +0100
++++ b/CMakeLists.txt 2021-10-01 13:06:43.062603459 +0200
+@@ -18,6 +18,8 @@
+ #
+
+ project(SMPQ)
++file(GLOB_RECURSE CFILES "${CMAKE_SOURCE_DIR}/*.c")
++SET_SOURCE_FILES_PROPERTIES(${CFILES} PROPERTIES LANGUAGE CXX)
+ set(VERSION 1.6)
+ cmake_minimum_required(VERSION 2.6)
+
+@@ -43,9 +45,9 @@
+
+ try_compile(CHECK ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/check.c COMPILE_DEFINITIONS -I${STORMLIB_INCLUDE_DIR})
+
+- if(NOT CHECK)
++ if(FALSE)
+ message(FATAL_ERROR "Found old StormLib version")
+- endif(NOT CHECK)
++ endif(FALSE)
+
+ message(STATUS "Found StormLib header: ${STORMLIB_INCLUDE_DIR}/StormLib.h")
+ message(STATUS "Found StormLib library: ${STORMLIB_LIBRARY}")
+@@ -93,7 +95,9 @@
+ if(WITH_CMD)
+
+ add_executable(smpq ${SMPQ_SRCS})
+- target_link_libraries(smpq ${STORMLIB_LIBRARY})
++ find_package(ZLIB REQUIRED)
++ find_package(BZip2 REQUIRED)
++ target_link_libraries(smpq ${STORMLIB_LIBRARY} ${ZLIB_LIBRARY} ${BZIP2_LIBRARIES})
+
+ if(WIN32 AND NOT MSVC)
+ set_target_properties(smpq PROPERTIES LINK_FLAGS -static)
+@@ -102,7 +106,7 @@
+
+ install(TARGETS smpq DESTINATION bin)
+
+- if(NOT CMAKE_CROSSCOMPILING)
++ if(FALSE)
+
+ add_executable(mangen ${MANGEN_SRCS})
+ add_custom_command(OUTPUT smpq.1 COMMAND mangen > smpq.1 DEPENDS mangen)
+@@ -110,7 +114,7 @@
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/smpq.1 DESTINATION share/man/man1)
+
+- endif(NOT CMAKE_CROSSCOMPILING)
++ endif(FALSE)
+
+ if(WIN32 AND WITH_NSIS)
+
diff --git a/system/smpq/README b/system/smpq/README
new file mode 100644
index 000000000000..84fdc7fa23ff
--- /dev/null
+++ b/system/smpq/README
@@ -0,0 +1,6 @@
+SMPQ (StormLib MPQ archiving utility)
+
+This utility is designed for the full manipulation of Blizzard MPQ
+archives. It supports extracting, appending, renaming, and deleting
+files in MPQ archives. It can also create MPQ archives. SMPQ can
+access different types and versions of MPQ archives.
diff --git a/system/smpq/slack-desc b/system/smpq/slack-desc
new file mode 100644
index 000000000000..dc123dba833e
--- /dev/null
+++ b/system/smpq/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------------------------------------------------------|
+smpq: smpq (StormLib MPQ archiving utility)
+smpq:
+smpq: This utility is designed for the full manipulation of Blizzard MPQ
+smpq: archives. It supports extracting, appending, renaming, and deleting
+smpq: files in MPQ archives. It can also create MPQ archives. SMPQ can
+smpq: access different types and versions of MPQ archives.
+smpq:
+smpq:
+smpq:
+smpq:
+smpq:
diff --git a/system/smpq/smpq.SlackBuild b/system/smpq/smpq.SlackBuild
new file mode 100644
index 000000000000..9b802a5b4b43
--- /dev/null
+++ b/system/smpq/smpq.SlackBuild
@@ -0,0 +1,112 @@
+#!/bin/bash
+
+# Slackware build script for smpq
+
+# Copyright 2022 Steven Voges <svoges.sbo@gmail.com>
+# 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=smpq
+VERSION=${VERSION:-1.6}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+NUMJOBS=${NUMJOBS:-$(nproc)}
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+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
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM\_$VERSION.orig.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 {} \;
+
+# Patch for latest stormlib
+# https://aur.archlinux.org/cgit/aur.git/tree/fix-smpq-compilation.patch?h=smpq
+patch -p1 <$CWD/8b978dd4b0b264cebd82445a25ccce57c41e7bb5.patch
+
+# Configure
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_KDE=OFF \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install/strip DESTDIR=$PKG
+cd ..
+
+# Don't ship .la files:
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS CHANGELOG COPYING README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/smpq/smpq.info b/system/smpq/smpq.info
new file mode 100644
index 000000000000..40f38ce99b1e
--- /dev/null
+++ b/system/smpq/smpq.info
@@ -0,0 +1,10 @@
+PRGNAM="smpq"
+VERSION="1.6"
+HOMEPAGE="https://launchpad.net/smpq"
+DOWNLOAD="https://launchpad.net/smpq/trunk/1.6/+download/smpq_1.6.orig.tar.gz"
+MD5SUM="c7124d2dfdbaaf428413513856f446ce"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="stormlib"
+MAINTAINER="Steven Voges"
+EMAIL="svoges.sbo@gmail.com"