Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 47a7972b12dd754f8e48b71034268941 > files > 1

vdr-plugin-streamdev-0.5.1-2.git20120306.3.mga3.src.rpm


%define plugin	streamdev
%define name	vdr-plugin-%plugin
%define version	0.5.1
%define snap	20120306
%define rel	3

%if %snap
%define release	%mkrel 2.git%snap.%rel
%else
%define release	%mkrel %rel
%endif

Summary:	VDR plugin: streamdev
Name:		%name
Version:	%version
Release:	%release
Group:		Video/Utilities
# Several .c files cause GPLv2+, others are GPL+
License:	GPLv2+
URL:		http://streamdev.vdr-developer.org/

%if %snap
# git://projects.vdr-developer.org/vdr-plugin-streamdev.git
# git archive --prefix streamdev/ master | xz > vdr-streamdev-git20120225.tar.xz
Source:		vdr-%plugin-git%snap.tar.xz
%else
Source:		http://streamdev.vdr-developer.org/releases/vdr-%plugin-%version.tgz
%endif

BuildRequires:	vdr-devel >= 1.6.0

%description
This PlugIn is a VDR implementation of the VTP (Video Transfer Protocol,
see file PROTOCOL) and a basic HTTP Streaming Protocol.

It consists of a server and a client part, but both parts are compiled together
with the PlugIn source, but appear as separate PlugIns to VDR.

%package server
Summary:	VDR plugin: VDR Streaming Server
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description server
This PlugIn is a VDR implementation of the VTP (Video Transfer Protocol,
see file PROTOCOL) and a basic HTTP Streaming Protocol.

The server part acts as a Receiver-Device and works transparently in the
background within your running VDR. It can serve multiple clients and it can
distribute multiple input streams (i.e. from multiple DVB-cards) to multiple
clients using the native VTP protocol (for VDR-clients), or using the HTTP
protocol supporting clients such as XINE, MPlayer and so on. With XMMS or
WinAMP, you can also listen to radio channels over a HTTP connection.

%package client
Summary:	VDR plugin: VTP Streaming Client
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description client
This PlugIn is a VDR implementation of the VTP (Video Transfer Protocol,
see file PROTOCOL) and a basic HTTP Streaming Protocol.

The client part acts as a full Input Device, so it can be used in conjunction
with a DXR3-Card, XINE, SoftDevice or others to act as a working VDR
installation without any DVB-Hardware including EPG-Handling.

%prep
%if %snap
%setup -q -n %plugin
%else
%setup -q -n %plugin-%version
%endif
cd server
%vdr_plugin_prep
cd ../client
%vdr_plugin_prep
cd ..

perl -pi -e 's/^CFLAGS =/MOREFLAGS =/' libdvbmpeg/Makefile
sed -i 's/$(CFLAGS)/$(MOREFLAGS) $(CFLAGS)/' libdvbmpeg/Makefile

cd server
%vdr_plugin_params_begin %plugin-server
# Credentials for HTTP authentication, in format "LOGIN:PASSWORD".
# Credentials are required when connecting from a host not listed in
# streamdevhosts.conf. The default (i.e. no credentials set below) is to
# not allow connection from such hosts at all.
var=AUTH
param=--auth=AUTH
# Define an external command for remuxing
var=REMUXER
param=--remux=REMUXER
%vdr_plugin_params_end
cd ..

cat > README.0.5.0-1.upgrade.urpmi <<EOF
The config file location of streamdev has changed from
/var/lib/vdr/config/plugins/streamdev
to
/var/lib/vdr/config/plugins/streamdev-server.
streamdevhosts.conf has been automatically moved unless there was a conflict.
externremux.sh is not moved automatically as there has been a slight change
in the syntax (it has to provide HTTP headers).
EOF

%build
%vdr_plugin_build

%install
cd server
%vdr_plugin_install
cd ../client
%vdr_plugin_install
cd ..

install -d -m755 %{buildroot}%{_vdr_plugin_cfgdir}/%{plugin}-server
install -m755 %plugin-server/externremux.sh %{buildroot}%{_vdr_plugin_cfgdir}/%{plugin}-server
install -m644 %plugin-server/streamdevhosts.conf %{buildroot}%{_vdr_plugin_cfgdir}/%{plugin}-server

%pre server
if [ $1 = 2 ] && ! [ -e %{_vdr_plugin_cfgdir}/%{plugin}-server ] && [ -e %{_vdr_plugin_cfgdir}/%{plugin} ]; then
	mkdir -p %{_vdr_plugin_cfgdir}/%{plugin}-server
	touch %{_vdr_plugin_cfgdir}/%{plugin}-server/mdv-050-migration
fi

%post server
if [ $1 = 2 ] && [ -e %{_vdr_plugin_cfgdir}/%{plugin}-server/mdv-050-migration ]; then
	mv -vf %{_vdr_plugin_cfgdir}/%{plugin}/streamdevhosts.conf %{_vdr_plugin_cfgdir}/%{plugin}-server/streamdevhosts.conf
	rm -f %{_vdr_plugin_cfgdir}/%{plugin}-server/mdv-050-migration
fi

%files server -f server/streamdev-server.vdr
%doc README HISTORY CONTRIBUTORS PROTOCOL README.*.upgrade.urpmi
%dir %{_vdr_plugin_cfgdir}/%plugin-server
%config(noreplace) %{_vdr_plugin_cfgdir}/%plugin-server/streamdevhosts.conf
%config(noreplace) %{_vdr_plugin_cfgdir}/%plugin-server/externremux.sh

%files client -f client/streamdev-client.vdr
%doc README HISTORY CONTRIBUTORS


%changelog

* Mon Jan 14 2013 umeabot <umeabot> 0.5.1-2.git20120306.3.mga3
+ Revision: 385327
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Dec 03 2012 malo <malo> 0.5.1-2.git20120306.2.mga3
+ Revision: 326218
- spec clean-up
- update RPM group

* Wed Mar 07 2012 anssi <anssi> 0.5.1-2.git20120306.1.mga2
+ Revision: 221033
- new snapshot (VDR 1.7.25 support)

* Sat Feb 25 2012 anssi <anssi> 0.5.1-2.git20111214.1.mga2
+ Revision: 214866
- new git snapshot (for VDR 1.7.23 support)
- drop old XBMC patches, they have been abandoned and
  no clients use them anymore

* Sat May 14 2011 anssi <anssi> 0.5.1-1.mga1
+ Revision: 98573
- new version
- fix license tag
- drop ReplaceRecordingStreaming patch (it was from XBMC but doesn't apply
  anymore and "upstream" opdenkamp XBMC PVR has dropped streamdev support)
- drop old scriptlets
- imported package vdr-plugin-streamdev