summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Urankar <mikael@FreeBSD.org>2020-11-16 16:53:37 +0000
committerMikael Urankar <mikael@FreeBSD.org>2020-11-16 16:53:37 +0000
commitc595a583e37431c538a5e7e7590c27e1ee05d521 (patch)
treea28d7ce2f2f56c7ee8d56e55aabc78ee7632b325
parentdcafb73623cd0ba3d191ed3ff354198a73a55c29 (diff)
downloadfreebsd-ports-c595a583e37431c538a5e7e7590c27e1ee05d521.zip
net/gerbera: New port, UPnP/DLNA media server
Gerbera is a DLNA compatible media server and a continuation of MediaTomb It allows you to browse and playback your media via your network, supports metadata extraction, media thumbnail support and generation, media transcoding and offers a Web UI. WWW: https://gerbera.io/ PR: 248475 Submitted by: daniel.engberg.lists@pyret.net Reviewed by: meena
-rw-r--r--GIDs2
-rw-r--r--UIDs2
-rw-r--r--net/Makefile1
-rw-r--r--net/gerbera/Makefile94
-rw-r--r--net/gerbera/distinfo3
-rw-r--r--net/gerbera/files/gerbera.in54
-rw-r--r--net/gerbera/files/patch-CMakeLists.txt8
-rw-r--r--net/gerbera/files/patch-test_core_test__server.cc20
-rw-r--r--net/gerbera/files/pkg-message.in11
-rw-r--r--net/gerbera/pkg-descr6
-rw-r--r--net/gerbera/pkg-plist86
11 files changed, 285 insertions, 2 deletions
diff --git a/GIDs b/GIDs
index 61e997402840..521c3579d171 100644
--- a/GIDs
+++ b/GIDs
@@ -818,7 +818,7 @@ librespeed:*:874:
# free: 875
# free: 876
# free: 877
-# free: 878
+gerbera:*:878:
_encrypted-dns:*:879:
pyspf-milter:*:880:
ultimaker:*:881:
diff --git a/UIDs b/UIDs
index c660fff2a8a8..017d4176f2ea 100644
--- a/UIDs
+++ b/UIDs
@@ -823,7 +823,7 @@ librespeed:*:874:874::0:0:LibreSpeed user:/nonexistent:/usr/sbin/nologin
# free: 875
# free: 876
# free: 877
-# free: 878
+gerbera:*:878:878::0:0:Gerbera DLNA Media Server:/nonexistent:/usr/sbin/nologin
_encrypted-dns:*:879:879::0:0:encrypted-dns user:/var/empty:/usr/sbin/nologin
pyspf-milter:*:880:880::0:0:pyspf-milter:/nonexistent:/usr/sbin/nologin
ultimaker:*:881:881::0:0:Ultimaker user:/nonexistent:/usr/sbin/nologin
diff --git a/net/Makefile b/net/Makefile
index 0265efe24959..1268a31c421b 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -174,6 +174,7 @@
SUBDIR += geoclue
SUBDIR += geocode-glib
SUBDIR += geoipupdate
+ SUBDIR += gerbera
SUBDIR += gfbgraph
SUBDIR += glflow
SUBDIR += glib-networking
diff --git a/net/gerbera/Makefile b/net/gerbera/Makefile
new file mode 100644
index 000000000000..6719202cd7cc
--- /dev/null
+++ b/net/gerbera/Makefile
@@ -0,0 +1,94 @@
+# $FreeBSD$
+
+PORTNAME= gerbera
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.6.4
+CATEGORIES= net multimedia
+
+MAINTAINER= daniel.engberg.lists@pyret.net
+COMMENT= Media server compatible with DLNA and UPnP
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+LIB_DEPENDS= libfmt.so:devel/libfmt \
+ libspdlog.so:devel/spdlog \
+ libpugixml.so:textproc/pugixml \
+ libinotify.so:devel/libinotify
+
+USES= cmake compiler:c++17-lang iconv localbase:ldflags \
+ pkgconfig sqlite
+
+USE_GITHUB= yes
+USE_RC_SUBR= gerbera
+
+TEST_TARGET= test
+
+CMAKE_OFF= WITH_EXIF WITH_LASTFM WITH_MYSQL WITH_SYSTEMD
+
+USERS= gerbera
+GROUPS= gerbera
+SUB_LIST= USER=${USERS} GROUP=${GROUPS}
+PLIST_SUB= USER=${USERS} GROUP=${GROUPS}
+SUB_FILES= pkg-message
+
+OPTIONS_DEFINE= CURL DEBUG DUKTAPE EXIV2 FFMPEG FFMPEGTHUMBNAILER \
+ LIBMAGIC MATROSKA TAGLIB TEST
+OPTIONS_DEFAULT= CURL DUKTAPE EXIV2 FFMPEG LIBMAGIC TAGLIB LIBNPUPNP
+
+OPTIONS_SINGLE= UPNPLIB
+OPTIONS_SINGLE_UPNPLIB= LIBNPUPNP LIBUPNP
+
+CURL_DESC= Support for online services via cURL
+DUKTAPE_DESC= Javascript support for custom import scripts
+FFMPEGTHUMBNAILER_DESC= Support for thumbnail generation
+LIBNPUPNP_DESC= Use high performance libnpupnp library
+LIBMAGIC_DESC= Identify file mime types via libmagic
+LIBUPNP_DESC= Use libupnp library
+MATROSKA_DESC= Extract video/mkv metadata via libmatroska
+TAGLIB_DESC= Extract audio file metadata via taglib
+
+CURL_LIB_DEPENDS= libcurl.so:ftp/curl
+CURL_CMAKE_BOOL= WITH_CURL
+
+DEBUG_CMAKE_BOOL= WITH_DEBUG
+
+DUKTAPE_LIB_DEPENDS= libduktape.so:lang/duktape-lib
+DUKTAPE_CMAKE_BOOL= WITH_JS
+
+EXIV2_LIB_DEPENDS= libexiv2.so:graphics/exiv2
+EXIV2_CMAKE_BOOL= WITH_EXIV2
+
+FFMPEG_LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \
+ libavutil.so:multimedia/ffmpeg
+FFMPEG_CMAKE_BOOL= WITH_AVCODEC
+
+FFMPEGTHUMBNAILER_LIB_DEPENDS= libffmpegthumbnailer.so:multimedia/ffmpegthumbnailer
+FFMPEGTHUMBNAILER_CMAKE_BOOL= WITH_FFMPEGTHUMBNAILER
+FFMPEGTHUMBNAILER_IMPLIES= FFMPEG
+
+LIBMAGIC_LIB_DEPENDS= libmagic.so:sysutils/file
+LIBMAGIC_CMAKE_BOOL= WITH_MAGIC
+
+LIBNPUPNP_LIB_DEPENDS= libnpupnp.so:net/libnpupnp
+LIBNPUPNP_CMAKE_BOOL= WITH_NPUPNP
+
+LIBUPNP_LIB_DEPENDS= libupnp.so:devel/upnp
+
+MATROSKA_LIB_DEPENDS= libmatroska.so:multimedia/libmatroska
+MATROSKA_CMAKE_BOOL= WITH_MATROSKA
+
+TAGLIB_LIB_DEPENDS= libtag.so:audio/taglib
+TAGLIB_CMAKE_BOOL= WITH_TAGLIB
+
+TEST_BUILD_DEPENDS= googletest>=0:devel/googletest
+TEST_CMAKE_BOOL= WITH_TESTS
+TEST_IMPLIES= CURL DUKTAPE
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gerbera
+ @${MKDIR} ${STAGEDIR}/var/db/gerbera
+ @${MKDIR} ${STAGEDIR}/var/log/gerbera
+ @${STAGEDIR}${PREFIX}/bin/gerbera -f /var/db/gerbera --create-config > ${STAGEDIR}${PREFIX}/etc/gerbera-config.xml.sample
+
+.include <bsd.port.mk>
diff --git a/net/gerbera/distinfo b/net/gerbera/distinfo
new file mode 100644
index 000000000000..69d63387ad3b
--- /dev/null
+++ b/net/gerbera/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1602879743
+SHA256 (gerbera-gerbera-v1.6.4_GH0.tar.gz) = cbe7ea78977db8c02fcca1759ed149f199a590afaf4a6d21ffcca8623d1a0cc5
+SIZE (gerbera-gerbera-v1.6.4_GH0.tar.gz) = 3060809
diff --git a/net/gerbera/files/gerbera.in b/net/gerbera/files/gerbera.in
new file mode 100644
index 000000000000..372c0c32d694
--- /dev/null
+++ b/net/gerbera/files/gerbera.in
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: gerbera
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable gerbera:
+# gerbera_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable gerbera.
+# gerbera_flags (str): Custom additional arguments to be passed
+# to gerbera (default empty).
+# gerbera_conf_dir (str): Directory where ${name} configuration
+# data is stored.
+
+. /etc/rc.subr
+
+name="gerbera"
+rcvar=gerbera_enable
+
+load_rc_config ${name}
+
+: ${gerbera_enable:="NO"}
+: ${gerbera_user:="%%USER%%"}
+: ${gerbera_group:="%%GROUP%%"}
+: ${gerbera_conf_dir="%%PREFIX%%/etc"}
+
+start_precmd=gerbera_precmd
+stop_postcmd=gerbera_stop_postcmd
+
+procname="%%PREFIX%%/bin/${name}"
+pidfile="/var/run/gerbera/gerbera.pid"
+required_files="${gerbera_conf_dir}/gerbera-config.xml"
+
+command="/usr/sbin/daemon"
+command_args="-f -t ${name} -p ${pidfile} ${procname} -c ${required_files} -l /var/log/gerbera/gerbera.log ${gerbera_args}"
+
+gerbera_precmd()
+{
+ local rundir=${pidfile%/*}
+ if [ ! -d $rundir ] ; then
+ install -d -m 0755 -o %%USER%% -g %%GROUP%% $rundir
+ fi
+}
+
+gerbera_stop_postcmd()
+{
+ rm -f "$rundir"
+}
+
+run_rc_command "$1"
diff --git a/net/gerbera/files/patch-CMakeLists.txt b/net/gerbera/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..933123cc70d8
--- /dev/null
+++ b/net/gerbera/files/patch-CMakeLists.txt
@@ -0,0 +1,8 @@
+--- CMakeLists.txt.orig 2020-09-06 01:54:18 UTC
++++ CMakeLists.txt
+@@ -528,4 +528,4 @@ INSTALL(FILES
+ ${PROJECT_SOURCE_DIR}/config/mysql.sql
+ ${PROJECT_SOURCE_DIR}/config/sqlite3.sql
+ DESTINATION share/gerbera)
+-INSTALL(FILES ${PROJECT_SOURCE_DIR}/doc/gerbera.1 DESTINATION share/man/man1)
++INSTALL(FILES ${PROJECT_SOURCE_DIR}/doc/gerbera.1 DESTINATION man/man1)
diff --git a/net/gerbera/files/patch-test_core_test__server.cc b/net/gerbera/files/patch-test_core_test__server.cc
new file mode 100644
index 000000000000..2d1eadbc156b
--- /dev/null
+++ b/net/gerbera/files/patch-test_core_test__server.cc
@@ -0,0 +1,20 @@
+--- test/core/test_server.cc.orig 2020-07-27 06:07:30 UTC
++++ test/core/test_server.cc
+@@ -51,17 +51,6 @@ TEST_F(ServerTest, ServerOutputsHelpInformation)
+ ASSERT_THAT(output.c_str(), HasSubstr(expectedOutput.c_str()));
+ }
+
+-TEST_F(ServerTest, ServerOutputsCompileInformationIncludingGit)
+-{
+- fs::path cmd = fs::path(CMAKE_BINARY_DIR) / "gerbera --compile-info 2>&1";
+- std::string output = exec(cmd.c_str());
+-
+- ASSERT_THAT(output, HasSubstr("Compile info\n-------------\nWITH_"));
+- ASSERT_THAT(output, HasSubstr("Git info:\n-------------\n"));
+- ASSERT_THAT(output, HasSubstr("Git Branch: "));
+- ASSERT_THAT(output, HasSubstr("Git Commit: "));
+-}
+-
+ TEST_F(ServerTest, GeneratesFullConfigFromServerCommand)
+ {
+ // simple check to ensure complete generation from server
diff --git a/net/gerbera/files/pkg-message.in b/net/gerbera/files/pkg-message.in
new file mode 100644
index 000000000000..ee03136d30a8
--- /dev/null
+++ b/net/gerbera/files/pkg-message.in
@@ -0,0 +1,11 @@
+[
+{ type: install
+ message: <<EOM
+ Edit /etc/rc.conf(.local) to start Gerbera automatically at system
+ startup. Command line arguments can be set via gerbera_args.
+
+ A sample configuration file is installed at the follow location:
+ %%PREFIX%%/etc/gerbera-config.xml.sample
+EOM
+}
+]
diff --git a/net/gerbera/pkg-descr b/net/gerbera/pkg-descr
new file mode 100644
index 000000000000..9957bd633c1b
--- /dev/null
+++ b/net/gerbera/pkg-descr
@@ -0,0 +1,6 @@
+Gerbera is a DLNA compatible media server and a continuation of MediaTomb
+It allows you to browse and playback your media via your network, supports
+metadata extraction, media thumbnail support and generation, media transcoding
+and offers a Web UI.
+
+WWW: https://gerbera.io/
diff --git a/net/gerbera/pkg-plist b/net/gerbera/pkg-plist
new file mode 100644
index 000000000000..c3bceadbac82
--- /dev/null
+++ b/net/gerbera/pkg-plist
@@ -0,0 +1,86 @@
+bin/gerbera
+%%DATADIR%%/js/common.js
+%%DATADIR%%/js/import.js
+%%DATADIR%%/js/import_structured.js
+%%DATADIR%%/js/playlists.js
+%%DATADIR%%/mappings.xml
+%%DATADIR%%/mysql.sql
+%%DATADIR%%/sqlite3.sql
+%%DATADIR%%/web/README.md
+%%DATADIR%%/web/assets/theme/colors.css
+%%DATADIR%%/web/assets/theme/gerbera-logo-white.png
+%%DATADIR%%/web/assets/theme/gerbera.css
+%%DATADIR%%/web/cds.xml
+%%DATADIR%%/web/cm.xml
+%%DATADIR%%/web/disabled.html
+%%DATADIR%%/web/favicon.ico
+%%DATADIR%%/web/icons/mt-icon120.bmp
+%%DATADIR%%/web/icons/mt-icon120.jpg
+%%DATADIR%%/web/icons/mt-icon120.png
+%%DATADIR%%/web/icons/mt-icon32.bmp
+%%DATADIR%%/web/icons/mt-icon32.jpg
+%%DATADIR%%/web/icons/mt-icon32.png
+%%DATADIR%%/web/icons/mt-icon48.bmp
+%%DATADIR%%/web/icons/mt-icon48.jpg
+%%DATADIR%%/web/icons/mt-icon48.png
+%%DATADIR%%/web/index.html
+%%DATADIR%%/web/js/gerbera-app.module.js
+%%DATADIR%%/web/js/gerbera-auth.module.js
+%%DATADIR%%/web/js/gerbera-autoscan.module.js
+%%DATADIR%%/web/js/gerbera-clients.module.js
+%%DATADIR%%/web/js/gerbera-items.module.js
+%%DATADIR%%/web/js/gerbera-menu.module.js
+%%DATADIR%%/web/js/gerbera-trail.module.js
+%%DATADIR%%/web/js/gerbera-tree.module.js
+%%DATADIR%%/web/js/gerbera-updates.module.js
+%%DATADIR%%/web/js/jquery.gerbera.autoscan.js
+%%DATADIR%%/web/js/jquery.gerbera.clients.js
+%%DATADIR%%/web/js/jquery.gerbera.editor.js
+%%DATADIR%%/web/js/jquery.gerbera.items.js
+%%DATADIR%%/web/js/jquery.gerbera.toast.js
+%%DATADIR%%/web/js/jquery.gerbera.trail.js
+%%DATADIR%%/web/js/jquery.gerbera.tree.js
+%%DATADIR%%/web/js/md5.js
+%%DATADIR%%/web/mr_reg.xml
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-grid.css
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-grid.css.map
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-grid.min.css
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-grid.min.css.map
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-reboot.css
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-reboot.css.map
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-reboot.min.css
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-reboot.min.css.map
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap.css
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap.css.map
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap.min.css
+%%DATADIR%%/web/vendor/bootstrap/css/bootstrap.min.css.map
+%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.bundle.js
+%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.bundle.js.map
+%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.bundle.min.js
+%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.bundle.min.js.map
+%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.js
+%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.js.map
+%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.min.js
+%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.min.js.map
+%%DATADIR%%/web/vendor/font-awesome/css/font-awesome.css
+%%DATADIR%%/web/vendor/font-awesome/css/font-awesome.min.css
+%%DATADIR%%/web/vendor/font-awesome/fonts/FontAwesome.otf
+%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.eot
+%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.svg
+%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.ttf
+%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.woff
+%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.woff2
+%%DATADIR%%/web/vendor/jquery/jquery-3.4.0.min.js
+%%DATADIR%%/web/vendor/jquery/jquery-ui.min.js
+%%DATADIR%%/web/vendor/js-cookie.js
+%%DATADIR%%/web/vendor/lato/LICENCE.md
+%%DATADIR%%/web/vendor/lato/lato-v14-latin-ext_latin-regular.woff
+%%DATADIR%%/web/vendor/lato/lato-v14-latin-ext_latin-regular.woff2
+%%DATADIR%%/web/vendor/popper/popper.js
+%%DATADIR%%/web/vendor/tether/tether.min.js
+man/man1/gerbera.1.gz
+@owner %%USER%%
+@group %%GROUP%%
+@dir /var/db/gerbera
+@dir /var/log/gerbera
+@sample(gerbera,gerbera,0640) /usr/local/etc/gerbera-config.xml.sample