osc copypac from project:home:mrbadguy package:gerbera revision:8
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/gerbera?expand=0&rev=1
This commit is contained in:
commit
2e7d00ebcf
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
90
FFMpegThumbnailer.patch
Normal file
90
FFMpegThumbnailer.patch
Normal file
@ -0,0 +1,90 @@
|
||||
From 139c001738bf134b81495fd6ceeb16bc26c2a643 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Whyman <thev00d00@gentoo.org>
|
||||
Date: Mon, 10 Jul 2017 13:55:15 +0100
|
||||
Subject: [PATCH] Add omitted FFMpegThumbnailer support back to build.
|
||||
|
||||
Enable it with -DWITH_FFMPEGTHUMBNAILER=1
|
||||
|
||||
Fixes #94
|
||||
---
|
||||
CMakeLists.txt | 12 ++++++++++++
|
||||
cmake/FindFFMpegThumbnailer.cmake | 27 +++++++++++++++++++++++++++
|
||||
src/metadata/ffmpeg_handler.cc | 1 +
|
||||
3 files changed, 40 insertions(+)
|
||||
create mode 100644 cmake/FindFFMpegThumbnailer.cmake
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 0afc60b3..45711c2e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -16,6 +16,7 @@ set(WITH_INOTIFY 1 CACHE BOOL "Enable Inotify file monitoring support")
|
||||
set(WITH_JS 1 CACHE BOOL "Enable JavaScript for custom import script")
|
||||
set(WITH_TAGLIB 1 CACHE BOOL "Use TagLib to extract audio file metadata")
|
||||
set(WITH_AVCODEC 0 CACHE BOOL "Enable ffmpeg/libav")
|
||||
+set(WITH_FFMPEGTHUMBNAILER 0 CACHE BOOL "Enable Thumbnail generation")
|
||||
set(WITH_EXIF 1 CACHE BOOL "Use libexif to extract image metadata")
|
||||
set(WITH_LASTFM 0 CACHE BOOL "Enable LastFM")
|
||||
set(WITH_LOGGING 1 CACHE BOOL "Enable file logging")
|
||||
@@ -495,6 +496,17 @@ if(WITH_AVCODEC)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
+if(WITH_FFMPEGTHUMBNAILER)
|
||||
+ find_package (FFMpegThumbnailer)
|
||||
+ if (FFMPEGTHUMBNAILER_FOUND)
|
||||
+ include_directories(${FFMPEGTHUMBNAILER_INCLUDE_DIR})
|
||||
+ target_link_libraries (gerbera ${FFMPEGTHUMBNAILER_LIBRARIES})
|
||||
+ add_definitions(-DHAVE_FFMPEGTHUMBNAILER)
|
||||
+ else()
|
||||
+ message(FATAL_ERROR "FFMpegThumbnailer not found")
|
||||
+ endif ()
|
||||
+endif()
|
||||
+
|
||||
if(WITH_EXIF)
|
||||
find_package (EXIF)
|
||||
if (EXIF_FOUND)
|
||||
diff --git a/cmake/FindFFMpegThumbnailer.cmake b/cmake/FindFFMpegThumbnailer.cmake
|
||||
new file mode 100644
|
||||
index 00000000..7e8c17b1
|
||||
--- /dev/null
|
||||
+++ b/cmake/FindFFMpegThumbnailer.cmake
|
||||
@@ -0,0 +1,27 @@
|
||||
+# - Try to find ffmpegthumbnailer
|
||||
+# Once done this will define
|
||||
+#
|
||||
+# FFMPEGTHUMBNAILER_FOUND - system has FFMpegThumbnailer
|
||||
+# FFMPEGTHUMBNAILER_INCLUDE_DIRS - the FFMpegThumbnailer include directory
|
||||
+# FFMPEGTHUMBNAILER_LIBRARIES - Link these to use FFMpegThumbnailer
|
||||
+#
|
||||
+
|
||||
+FIND_PACKAGE(PkgConfig QUIET)
|
||||
+PKG_CHECK_MODULES(PC_FFTHUMB QUIET libffmpegthumbnailer)
|
||||
+
|
||||
+FIND_PATH(FFMPEGTHUMBNAILER_INCLUDE_DIRS videothumbnailerc.h
|
||||
+ HINTS ${PC_FFTHUMB_INCLUDEDIR} ${PC_FFTHUMB_INCLUDE_DIRS}
|
||||
+ PATH_SUFFIXES ffmpegthumbnailer libffmpegthumbnailer)
|
||||
+
|
||||
+FIND_LIBRARY(FFMPEGTHUMBNAILER_LIBRARIES
|
||||
+ NAMES libffmpegthumbnailer ffmpegthumbnailer
|
||||
+ HINTS ${PC_FFTHUMB_LIBDIR} ${PC_FFTHUMB_LIBRARY_DIRS})
|
||||
+
|
||||
+INCLUDE(FindPackageHandleStandardArgs)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFMpegThumbnailer
|
||||
+ REQUIRED_VARS FFMPEGTHUMBNAILER_LIBRARIES FFMPEGTHUMBNAILER_INCLUDE_DIRS)
|
||||
+
|
||||
+MARK_AS_ADVANCED(
|
||||
+ FFMPEGTHUMBNAILER_INCLUDE_DIR
|
||||
+ FFMPEGTHUMBNAILER_LIBARY
|
||||
+)
|
||||
diff --git a/src/metadata/ffmpeg_handler.cc b/src/metadata/ffmpeg_handler.cc
|
||||
index 367a9069..296b75d2 100644
|
||||
--- a/src/metadata/ffmpeg_handler.cc
|
||||
+++ b/src/metadata/ffmpeg_handler.cc
|
||||
@@ -60,6 +60,7 @@ extern "C" {
|
||||
|
||||
#ifdef HAVE_FFMPEGTHUMBNAILER
|
||||
#include <libffmpegthumbnailer/videothumbnailerc.h>
|
||||
+#include "mem_io_handler.h"
|
||||
#endif
|
||||
|
||||
#include "config_manager.h"
|
3
gerbera-1.2.0.tar.gz
Normal file
3
gerbera-1.2.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a64fe5820aced590bcdc22600596dc8a41c0baf68d7c0ec5baf7a561ade820df
|
||||
size 2910704
|
10
gerbera.changes
Normal file
10
gerbera.changes
Normal file
@ -0,0 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 2 02:34:59 UTC 2017 - avvissu@yandex.by
|
||||
|
||||
- Update to gerbera.conf.in
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 30 14:17:15 UTC 2017 - avvissu@yandex.by
|
||||
|
||||
- Initial package
|
||||
|
9
gerbera.conf.in
Normal file
9
gerbera.conf.in
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
## Gerbera configuration file
|
||||
#
|
||||
|
||||
## User defined command line options
|
||||
## See:
|
||||
## gerbera --help
|
||||
## systemctl cat gerbera
|
||||
CARBERA_OPTIONS="-i 192.168.100.2 -p 49152"
|
18
gerbera.service.in
Normal file
18
gerbera.service.in
Normal file
@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=UPnP Media Server
|
||||
After=local-fs.target network.target
|
||||
Wants=mysql.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/gerbera.conf
|
||||
PIDFile=/var/run/gerbera.pid
|
||||
User=@USER@
|
||||
Group=@GROUP@
|
||||
UMask=0007
|
||||
ExecStart=/usr/bin/gerbera -P /var/run/gerbera/gerbera.pid -l /var/log/gerbera/gerbera.log -m /var/lib -f gerbera $CARBERA_OPTIONS
|
||||
WorkingDirectory=/var/lib/gerbera
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
188
gerbera.spec
Normal file
188
gerbera.spec
Normal file
@ -0,0 +1,188 @@
|
||||
#
|
||||
# spec file for package gerbera
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define SYS_USER gerbera
|
||||
%define SYS_GROUP gerbera
|
||||
%define ffmpeg_includedir %(pkg-config --variable=includedir libavcodec)
|
||||
Name: gerbera
|
||||
Version: 1.2.0
|
||||
Release: 0
|
||||
Summary: UPnP Media Server
|
||||
License: GPL-2.0
|
||||
Group: Productivity/Multimedia/Other
|
||||
Url: https://gerbera.io
|
||||
Source0: https://github.com/v00d00/gerbera/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source1: gerbera.conf.in
|
||||
Source2: gerbera.service.in
|
||||
Source3: gerbera.tmpfile.in
|
||||
Source4: gerbera.sysusers.in
|
||||
Patch0: FFMpegThumbnailer.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: file-devel
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: mysql-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig(duktape)
|
||||
BuildRequires: pkgconfig(expat)
|
||||
BuildRequires: pkgconfig(libavcodec)
|
||||
BuildRequires: pkgconfig(libavformat)
|
||||
BuildRequires: pkgconfig(libavutil)
|
||||
BuildRequires: pkgconfig(libffmpegthumbnailer)
|
||||
BuildRequires: pkgconfig(libcurl)
|
||||
BuildRequires: pkgconfig(libexif)
|
||||
BuildRequires: pkgconfig(libswscale)
|
||||
BuildRequires: pkgconfig(libupnp) >= 1.8.3
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
BuildRequires: pkgconfig(taglib) >= 1.11
|
||||
BuildRequires: pkgconfig(uuid)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%{?systemd_requires}
|
||||
# Use a supported version of GCC
|
||||
%if 0%{?leap_version} >= 420200
|
||||
BuildRequires: gcc7-c++
|
||||
%else
|
||||
BuildRequires: gcc-c++
|
||||
%endif
|
||||
|
||||
%description
|
||||
Gerbera is a UPnP media server which allows you to stream your digital
|
||||
media through your home network and consume it on a variety of UPnP
|
||||
compatible devices.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
#%patch0 -p1
|
||||
|
||||
cp %{SOURCE1} gerbera.conf.in
|
||||
|
||||
for _file in %{SOURCE2} %{SOURCE3} %{SOURCE4}; do
|
||||
sed -e 's/@USER@/%{SYS_USER}/' \
|
||||
-e 's/@GROUP@/%{SYS_GROUP}/' \
|
||||
< $_file > ${_file##*/}
|
||||
done
|
||||
|
||||
sed -i 's/mediatomb\.db/%{name}.db/g' $(grep -rl mediatomb.db)
|
||||
sed -i 's/mediatomb\.html/%{name}.html/g' $(grep -rl mediatomb.html)
|
||||
|
||||
%build
|
||||
# Use %%ffmpeg_includedir (check struct or class)
|
||||
export CFLAGS="%{optflags} -I%{ffmpeg_includedir}"
|
||||
export CXXFLAGS="${CFLAGS}"
|
||||
%cmake \
|
||||
-DWITH_AVCODEC=1 \
|
||||
-DWITH_CURL=1 \
|
||||
-DWITH_EXIF=1 \
|
||||
-DWITH_JS=1 \
|
||||
-DWITH_MAGIC=1 \
|
||||
-DWITH_FFMPEGTHUMBNAILER=1 \
|
||||
-DWITH_MYSQL=1 \
|
||||
-DWITH_TAGLIB=1 \
|
||||
%if 0%{?leap_version} >= 420200
|
||||
-DCMAKE_C_COMPILER=gcc-7 \
|
||||
-DCMAKE_CXX_COMPILER=g++-7
|
||||
%endif
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
install -d %{buildroot}%{_sbindir}
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
#install -Dm 0644 %{name}.service.in %{buildroot}%{_unitdir}/%{name}.service
|
||||
install -Dm 0644 %{name}.tmpfile.in %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||
install -Dm 0644 %{name}.sysusers.in %{buildroot}%{_sysusersdir}/%{name}.conf
|
||||
|
||||
install -d %{buildroot}%{_localstatedir}/lib/%{name}
|
||||
install -Dm 0644 %{name}.conf.in %{buildroot}%{_sysconfdir}/%{name}.conf
|
||||
touch %{buildroot}%{_localstatedir}/lib/%{name}/{config.xml,%{name}.db,%{name}.html}
|
||||
|
||||
install -Dm 0644 artwork/logo-orange.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||
%{suse_update_desktop_file -c %{name} Gerbera "UPnP Media Server" \
|
||||
'%{_bindir}/x-www-%{name} %{_localstatedir}/lib/%{name}/%{name}.html' %{name} AudioVideo Audio Music}
|
||||
|
||||
install -d %{buildroot}%{_sysconfdir}/alternatives
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/x-www-%{name}
|
||||
ln -s %{_sysconfdir}/alternatives/x-www-%{name} %{buildroot}%{_bindir}/x-www-%{name}
|
||||
|
||||
%pre
|
||||
%service_add_pre %{name}.service
|
||||
|
||||
%post
|
||||
%icon_theme_cache_post
|
||||
%service_add_post %{name}.service
|
||||
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
||||
%sysusers_create %{_sysusersdir}/%{name}.conf
|
||||
if [ ! -e /.buildenv ]; then
|
||||
for _browser in seamonkey konqueror qupzilla newmoon firefox chromium; do
|
||||
if [ -x %{_bindir}/$_browser ]; then
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/x-www-%{name} \
|
||||
x-www-%{name} \
|
||||
%{_bindir}/$_browser $((_count = $_count + 10 ))
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ $1 -eq 1 ] ; then
|
||||
mkdir -p %{_localstatedir}/adm/update-messages
|
||||
rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}
|
||||
cat > %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF
|
||||
INFO: Add a user to gerbera group
|
||||
INFO: Run the server: systemctl start %{name}.service
|
||||
INFO: Open on browser http://192.168.100.2:49152
|
||||
INFO: The app configuration file is located in %{_sysconfdir}/%{name}.conf
|
||||
EOF
|
||||
fi
|
||||
|
||||
%preun
|
||||
%service_del_preun %{name}.service
|
||||
|
||||
%postun
|
||||
%icon_theme_cache_postun
|
||||
%service_del_postun %{name}.service
|
||||
if [ $1 -eq 0 ]; then
|
||||
if [ ! -e /.buildenv ]; then
|
||||
for _browser in $(%{_sbindir}/update-alternatives --list x-www-%{name}); do
|
||||
%{_sbindir}/update-alternatives --remove x-www-%{name} $_browser
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS CONTRIBUTING.md ChangeLog.md LICENSE.md
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/x-www-%{name}
|
||||
%{_datadir}/%{name}/
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
|
||||
%{_unitdir}/%{name}.service
|
||||
%{_sbindir}/rc%{name}
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%dir %{_sysusersdir}
|
||||
%{_sysusersdir}/%{name}.conf
|
||||
%{_mandir}/man?/%{name}.?%{ext_info}
|
||||
%attr(0660,%{SYS_USER},%{SYS_GROUP}) %config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||
%ghost %attr(-,%{SYS_USER},%{SYS_GROUP}) %dir %{_localstatedir}/lib/%{name}
|
||||
%ghost %attr(0660,%{SYS_USER},%{SYS_GROUP}) %{_localstatedir}/lib/%{name}/config.xml
|
||||
%ghost %attr(0660,%{SYS_USER},%{SYS_GROUP}) %{_localstatedir}/lib/%{name}/%{name}.db
|
||||
%ghost %attr(0660,%{SYS_USER},%{SYS_GROUP}) %{_localstatedir}/lib/%{name}/%{name}.html
|
||||
%ghost %{_sysconfdir}/alternatives/x-www-%{name}
|
||||
|
||||
%changelog
|
2
gerbera.sysusers.in
Normal file
2
gerbera.sysusers.in
Normal file
@ -0,0 +1,2 @@
|
||||
u @USER@ - - /var/lib/gerbera
|
||||
m @USER@ audio
|
3
gerbera.tmpfile.in
Normal file
3
gerbera.tmpfile.in
Normal file
@ -0,0 +1,3 @@
|
||||
d /var/lib/gerbera 0755 @USER@ @GROUP@ -
|
||||
d /var/log/gerbera 0755 @USER@ @GROUP@ -
|
||||
d /var/run/gerbera 0750 @USER@ @GROUP@ -
|
Loading…
x
Reference in New Issue
Block a user