mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
gerbera, new recipe (#4734)
This commit is contained in:
147
net-misc/gerbera/additional-files/config.xml
Normal file
147
net-misc/gerbera/additional-files/config.xml
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
|
||||
<!--
|
||||
See http://gerbera.io or read the docs for more
|
||||
information on creating and using config.xml configration files.
|
||||
-->
|
||||
<server>
|
||||
<ui enabled="yes" show-tooltips="yes">
|
||||
<accounts enabled="no" session-timeout="30">
|
||||
<account user="gerbera" password="gerbera"/>
|
||||
</accounts>
|
||||
</ui>
|
||||
<name>Gerbera</name>
|
||||
<udn>uuid:3a49bdf9-c613-476e-a684-8274ae67ee16</udn>
|
||||
<home>/boot/home/config/settings/gerbera</home>
|
||||
<webroot>/system/data/gerbera/web</webroot>
|
||||
<!--
|
||||
How frequently (in seconds) to send ssdp:alive advertisements.
|
||||
Minimum alive value accepted is: 62
|
||||
|
||||
The advertisement will be sent every (A/2)-30 seconds,
|
||||
and will have a cache-control max-age of A where A is
|
||||
the value configured here. Ex: A value of 62 will result
|
||||
in an SSDP advertisement being sent every second.
|
||||
-->
|
||||
<alive>1800</alive>
|
||||
<storage>
|
||||
<sqlite3 enabled="yes">
|
||||
<database-file>gerbera.db</database-file>
|
||||
</sqlite3>
|
||||
</storage>
|
||||
<protocolInfo extend="no" dlna-seek="yes"/><!-- For PS3 support change to "yes" -->
|
||||
<!--
|
||||
Uncomment the lines below to get rid of jerky avi playback on the
|
||||
DSM320 or to enable subtitles support on the DSM units
|
||||
-->
|
||||
<!--
|
||||
<custom-http-headers>
|
||||
<add header="X-User-Agent: redsonic"/>
|
||||
</custom-http-headers>
|
||||
|
||||
<manufacturerURL>redsonic.com</manufacturerURL>
|
||||
<modelNumber>105</modelNumber>
|
||||
-->
|
||||
<!-- Uncomment the line below if you have a Telegent TG100 -->
|
||||
<!--
|
||||
<upnp-string-limit>101</upnp-string-limit>
|
||||
-->
|
||||
<extended-runtime-options>
|
||||
<mark-played-items enabled="no" suppress-cds-updates="yes">
|
||||
<string mode="prepend">*</string>
|
||||
<mark>
|
||||
<content>video</content>
|
||||
</mark>
|
||||
</mark-played-items>
|
||||
</extended-runtime-options>
|
||||
</server>
|
||||
<import hidden-files="no">
|
||||
<scripting script-charset="UTF-8">
|
||||
<virtual-layout type="builtin"/>
|
||||
</scripting>
|
||||
<mappings>
|
||||
<extension-mimetype ignore-unknown="no">
|
||||
<map from="mp3" to="audio/mpeg"/>
|
||||
<map from="ogx" to="application/ogg"/>
|
||||
<map from="ogv" to="video/ogg"/>
|
||||
<map from="oga" to="audio/ogg"/>
|
||||
<map from="ogg" to="audio/ogg"/>
|
||||
<map from="ogm" to="video/ogg"/>
|
||||
<map from="asf" to="video/x-ms-asf"/>
|
||||
<map from="asx" to="video/x-ms-asf"/>
|
||||
<map from="wma" to="audio/x-ms-wma"/>
|
||||
<map from="wax" to="audio/x-ms-wax"/>
|
||||
<map from="wmv" to="video/x-ms-wmv"/>
|
||||
<map from="wvx" to="video/x-ms-wvx"/>
|
||||
<map from="wm" to="video/x-ms-wm"/>
|
||||
<map from="wmx" to="video/x-ms-wmx"/>
|
||||
<map from="m3u" to="audio/x-mpegurl"/>
|
||||
<map from="pls" to="audio/x-scpls"/>
|
||||
<map from="flv" to="video/x-flv"/>
|
||||
<map from="mkv" to="video/x-matroska"/>
|
||||
<map from="mka" to="audio/x-matroska"/>
|
||||
<map from="dsf" to="audio/x-dsd"/>
|
||||
<map from="dff" to="audio/x-dsd"/>
|
||||
<map from="wv" to="audio/x-wavpack"/>
|
||||
<!-- Uncomment the line below for PS3 divx support -->
|
||||
<!-- <map from="avi" to="video/divx"/> -->
|
||||
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
|
||||
<!-- <map from="avi" to="video/avi"/> -->
|
||||
</extension-mimetype>
|
||||
<mimetype-upnpclass>
|
||||
<map from="audio/*" to="object.item.audioItem.musicTrack"/>
|
||||
<map from="video/*" to="object.item.videoItem"/>
|
||||
<map from="image/*" to="object.item.imageItem"/>
|
||||
<map from="application/ogg" to="object.item.audioItem.musicTrack"/>
|
||||
</mimetype-upnpclass>
|
||||
<mimetype-contenttype>
|
||||
<treat mimetype="audio/mpeg" as="mp3"/>
|
||||
<treat mimetype="application/ogg" as="ogg"/>
|
||||
<treat mimetype="audio/ogg" as="ogg"/>
|
||||
<treat mimetype="audio/x-flac" as="flac"/>
|
||||
<treat mimetype="audio/flac" as="flac"/>
|
||||
<treat mimetype="audio/x-ms-wma" as="wma"/>
|
||||
<treat mimetype="audio/x-wavpack" as="wv"/>
|
||||
<treat mimetype="image/jpeg" as="jpg"/>
|
||||
<treat mimetype="audio/x-mpegurl" as="playlist"/>
|
||||
<treat mimetype="audio/x-scpls" as="playlist"/>
|
||||
<treat mimetype="audio/x-wav" as="pcm"/>
|
||||
<treat mimetype="audio/L16" as="pcm"/>
|
||||
<treat mimetype="video/x-msvideo" as="avi"/>
|
||||
<treat mimetype="video/mp4" as="mp4"/>
|
||||
<treat mimetype="audio/mp4" as="mp4"/>
|
||||
<treat mimetype="video/x-matroska" as="mkv"/>
|
||||
<treat mimetype="audio/x-matroska" as="mka"/>
|
||||
<treat mimetype="audio/x-dsd" as="dsd"/>
|
||||
</mimetype-contenttype>
|
||||
</mappings>
|
||||
<online-content>
|
||||
<AppleTrailers enabled="no" refresh="43200" update-at-start="no" resolution="640"/>
|
||||
</online-content>
|
||||
</import>
|
||||
<transcoding enabled="no">
|
||||
<mimetype-profile-mappings>
|
||||
<transcode mimetype="video/x-flv" using="vlcmpeg"/>
|
||||
<transcode mimetype="application/ogg" using="vlcmpeg"/>
|
||||
<transcode mimetype="audio/ogg" using="ogg2mp3"/>
|
||||
</mimetype-profile-mappings>
|
||||
<profiles>
|
||||
<profile name="ogg2mp3" enabled="no" type="external">
|
||||
<mimetype>audio/mpeg</mimetype>
|
||||
<accept-url>no</accept-url>
|
||||
<first-resource>yes</first-resource>
|
||||
<accept-ogg-theora>no</accept-ogg-theora>
|
||||
<agent command="ffmpeg" arguments="-y -i %in -f mp3 %out"/>
|
||||
<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
|
||||
</profile>
|
||||
<profile name="vlcmpeg" enabled="no" type="external">
|
||||
<mimetype>video/mpeg</mimetype>
|
||||
<accept-url>yes</accept-url>
|
||||
<first-resource>yes</first-resource>
|
||||
<accept-ogg-theora>yes</accept-ogg-theora>
|
||||
<agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
|
||||
<buffer size="14400000" chunk-size="512000" fill-size="120000"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
</transcoding>
|
||||
</config>
|
||||
13
net-misc/gerbera/additional-files/install_config.sh
Normal file
13
net-misc/gerbera/additional-files/install_config.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#! /bin/sh
|
||||
|
||||
settingsDir="$(finddir B_USER_SETTINGS_DIRECTORY)"
|
||||
|
||||
systemConfig="$(finddir B_SYSTEM_SETTINGS_DIRECTORY)/gerbera"
|
||||
|
||||
mkdir -p $settingsDir
|
||||
|
||||
if [ -d "$systemConfig" ]; then
|
||||
mv "$systemConfig" "$settingsDir"
|
||||
else
|
||||
exit 1 #couldn't find $systemConfig
|
||||
fi
|
||||
115
net-misc/gerbera/gerbera-1.4.0.recipe
Normal file
115
net-misc/gerbera/gerbera-1.4.0.recipe
Normal file
@@ -0,0 +1,115 @@
|
||||
SUMMARY="Open source UPnP Media Server"
|
||||
DESCRIPTION="MediaTomb is an open source UPnP MediaServer"
|
||||
HOMEPAGE="https://sourceforge.net/projects/mediatomb/"
|
||||
COPYRIGHT="2005-2010 Gena Batyan, Sergey 'Jin' Bostandzhyan, Leonhard Wimmer"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/gerbera/gerbera/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="904a9031c85ac805e4c139f363510226952683d7257acd1dee25ba1e97fd7651"
|
||||
PATCHES="gerbera-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="
|
||||
config.xml
|
||||
install_config.sh
|
||||
"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
settings/gerbera/config.xml keep-old
|
||||
"
|
||||
POST_INSTALL_SCRIPTS="
|
||||
$relativePostInstallDir/install_config.sh
|
||||
"
|
||||
|
||||
PROVIDES="
|
||||
gerbera$secondaryArchSuffix = $portVersion
|
||||
cmd:gerbera$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
#lib:libavcodec$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libebml$secondaryArchSuffix
|
||||
lib:libexif$secondaryArchSuffix
|
||||
lib:libexpat$secondaryArchSuffix
|
||||
#lib:libextractor$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libmagic$secondaryArchSuffix
|
||||
lib:libmatroska$secondaryArchSuffix
|
||||
#lib:libmozjs185$secondaryArchSuffix
|
||||
#lib:libmp4v2$secondaryArchSuffix
|
||||
lib:libnghttp2$secondaryArchSuffix
|
||||
lib:libsqlite3$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libtag$secondaryArchSuffix
|
||||
lib:libupnp$secondaryArchSuffix
|
||||
lib:libuuid$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
#devel:libavcodec$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
# devel:libcrypto$secondaryArchSuffix
|
||||
devel:libebml$secondaryArchSuffix
|
||||
devel:libexif$secondaryArchSuffix
|
||||
devel:libexpat$secondaryArchSuffix
|
||||
#devel:libextractor$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
# devel:libintl$secondaryArchSuffix
|
||||
devel:libmagic$secondaryArchSuffix
|
||||
devel:libmatroska$secondaryArchSuffix
|
||||
#devel:libmozjs185$secondaryArchSuffix
|
||||
#devel:libmp4v2$secondaryArchSuffix
|
||||
devel:libsqlite3$secondaryArchSuffix
|
||||
# devel:libssl$secondaryArchSuffix
|
||||
devel:libtag$secondaryArchSuffix
|
||||
devel:libupnp$secondaryArchSuffix
|
||||
devel:libuuid$secondaryArchSuffix >= 1.3
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
||||
-DCMAKE_INSTALL_DATADIR=$dataDir/gerbera \
|
||||
-DCMAKE_INSTALL_MANDIR=$manDir/man1 \
|
||||
-DCMAKE_CXX_FLAGS=-D_BSD_SOURCE \
|
||||
-L -DWITH_INOTIFY=0 \
|
||||
-DWITH_JS=0 \
|
||||
-DWITH_SYSTEMD=0
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
mkdir -p $settingsDir/gerbera
|
||||
cp $portDir/additional-files/config.xml $settingsDir/gerbera
|
||||
|
||||
mkdir -p $postInstallDir
|
||||
cp $portDir/additional-files/install_config.sh $postInstallDir
|
||||
}
|
||||
106
net-misc/gerbera/patches/gerbera-1.4.0.patchset
Normal file
106
net-misc/gerbera/patches/gerbera-1.4.0.patchset
Normal file
@@ -0,0 +1,106 @@
|
||||
From 3eb36adbc1efdfb932b9d9f3149a985c94d56bf3 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sun, 16 Feb 2020 15:41:59 +0000
|
||||
Subject: Fix undeclared SIOCGIFADDR
|
||||
|
||||
|
||||
diff --git a/src/tools.cc b/src/tools.cc
|
||||
index 6dec392..621e57a 100644
|
||||
--- a/src/tools.cc
|
||||
+++ b/src/tools.cc
|
||||
@@ -51,6 +51,10 @@
|
||||
#include <uuid/uuid.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <sys/sockio.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef SOLARIS
|
||||
#include <fcntl.h>
|
||||
#include <sys/sockio.h>
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From 6991c39bb5631a7a5bcbd22962202ced74fea883 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sun, 16 Feb 2020 16:19:26 +0000
|
||||
Subject: Fix install paths
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8089f09..63101b5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -33,6 +33,10 @@ set(WITH_LASTFM 0 CACHE BOOL "Enable LastFM")
|
||||
set(WITH_DEBUG 1 CACHE BOOL "Enables debug logging")
|
||||
set(WITH_TESTS 0 CACHE BOOL "Enables Unit Tests")
|
||||
|
||||
+set(CMAKE_INSTALL_BINDIR=bin)
|
||||
+set(CMAKE_INSTALL_DATADIR=share/gerbera)
|
||||
+set(CMAKE_INSTALL_MANDIR=share/man/man1)
|
||||
+
|
||||
set(libgerberaFILES
|
||||
src/action_request.cc
|
||||
src/action_request.h
|
||||
@@ -600,12 +604,12 @@ if(WITH_TESTS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-INSTALL(TARGETS gerbera DESTINATION bin)
|
||||
-INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/scripts/js DESTINATION share/gerbera)
|
||||
-INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/web DESTINATION share/gerbera)
|
||||
+INSTALL(TARGETS gerbera DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/scripts/js DESTINATION ${CMAKE_INSTALL_DATADIR})
|
||||
+INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/web DESTINATION ${CMAKE_INSTALL_DATADIR})
|
||||
INSTALL(FILES
|
||||
${PROJECT_SOURCE_DIR}/config/mappings.xml
|
||||
${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)
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR})
|
||||
+INSTALL(FILES ${PROJECT_SOURCE_DIR}/doc/gerbera.1 DESTINATION ${CMAKE_INSTALL_MANDIR})
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From c4f5ab5ae115f71b920a90d6f75c27398a5003c5 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sat, 22 Feb 2020 17:21:21 +0100
|
||||
Subject: Fix linking to -lnetwork
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 63101b5..c2417d1 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -408,14 +408,22 @@ if (HAVE_SETLOCALE)
|
||||
endif()
|
||||
|
||||
# Link to the socket library if it exists. This is something you need on Solaris/OmniOS/Joyent
|
||||
-find_library(SOCKET_LIBRARY socket)
|
||||
+if(HAIKU)
|
||||
+ find_library(SOCKET_LIBRARY network)
|
||||
+else()
|
||||
+ find_library(SOCKET_LIBRARY socket)
|
||||
+endif()
|
||||
if(SOCKET_LIBRARY)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SOCKET_LIBRARY})
|
||||
target_link_libraries(gerbera ${SOCKET_LIBRARY})
|
||||
endif()
|
||||
|
||||
# Link to libnsl (Network services library) if it exists. This is something you need on Solaris/OmniOS/Joyent
|
||||
-find_library(NSL_LIBRARY nsl)
|
||||
+if(HAIKU)
|
||||
+ find_library(NSL_LIBRARY network)
|
||||
+else()
|
||||
+ find_library(NSL_LIBRARY nsl)
|
||||
+endif()
|
||||
if(NSL_LIBRARY)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${NSL_LIBRARY})
|
||||
target_link_libraries(gerbera ${NSL_LIBRARY})
|
||||
--
|
||||
2.24.1
|
||||
|
||||
Reference in New Issue
Block a user