summaryrefslogtreecommitdiffstats
path: root/misc/projectM/projectM.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/projectM/projectM.SlackBuild')
-rw-r--r--misc/projectM/projectM.SlackBuild80
1 files changed, 48 insertions, 32 deletions
diff --git a/misc/projectM/projectM.SlackBuild b/misc/projectM/projectM.SlackBuild
index 994a7cbd7d..2d8a69608e 100644
--- a/misc/projectM/projectM.SlackBuild
+++ b/misc/projectM/projectM.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for projectM
-# Copyright 2017 Matt Dinslage, Springfield, MO
+# Copyright 2021 Matt Dinslage, Springfield, MO
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,15 @@
# 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=projectM
-VERSION=${VERSION:-2.1.0}
+VERSION=${VERSION:-3.1.12}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=projectm
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -59,40 +71,44 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-complete-$VERSION-Source.tar.gz
-cd $PRGNAM-complete-$VERSION-Source
-
-patch -p0 < $CWD/patch_use_LIB_SUFFIX.diff
-patch -p0 < $CWD/patch_use_both_fonts.diff
-patch -p1 < $CWD/projectM-2.1.0_gcc.patch
-
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-mkdir -p build
-cd build
- cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -lglut -lGL" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DINCLUDE-PROJECTM-PULSEAUDIO:BOOLEAN=ON \
- -DCMAKE_BUILD_TYPE=Release ..
- make
- make install DESTDIR=$PKG
-cd ..
+ \( -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 {} \;
+
+./autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+# 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
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS.txt LICENSE.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -100,4 +116,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE