initial import
This commit is contained in:
73
gerbera-legacy/PKGBUILD
Normal file
73
gerbera-legacy/PKGBUILD
Normal file
@@ -0,0 +1,73 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
_realpkgname=gerbera
|
||||
pkgname=$_realpkgname-legacy
|
||||
pkgver=2.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="Free and libre UPnP Media Server (legacy version)"
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://github.com/gerbera/gerbera'
|
||||
license=('GPL-2')
|
||||
depends=('taglib' 'curl' 'sqlite' 'file' 'gcc-libs' 'libupnp' 'libexif' 'fmt' 'pugixml'
|
||||
'spdlog' 'ffmpeg' 'ffmpegthumbnailer' 'libmatroska' 'libebml' 'exiv2')
|
||||
makedepends=('cmake')
|
||||
install=$_realpkgname.install
|
||||
options=('emptydirs')
|
||||
source=("$_realpkgname-$pkgver.tar.gz::https://github.com/gerbera/gerbera/archive/v$pkgver.tar.gz"
|
||||
"libre.patch"
|
||||
"$_realpkgname.initd"
|
||||
"$_realpkgname.confd"
|
||||
"$_realpkgname.run")
|
||||
sha512sums=('7324c838ceec00add8792ba09a32d705a48515d91a02bce625fb99c1af90ee4794e9738cb9020406a036ee423fbcd09c05734ac1b089ea8a7e87793c1c3960c8'
|
||||
'af1edaf920c81b48da8a24898eb21ef2b1a5e27b6c1e12f77a47af48cbd5bc5d869cbf40fa0d3164ef99f2402511897ef27988835ab55f582ca587a252b1e958'
|
||||
'7e4e4b826946a1159a76fd26b378ad7d804bf4555a9032c2cd2198c1ead154879184dd71e277329063ad717f8b9a225e6bbd7a8628dc6052c2140c272924045e'
|
||||
'392d7e964b0328778847f871e88ffd475ddac99b6cf8c8ded4825eb2f970e084db692552790a1b30ff96f59eabcd9fff50164d9dedf328badab95a1cec833c02'
|
||||
'122fb01fc2a2b69e3a928d449e2c1563b8d1545d8e553496e59fc1862b83cc4ace8f7975a2a1631276bfaac6842ea74510b2d460f5d923f13ef6d67b14eac21d')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realpkgname}-${pkgver}"
|
||||
patch -Np1 -i ${srcdir}/libre.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realpkgname}-${pkgver}"
|
||||
cmake \
|
||||
-Wno-dev \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DWITH_MAGIC=1 \
|
||||
-DWITH_CURL=1 \
|
||||
-DWITH_JS=0 \
|
||||
-DWITH_AVCODEC=1 \
|
||||
-DWITH_FFMPEGTHUMBNAILER=1 \
|
||||
-DWITH_EXIF=1 \
|
||||
-DWITH_EXIV2=1 \
|
||||
-DWITH_MATROSKA=1 \
|
||||
-DWITH_MYSQL=0 \
|
||||
-DWITH_SYSTEMD=0 \
|
||||
-DWITH_LASTFM=0 \
|
||||
-DWITH_DEBUG=0 \
|
||||
-DWITH_TESTS=0
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realpkgname}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
|
||||
# create initial configuration
|
||||
./gerbera --create-config > config.xml
|
||||
sed -i 's#<home>.*#<home>/var/lib/gerbera</home>#' config.xml
|
||||
install -Dm644 config.xml -t "${pkgdir}"/etc/$_realpkgname
|
||||
|
||||
# additional folders
|
||||
install -dm755 "${pkgdir}"/var/lib/$_realpkgname
|
||||
install -dm755 "${pkgdir}"/var/log/$_realpkgname
|
||||
|
||||
# services
|
||||
install -Dm755 "${srcdir}"/$_realpkgname.initd "${pkgdir}"/etc/init.d/$_realpkgname
|
||||
install -Dm644 "${srcdir}"/$_realpkgname.confd "${pkgdir}"/etc/conf.d/$_realpkgname
|
||||
install -Dm755 "${srcdir}"/$_realpkgname.run "${pkgdir}"/etc/sv/$_realpkgname/run
|
||||
|
||||
# license
|
||||
install -Dm644 LICENSE.md -t "${pkgdir}"/usr/share/licenses/$pkgname
|
||||
}
|
||||
27
gerbera-legacy/gerbera.confd
Normal file
27
gerbera-legacy/gerbera.confd
Normal file
@@ -0,0 +1,27 @@
|
||||
# /etc/conf.d/gerbera
|
||||
|
||||
# Enable debug log output.
|
||||
#DEBUG=no
|
||||
|
||||
# Interface to bind to, for example eth0, this can be specified instead of the
|
||||
# IP address.
|
||||
#BIND_INTERFACE=eth0
|
||||
|
||||
# Specify the server port that will be used for the web user interface, for
|
||||
# serving media and for UPnP requests, minimum allowed value is 49152. If this
|
||||
# option is omitted a default port will be chosen, however, in this case it is
|
||||
# possible that the port will change upon server restart.
|
||||
#BIND_PORT=49152
|
||||
|
||||
# The server will bind to the given IP address, currently we can not bind to
|
||||
# multiple interfaces so binding to 0.0.0.0 is not be possible.
|
||||
#BIND_IP=0.0.0.0
|
||||
|
||||
# The location of the config file
|
||||
#CONFIG="/etc/gerbera/config.xml"
|
||||
|
||||
# Specify the user/group gerbera should run as
|
||||
#G_USER="gerbera"
|
||||
#G_GROUP="gerbera"
|
||||
|
||||
# vim: ft=gentoo-conf-d
|
||||
34
gerbera-legacy/gerbera.initd
Normal file
34
gerbera-legacy/gerbera.initd
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name="Gerbera"
|
||||
configfile="${CONFIG:-/etc/gerbera/config.xml}"
|
||||
start_stop_daemon_args="--user ${G_USER:-gerbera} --group ${G_GROUP:-gerbera}"
|
||||
pidfile="/run/gerbera/gerbera.pid"
|
||||
command=/usr/bin/gerbera
|
||||
command_args="-c $configfile -l /var/log/gerbera/gerbera.log"
|
||||
command_background=true
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
if ! [ -f "${configfile}" ]; then
|
||||
/usr/bin/gerbera --create-config > "${configfile}"
|
||||
fi
|
||||
if yesno "${DEBUG}"; then
|
||||
command_args="$command_args -D"
|
||||
fi
|
||||
if [ ! -z "${BIND_INTERFACE}" ]; then
|
||||
command_args="$command_args -e ${BIND_INTERFACE}"
|
||||
fi
|
||||
if [ ! -z "${BIND_PORT}" ]; then
|
||||
command_args="$command_args -p ${BIND_PORT}"
|
||||
fi
|
||||
if [ ! -z "${BIND_IP}" ]; then
|
||||
command_args="$command_args -i ${BIND_IP}"
|
||||
fi
|
||||
|
||||
checkpath --owner ${G_USER:-gerbera}:${G_GROUP:-gerbera} \
|
||||
--directory ${pidfile%/*}
|
||||
}
|
||||
24
gerbera-legacy/gerbera.install
Normal file
24
gerbera-legacy/gerbera.install
Normal file
@@ -0,0 +1,24 @@
|
||||
post_install() {
|
||||
if ! getent group gerbera &>/dev/null; then
|
||||
groupadd -r gerbera >& /dev/null
|
||||
fi
|
||||
if ! getent passwd gerbera &>/dev/null; then
|
||||
useradd -r -d /var/lib/gerbera -g gerbera -s /bin/false gerbera
|
||||
fi
|
||||
|
||||
chown -R gerbera:gerbera /var/lib/gerbera
|
||||
chown -R gerbera:gerbera /var/log/gerbera
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
if getent passwd gerbera &>/dev/null; then
|
||||
userdel gerbera >/dev/null
|
||||
fi
|
||||
if getent group gerbera &>/dev/null; then
|
||||
groupdel gerbera >/dev/null
|
||||
fi
|
||||
}
|
||||
4
gerbera-legacy/gerbera.run
Normal file
4
gerbera-legacy/gerbera.run
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
configfile="${CONFIG:-/etc/gerbera/config.xml}"
|
||||
logfile="${LOG:-/var/log/gerbera/gerbera.log}"
|
||||
exec chpst -u gerbera:gerbera gerbera -c $configfile -l $logfile
|
||||
11
gerbera-legacy/libre.patch
Normal file
11
gerbera-legacy/libre.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/web/index.html 2024-01-07 02:19:28.000000000 +0100
|
||||
+++ b/web/index.html 2024-03-27 14:40:05.367931628 +0100
|
||||
@@ -65,7 +65,7 @@
|
||||
<div class="row mx-2">
|
||||
<div class="col offset-md-2">
|
||||
<h2 class="row">Welcome to Gerbera <span id="gerbera-title-version"></span></h2>
|
||||
- <p><a class="text-body" href="https://github.com/gerbera/gerbera">Gerbera</a> is an open source UPnP-AV media server.</p>
|
||||
+ <p>Gerbera is a free and libre UPnP-AV media server.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user