mirror of
https://github.com/KeithDHedger/LFSPkgBuilds.git
synced 2025-08-19 16:25:24 +00:00
added minidlna
This commit is contained in:
1
LFSPkgBuildScripts/mm/minidlna/info
Normal file
1
LFSPkgBuildScripts/mm/minidlna/info
Normal file
@ -0,0 +1 @@
|
||||
minidlna (mini DLNA server) MiniDLNA (aka ReadyDLNA) is server software with the aim of being fully compliant with DLNA/UPnP-AV clients. Homepage: http://minidlna.sourceforge.net/
|
80
LFSPkgBuildScripts/mm/minidlna/minidlna
Executable file
80
LFSPkgBuildScripts/mm/minidlna/minidlna
Executable file
@ -0,0 +1,80 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
#©K. D. Hedger. Thu 4 Jun 12:07:44 BST 2020 keithdhedger@gmail.com
|
||||
#
|
||||
#This file (minidlna) is part of minidlna.
|
||||
#
|
||||
#minidlna is free software: you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation, either version 3 of the License, or
|
||||
#at your option) any later version.
|
||||
#
|
||||
#minidlna is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with minidlna. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
. /etc/init.d/init-functions
|
||||
|
||||
PIDFILE=/var/run/minidlna/minidlna.pid
|
||||
case "${1}" in
|
||||
start)
|
||||
:>/var/log/minidlna.log
|
||||
MOUNTRESULT="OK"
|
||||
prettyMsgStart "Starting DLNA Server ..."
|
||||
if ! minidlnad -v; then
|
||||
prettyMsgResult "FAIL"
|
||||
exit 2
|
||||
fi
|
||||
prettyMsgResult $MOUNTRESULT
|
||||
;;
|
||||
|
||||
stop)
|
||||
MOUNTRESULT="OK"
|
||||
prettyMsgStart "Stopping DLNA Server ..."
|
||||
kill -9 $(cat $PIDFILE) &>/dev/null
|
||||
prettyMsgResult $MOUNTRESULT
|
||||
;;
|
||||
|
||||
restart)
|
||||
MOUNTRESULT="OK"
|
||||
kill -9 $(cat $PIDFILE) &>/dev/null
|
||||
if ! minidlnad -v; then
|
||||
prettyMsgResult "FAIL"
|
||||
exit 2
|
||||
fi
|
||||
prettyMsgResult $MOUNTRESULT
|
||||
;;
|
||||
|
||||
reload)
|
||||
MOUNTRESULT="OK"
|
||||
prettyMsgStart "Reloading DLNA Server ..."
|
||||
kill -9 $(cat $PIDFILE) &>/dev/null
|
||||
if ! minidlnad -r -v; then
|
||||
prettyMsgResult "FAIL"
|
||||
exit 2
|
||||
fi
|
||||
prettyMsgResult $MOUNTRESULT
|
||||
;;
|
||||
|
||||
rebuild)
|
||||
MOUNTRESULT="OK"
|
||||
prettyMsgStart "Rebuilding DLNA Server ..."
|
||||
kill -9 $(cat $PIDFILE) &>/dev/null
|
||||
if ! minidlnad -R -v; then
|
||||
prettyMsgResult "FAIL"
|
||||
exit 2
|
||||
fi
|
||||
prettyMsgResult $MOUNTRESULT
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ${0} {start|stop|restart|reload|rebuild}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
56
LFSPkgBuildScripts/mm/minidlna/minidlna.LFSBuild
Executable file
56
LFSPkgBuildScripts/mm/minidlna/minidlna.LFSBuild
Executable file
@ -0,0 +1,56 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. /usr/share/LFSPkg/LFSFunctions
|
||||
|
||||
PKGNAME="minidlna"
|
||||
TARNAME="$PKGNAME"
|
||||
VERSION="1.2.1"
|
||||
BUILD=1
|
||||
SECTION="MM"
|
||||
SUFFIX="LFSPKG"
|
||||
TARBALL="${TARNAME}-${VERSION}.tar.gz"
|
||||
PKG="${OUTPUT}/${PKGNAME}"
|
||||
DOWHAT=${1:-"build"}
|
||||
CWD=$(pwd)
|
||||
|
||||
scriptLog "${PKGNAME}-${VERSION}"
|
||||
gettar "https://netcologne.dl.sourceforge.net/project/minidlna/minidlna/1.2.1/${TARBALL}" $SECTION
|
||||
rm -rf "$PKG" || true
|
||||
mkdir -p "$PKG"
|
||||
|
||||
pushd $COMPILEAT 2>/dev/null||true
|
||||
extractarchive "${SOURCEARCHIVES}/${SECTION}/${TARBALL}"
|
||||
pushd "${TARNAME}-${VERSION}"
|
||||
CFLAGS="$LFSFLAGS" CXXFLAGS="$LFSFLAGS" ./configure ${CONFIGOPTIONS}
|
||||
make $MAKEFLAGS||make|| exit 100
|
||||
make install DESTDIR=$PKG || exit 100
|
||||
install -Dm644 minidlna.conf ${PKG}/etc/minidlna.conf
|
||||
install -Dm644 minidlna.conf.5 ${PKG}/usr/share/man/man5/minidlna.conf.5
|
||||
install -Dm644 minidlnad.8 ${PKG}/usr/share/man/man8/minidlnad.8
|
||||
install -Dm755 ${CWD}/minidlna ${PKG}/etc/init.d/minidlna
|
||||
popd
|
||||
|
||||
checketc "$PKG"
|
||||
packageclean "$PKG" "$CWD"
|
||||
|
||||
pushd "$PKG"
|
||||
lfspkg -n "$PKGNAME" -p "$VERSION" -d $SECTION -b $BUILD -s $SUFFIX -m
|
||||
popd
|
||||
|
||||
case $DOWHAT in
|
||||
up*)
|
||||
lfspkg "^${PKGNAME}-[0-9][0-9]*" "${PKGARCHIVES}/${SECTION}/${PKGNAME}-${VERSION}-${BUILD}_${SECTION}_${SUFFIX}.tar.gz" -u
|
||||
;;
|
||||
"install")
|
||||
lfspkg "${PKGARCHIVES}/${SECTION}/${PKGNAME}-${VERSION}-${BUILD}_${SECTION}_${SUFFIX}.tar.gz" -i
|
||||
;;
|
||||
"build")
|
||||
echo "Just built"
|
||||
;;
|
||||
*)
|
||||
echo "*** Unknown command ***"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
rm -r "$PKG" "${TARNAME}-${VERSION}"
|
||||
popd 2>/dev/null||true
|
Reference in New Issue
Block a user