--- net/gerbera/Makefile (nonexistent) +++ net/gerbera/Makefile (working copy) @@ -0,0 +1,83 @@ +# $FreeBSD$ + +PORTNAME= gerbera +DISTVERSIONPREFIX= v +DISTVERSION= 1.6.1 +CATEGORIES= net multimedia www + +MAINTAINER= melanhit@gmail.com +COMMENT= UPnP media server + +LICENSE= GPLv2 + +LIB_DEPENDS= libupnp.so:devel/upnp \ + libfmt.so:devel/libfmt \ + libspdlog.so:devel/spdlog \ + libpugixml.so:textproc/pugixml \ + libsqlite3.so:databases/sqlite3 + +USES= cmake compiler:c++17-lang pkgconfig + +USERS= gerbera +GROUPS= gerbera +USE_RC_SUBR= gerbera + +USE_GITHUB= yes +GH_ACCOUNT= gerbera + +CMAKE_OFF= WITH_EXIF WITH_SYSTEMD + +.if !defined(MAINTAINER_MODE) +CMAKE_ARGS+= -Wno-dev +.endif + +OPTIONS_DEFINE= CURL EXIV2 FFMPEG INOTIFY JS MATROSKA MYSQL TAGLIB TEST +OPTIONS_DEFAULT= EXIV2 TAGLIB +OPTIONS_SUB= yes + +CURL_CMAKE_BOOL= WITH_CURL +CURL_DESC= Support for online services +CURL_LIB_DEPENDS= libcurl.so:ftp/curl + +EXIV2_CMAKE_BOOL= WITH_EXIV2 +EXIV2_DESC= Extract image metadata +EXIV2_LIB_DEPENDS= libexiv2.so:graphics/exiv2 + +FFMPEG_CMAKE_BOOL= WITH_AVCODEC WITH_FFMPEGTHUMBNAILER +FFMPEG_DESC= Enable transcoding +FFMPEG_USES= iconv +FFMPEG_LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \ + libffmpegthumbnailer.so:multimedia/ffmpegthumbnailer + +INOTIFY_CMAKE_BOOL= WITH_INOTIFY +INOTIFY_DESC= File monitoring support +INOTIFY_LIB_DEPENDS= libinotify.so:devel/libinotify + +JS_CMAKE_BOOL= WITH_JS +JS_DESC= Enable JavaScript for custom import script +JS_LIB_DEPENDS= libduktape.so:lang/duktape-lib + +MATROSKA_CMAKE_BOOL= WITH_MATROSKA +MATROSKA_DESC= Use libmatroska to extract video/mkv metadata +MATROSKA_LIB_DEPENDS= libmatroska.so:multimedia/libmatroska + +MYSQL_CMAKE_BOOL= WITH_MYSQL +MYSQL_DESC= Store media information in MySQL +MYSQL_USES= mysql:client + +TAGLIB_CMAKE_BOOL= WITH_TAGLIB +TAGLIB_DESC= Extract audio file metadata +TAGLIB_LIB_DEPENDS= libtag.so:audio/taglib + +TEST_CMAKE_BOOL= WITH_TESTS +TEST_TARGET= test +TEST_IMPLIES= CURL JS +TEST_BUILD_DEPENDS= googletest>=0:devel/googletest + +post-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/gerbera + @${MKDIR} ${STAGEDIR}/var/db/gerbera + @${MKDIR} ${STAGEDIR}/var/log/gerbera + @${STAGEDIR}${PREFIX}/bin/gerbera -f ${STAGEDIR}/var/db/gerbera --create-config > ${STAGEDIR}${PREFIX}/etc/gerbera/config.xml.sample + +.include --- net/gerbera/distinfo (nonexistent) +++ net/gerbera/distinfo (working copy) @@ -0,0 +1,3 @@ +TIMESTAMP = 1599407515 +SHA256 (gerbera-gerbera-v1.6.1_GH0.tar.gz) = 9bb119ee422c8e7a053c309256215a8899dfd6707f6b93496e6facea7978ac7c +SIZE (gerbera-gerbera-v1.6.1_GH0.tar.gz) = 3061089 --- net/gerbera/files/gerbera.in (nonexistent) +++ net/gerbera/files/gerbera.in (working copy) @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: gerbera +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable this service: +# +# gerbera_enable: Set to NO by default. Set it to YES to enable it. +# gerbera_conf_dir: Directory where gerbera configuration +# data is stored. +# Default: %%PREFIX%%/etc/gerbera +# gerbera_home_dir: Home directory for gerbera +# Default: /var/db/gerbera + +. /etc/rc.subr + +name=gerbera +rcvar=gerbera_enable + +load_rc_config $name + +: ${gerbera_enable="NO"} +: ${gerbera_conf_dir="%%PREFIX%%/etc/gerbera/"} +: ${gerbera_home_dir="/var/db/gerbera/"} + +command="%%PREFIX%%/bin/$name" +command_args="--logfile=/var/log/gerbera/gerbera.log" +pidfile="/var/run/gerbera.pid" + +gerbera_flags=" \ + ${gerbera_conf_dir:+--cfgdir=${gerbera_conf_dir}} \ + ${gerbera_home_dir:+--home=${gerbera_home_dir}} \ + ${gerbera_flags}" + +start_cmd="/usr/sbin/daemon -p $pidfile -u $name $command $command_args $gerbera_flags" + +run_rc_command $1 --- net/gerbera/files/patch-CMakeLists.txt (nonexistent) +++ net/gerbera/files/patch-CMakeLists.txt (working copy) @@ -0,0 +1,29 @@ +--- CMakeLists.txt.orig 2020-09-03 19:02:07 UTC ++++ CMakeLists.txt +@@ -306,6 +306,7 @@ target_link_libraries(libgerbera ${LFS_LIBRARIES}) + find_package (pupnp "1.12.1" REQUIRED) + + set(CMAKE_REQUIRED_LIBRARIES pupnp::pupnp) ++set(CMAKE_REQUIRED_INCLUDES ${UPNP_INCLUDE_DIRS}) + + check_cxx_symbol_exists(UPNP_ENABLE_IPV6 "upnpconfig.h" UPNP_HAS_IPV6) + if (NOT UPNP_HAS_IPV6) +@@ -389,11 +390,7 @@ if(WITH_MYSQL) + endif() + + if(WITH_CURL) +- find_package(PkgConfig QUIET) +- pkg_check_modules (CURL QUIET libcurl) +- if (NOT CURL_FOUND) +- find_package (CURL REQUIRED) +- endif() ++ find_package (CURL REQUIRED) + if (CURL_FOUND) + include_directories(${CURL_INCLUDE_DIRS}) + target_link_libraries (libgerbera ${CURL_LIBRARIES}) +@@ -528,4 +525,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) --- net/gerbera/files/patch-cmake-FindMatroska.cmake (nonexistent) +++ net/gerbera/files/patch-cmake-FindMatroska.cmake (working copy) @@ -0,0 +1,20 @@ +--- cmake/FindMatroska.cmake.orig 2020-09-03 19:02:07 UTC ++++ cmake/FindMatroska.cmake +@@ -23,7 +23,7 @@ FIND_LIBRARY(EBML_LIBRARY ebml + FIND_PACKAGE_HANDLE_STANDARD_ARGS(EBML + REQUIRED_VARS EBML_LIBRARY EBML_INCLUDE_DIR) + if (EBML_FOUND) +- set (EBML_LIBRARIES ${EBML_LIBRARY} ${PC_EBM_LIBRARIES}) ++ set (EBML_LIBRARIES ${EBML_LIBRARY}) + set (EBML_INCLUDE_DIRS ${EBML_INCLUDE_DIR} ) + endif () + MARK_AS_ADVANCED( +@@ -41,7 +41,7 @@ find_library(MATROSKA_LIBRARY matroska + FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATROSKA + REQUIRED_VARS MATROSKA_LIBRARY MATROSKA_INCLUDE_DIR) + if (MATROSKA_FOUND) +- set (MATROSKA_LIBRARIES ${MATROSKA_LIBRARY} ${PC_MAT_LIBRARIES}) ++ set (MATROSKA_LIBRARIES ${MATROSKA_LIBRARY}) + set (MATROSKA_INCLUDE_DIRS ${MATROSKA_INCLUDE_DIR} ) + endif () + MARK_AS_ADVANCED( --- net/gerbera/files/patch-cmake-Findpupnp.cmake (nonexistent) +++ net/gerbera/files/patch-cmake-Findpupnp.cmake (working copy) @@ -0,0 +1,11 @@ +--- cmake/Findpupnp.cmake.orig 2020-07-24 19:37:20 UTC ++++ cmake/Findpupnp.cmake +@@ -35,7 +35,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(pupnp + VERSION_VAR pupnp_VERSION) + + if (pupnp_FOUND) +- set (UPNP_LIBRARIES ${UPNP_UPNP_LIBRARY} ${UPNP_IXML_LIBRARY} ${PC_UPNP_LIBRARIES}) ++ set (UPNP_LIBRARIES ${UPNP_UPNP_LIBRARY} ${UPNP_IXML_LIBRARY}) + set (UPNP_INCLUDE_DIRS ${UPNP_INCLUDE_DIR} ) + + if(NOT TARGET pupnp::pupnp) --- net/gerbera/pkg-descr (nonexistent) +++ net/gerbera/pkg-descr (working copy) @@ -0,0 +1,13 @@ +Gerbera is an UPnP Media Server. + +Main Features + + * Browse and playback your media via your network on all kinds of devices + * Metadata extraction + * Media thumbnail support + * Highly flexible media format transcoding via plugins / scripts + * Automatic directory rescans + * Web UI with a tree view of the database and the file system + * On the fly video thumbnail generation + +WWW: https://gerbera.io/ --- net/gerbera/pkg-plist (nonexistent) +++ net/gerbera/pkg-plist (working copy) @@ -0,0 +1,100 @@ +bin/gerbera +man/man1/gerbera.1.gz +%%DATADIR%%/mappings.xml +%%DATADIR%%/web/cm.xml +%%DATADIR%%/web/icons/mt-icon120.png +%%DATADIR%%/web/icons/mt-icon32.bmp +%%DATADIR%%/web/icons/mt-icon48.bmp +%%DATADIR%%/web/icons/mt-icon48.png +%%DATADIR%%/web/icons/mt-icon120.jpg +%%DATADIR%%/web/icons/mt-icon48.jpg +%%DATADIR%%/web/icons/mt-icon32.png +%%DATADIR%%/web/icons/mt-icon32.jpg +%%DATADIR%%/web/icons/mt-icon120.bmp +%%DATADIR%%/web/mr_reg.xml +%%DATADIR%%/web/index.html +%%DATADIR%%/web/vendor/jquery/jquery-3.4.0.min.js +%%DATADIR%%/web/vendor/jquery/jquery-ui.min.js +%%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/lato/LICENCE.md +%%DATADIR%%/web/vendor/js-cookie.js +%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.min.js +%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.js +%%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.min.js.map +%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.bundle.js.map +%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.bundle.js +%%DATADIR%%/web/vendor/bootstrap/js/bootstrap.js.map +%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-reboot.min.css +%%DATADIR%%/web/vendor/bootstrap/css/bootstrap.min.css +%%DATADIR%%/web/vendor/bootstrap/css/bootstrap.css.map +%%DATADIR%%/web/vendor/bootstrap/css/bootstrap.min.css.map +%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-grid.css.map +%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-reboot.css.map +%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-reboot.min.css.map +%%DATADIR%%/web/vendor/bootstrap/css/bootstrap-grid.min.css +%%DATADIR%%/web/vendor/bootstrap/css/bootstrap.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-grid.css +%%DATADIR%%/web/vendor/tether/tether.min.js +%%DATADIR%%/web/vendor/popper/popper.js +%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.woff2 +%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.eot +%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.woff +%%DATADIR%%/web/vendor/font-awesome/fonts/FontAwesome.otf +%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.svg +%%DATADIR%%/web/vendor/font-awesome/fonts/fontawesome-webfont.ttf +%%DATADIR%%/web/vendor/font-awesome/css/font-awesome.min.css +%%DATADIR%%/web/vendor/font-awesome/css/font-awesome.css +%%DATADIR%%/web/js/gerbera-trail.module.js +%%DATADIR%%/web/js/jquery.gerbera.toast.js +%%DATADIR%%/web/js/jquery.gerbera.editor.js +%%DATADIR%%/web/js/gerbera-items.module.js +%%DATADIR%%/web/js/gerbera-clients.module.js +%%DATADIR%%/web/js/gerbera-updates.module.js +%%DATADIR%%/web/js/md5.js +%%DATADIR%%/web/js/jquery.gerbera.items.js +%%DATADIR%%/web/js/gerbera-autoscan.module.js +%%DATADIR%%/web/js/jquery.gerbera.clients.js +%%DATADIR%%/web/js/jquery.gerbera.autoscan.js +%%DATADIR%%/web/js/gerbera-menu.module.js +%%DATADIR%%/web/js/jquery.gerbera.tree.js +%%DATADIR%%/web/js/gerbera-tree.module.js +%%DATADIR%%/web/js/gerbera-app.module.js +%%DATADIR%%/web/js/jquery.gerbera.trail.js +%%DATADIR%%/web/js/gerbera-auth.module.js +%%DATADIR%%/web/README.md +%%DATADIR%%/web/disabled.html +%%DATADIR%%/web/assets/theme/gerbera-logo-white.png +%%DATADIR%%/web/assets/theme/colors.css +%%DATADIR%%/web/assets/theme/gerbera.css +%%DATADIR%%/web/cds.xml +%%DATADIR%%/web/favicon.ico +%%DATADIR%%/sqlite3.sql +%%DATADIR%%/js/import.js +%%DATADIR%%/js/common.js +%%DATADIR%%/js/playlists.js +%%DATADIR%%/js/import_structured.js +%%DATADIR%%/mysql.sql +@dir %%DATADIR%%/js +@dir %%DATADIR%%/web/assets/theme +@dir %%DATADIR%%/web/assets +@dir %%DATADIR%%/web/icons +@dir %%DATADIR%%/web/js +@dir %%DATADIR%%/web/vendor/bootstrap/css +@dir %%DATADIR%%/web/vendor/bootstrap/js +@dir %%DATADIR%%/web/vendor/bootstrap +@dir %%DATADIR%%/web/vendor/font-awesome/css +@dir %%DATADIR%%/web/vendor/font-awesome/fonts +@dir %%DATADIR%%/web/vendor/font-awesome +@dir %%DATADIR%%/web/vendor/jquery +@dir %%DATADIR%%/web/vendor/lato +@dir %%DATADIR%%/web/vendor/popper +@dir %%DATADIR%%/web/vendor/tether +@dir etc/gerbera +@dir(gerbera,gerbera,750) /var/db/gerbera +@dir(gerbera,gerbera,750) /var/log/gerbera +@sample(gerbera,gerbera,640) etc/gerbera/config.xml.sample etc/gerbera/config.xml