diff options
Diffstat (limited to 'multimedia/minidlna/minidlna.SlackBuild')
-rw-r--r-- | multimedia/minidlna/minidlna.SlackBuild | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/multimedia/minidlna/minidlna.SlackBuild b/multimedia/minidlna/minidlna.SlackBuild index a1e2d4b26a..ee245ca1dc 100644 --- a/multimedia/minidlna/minidlna.SlackBuild +++ b/multimedia/minidlna/minidlna.SlackBuild @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for minidlna # Copyright 2011-2012 Niels Horn, Rio de Janeiro, RJ, Brazil -# Copyright 2015 Mario Preksavec, Zagreb, Croatia +# Copyright 2015, 2024 Mario Preksavec, Zagreb, Croatia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,26 +23,36 @@ # 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=minidlna -VERSION=${VERSION:-1.1.5} +VERSION=${VERSION:-1.3.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; 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} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -70,9 +80,12 @@ find -L . \ \( -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 +# Fix build with ffmpeg 7 +case $(ffmpeg -version | awk '/^ffmpeg version/{print $3}') in + 7*) patch -p1 <$CWD/ffmpeg7.patch ;; +esac -CFLAGS="$SLKCFLAGS" \ +CFLAGS="$SLKCFLAGS -fcommon" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -91,14 +104,17 @@ make install DESTDIR=$PKG 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 -# Include the config file -mkdir -p $PKG/etc -cat $PRGNAM.conf > $PKG/etc/$PRGNAM.conf.new +# Include startup script and configs thanks to Andrew Isakov +install -D -m755 $CWD/rc.$PRGNAM -T $PKG/etc/rc.d/rc.$PRGNAM.new +install -D -m644 $CWD/${PRGNAM}.logrotate -T $PKG/etc/logrotate.d/${PRGNAM}.new +install -D -m644 $PRGNAM.conf -T $PKG/etc/$PRGNAM.conf.new + +# Create log and db cache directories +mkdir -p $PKG/var/{log,cache}/$PRGNAM # Include the manual pages -mkdir -p $PKG/usr/man/man{5,8} -cat minidlna.conf.5 > $PKG/usr/man/man5/minidlna.conf.5 -cat minidlnad.8 > $PKG/usr/man/man8/minidlnad.8 +install -D -m644 minidlna.conf.5 -t $PKG/usr/man/man5 +install -D -m644 minidlnad.8 -t $PKG/usr/man/man8 gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION @@ -111,4 +127,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 |