Sophie

Sophie

distrib > Mageia > 8 > armv7hl > media > core-release-src > by-pkgid > 836fa05f8fb7bdddaeed1792da348e97 > files > 31

vdr-2.0.7-9.mga8.src.rpm

%define maintpatch 0
%define oapiversion 2.0.6

# Increased when ABI compatibility is broken by patches
# Reset to 1 when %%oapiversion is raised
%define vdr_sub_abi	1
%define vdr_abi		%{oapiversion}_%{_lib}_abi_%{vdr_sub_abi}
%define apiversion	%{oapiversion}.%{vdr_sub_abi}

%define vdr_plugin_dir		%{_libdir}/%{name}
%define vdr_plugin_datadir	%{vdr_datadir}/plugins
%define vdr_plugin_cfgdir	%{vdr_cfgdir}/plugins
%define vdr_plugin_paramdir	%{vdr_datadir}/defaults
%define vdr_plugin_cachedir	%{_var}/cache/%{name}
%define vdr_videodir		%{_localstatedir}/lib/%{name}/video
%define vdr_cfgdir		%{_localstatedir}/lib/%{name}/config
%define	vdr_datadir		%{_datadir}/%{name}
%define vdr_chanlogodir		%{vdr_datadir}/chanlogos
%define vdr_themedir		%{_localstatedir}/lib/%{name}/themes
%define vdr_epgimagesdir	%{_var}/cache/%{name}/epgimages

# shared libraries need to be built with -fPIC
%define vdr_plugin_flags	-fPIC

%if %{maintpatch}
%define fullversion		%{version}-%{maintpatch}
%else
%define fullversion		%{version}
%endif

Summary:	Video Disk Recorder - PVR suite
Name:		vdr
Version:	2.0.7
Release:	%mkrel 9
Group:		Video/Utilities
License:	GPLv2+
URL:		http://www.tvdr.de/
Source:		ftp://ftp.tvdr.de/vdr/%{name}-%{version}.tar.bz2

Source2:	vdr-runvdr
Source3:	vdr-shutdown.sh.example
Source4:	vdr.sysconfig
Source8:	vdr-plugin-filetriggers.script
Source9:	vdr2.service.example
Source10:	plugin-update.sh
Source11:	vdr.service

# Patches last checked for updates: 2012/02/17

# ===============
# Patches from upstream (Patch000..099):

# VDR maintenance release patches from upstream
%if %maintpatch
%(for n in {1..%maintpatch}; do
	echo "Patch$((n+70)): ftp://ftp.cadsoft.de/vdr/Developer/vdr-%version-$n.diff"
done)
%endif

# ===============
# Patches that are upstreamable (TODO: do it) (Patch100..199):

# add VdrVersion() function for determining VDR version at run-time:
Patch100:       vdr-1.6.0-vdrversion.patch

# submitted a long time ago without reply, TODO: try again
Patch101:	vdr-1.6.0-rsvps.patch

# ===============
# From http://www.saunalahti.fi/~rahrenbe/vdr/patches/ by Rolf Ahrenberg.
# Updated with each version, gunzipped.
# Note that they are usually just rediffed, no actual changes.
# Upstreaming handled by author.
# Not all patches are applied, only those that are generally useful or
# unintrusive.
# (Patch200..299)

Patch200:	vdr-2.0.6-kamalasamala.patch
Patch202:	vdr-2.0.6-lcn-base.patch
Patch203:	vdr-2.1.6-lcn-support.patch

# ===============
# Patches from various sources (Patch300..499):
# Presumed to be upstreamed by the authors.

# From epgsearch
Patch310:	vdr.epgsearch-exttimeredit-0.0.2.diff
Patch312:	timercmd-0.1_1.7.17.diff

# From ttxtsubs
# -2.0.6 = identical
Patch320:	vdr-1.7.40-ttxtsubs.patch

# From Fedora
# http://pkgs.fedoraproject.org/cgit/vdr.git/tree/
Patch420:	vdr-channel+epg.patch
Patch423:	http://toms-cafe.de/vdr/download/vdr-timer-info-0.5-1.7.13.diff
Patch424:	vdr-timer-info-1.7.28.patch
# for epgsearch:
Patch425:	http://pkgs.fedoraproject.org/cgit/vdr.git/plain/vdr-2.0.4-mainmenuhooks101.patch
#
Patch426:	http://www.udo-richter.de/vdr/files/vdr-2.1.5-naludump-0.1.diff

# ===============
# From http://e-tobi.net/ Debian repository (current only).
# Patch headers contain additional information.
# Unknown upstreaming status.
# (Patch500..599)
Patch501:	vdr-1.7.11-yaepg.patch
Patch502:	vdr-1.6.0-menuorg.patch
Patch504:	vdr-1.7.13-graphtft.patch

# From yavdr:
Patch503:	vdr-2.0.3-pin.patch
Patch550:	vdr-1.7.23-rotor.patch

# ===============
# Patches that are hacks or MGA-specific and thus unsuitable to be upstreamed
# as-is (Patch600..699):

# CanHandleOver2BitSubtitles() hack:
Patch600:	vdr-1.6.0-dxr3.patch

# Use monospace as default monospace font,
# sans serif as default large font:
Patch601:	vdr-1.6.0-default-fonts-mdv.patch

# Show more font aliases instead of only the per-category defaults (this could
# possibly be upstreamed if made more generic):
Patch602:	vdr-1.6.0-show-more-aliasfonts.patch

# Fix build with gcc7
Patch603:	vdr-2.0.7-gcc7.patch

Patch1000:	glibc-stime.patch
Patch1001:	define_AUDIO_GET_PTS.patch

BuildRequires:	pkgconfig(libcap)
BuildRequires:	pkgconfig(libjpeg)
BuildRequires:	pkgconfig(ncursesw)
BuildRequires:	pkgconfig(fontconfig)
BuildRequires:	freetype2-devel
BuildRequires:	pkgconfig(fribidi)
Requires(post): rpm-helper
Requires(preun): rpm-helper
Requires(post):	vdr-common = %{version}
Requires:	vdr-common = %{version}
Provides:	vdr-abi = %{vdr_abi}
Obsoletes:	vdr-plugin-subtitles < 0.5.0-8
Requires(post):	ccp >= 0.4.1
# Plugins:
Requires:	ccp >= 0.4.1

%description
VDR (Video Disk Recorder) is a very powerful and customizable PVR
suite. One of the most common usage cases of VDR is as a digital
set-top-box with the picture displayed on a television set. VDR can
also be used on desktop or even without any video output devices.
There are also lots of different plugins available to extend VDR's
capabilities.

See http://www.linuxtv.org/vdrwiki/ for more information.

VDR in this package is patched with the liemikuutio patch and several
other patches.
%if %maintpatch
This build is additionally patched to the maintenance release
%version-%maintpatch.
%endif

%package common
Summary:	Common files for VDR
Group:		Video/Utilities
Requires(pre):	rpm-helper
Requires(postun): rpm-helper

%description common
VDR (Video Disk Recorder) is a very powerful and customizable PVR
suite.

This package contains the default "vdr" user required by VDR and
some other related tools.

%package devel
Summary:	VDR development headers
Group:		Development/C++
Requires:	gettext

%description devel
This package contains the headers that are needed to build
plugins for VDR.

%package plugin-dvbhddevice
Summary:	VDR plugin: HD Full Featured DVB device
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-dvbhddevice
This plugin implements the output device for the
"Full Featured TechnoTrend S2-6400" DVB cards.

%package plugin-dvbsddevice
Summary:	VDR plugin: SD Full Featured DVB device
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-dvbsddevice
This plugin implements the output device for the
"Full Featured" DVB cards based on the TechnoTrend/Fujitsu-Siemens
design. This code was originally part of the core VDR source, and
was moved into this plugin in VDR version 1.7.11.

%package plugin-epgtableid0
Summary:	VDR plugin: EPG handler for events with table id 0x00
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-epgtableid0
The special handling of EPG events with table id 0x00 has been dropped
in VDR version 1.7.26, and replaced by a more felxible "EPG Handler"
concept. You can use this plugin to get the previous functionality back.

%package plugin-hello
Summary:	VDR plugin: A friendly greeting
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-hello
This is a small demo of the VDR plugin interface.

%package plugin-osddemo
Summary:	VDR plugin: Demo of arbitrary OSD setup
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-osddemo
Demonstration of how a plugin can have its very own OSD setup.

It's a very primitive game that opens a small window in which the
user can draw lines with the Up, Down, Left and Right buttons.
The color buttons are used to switch color.
Press Ok to close the window.

%package plugin-rcu
Summary:	VDR plugin: Remote Control Unit
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-rcu
This VDR plugin implements support for the RCU (Remote Control Unit),
a custom device with an infrared receiver and a four digit display:
http://tvdr.de/remote.htm

%package plugin-skincurses
Summary:	VDR plugin: A text only skin
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-skincurses
The 'skincurses' plugin implements a VDR skin that works in a
shell window, using only plain text output. It re-implements
what used to be available by compiling VDR versions before 1.3.7
with the DEBUG_OSD macro set.

%package plugin-status
Summary:	VDR plugin: Status monitor test
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-status
This is an example that shows the use of cStatus.

%package plugin-servicedemo
Summary:	VDR plugin: Service demo
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-servicedemo
Demonstration of how plugins can communicate with each other.

%package plugin-svdrpdemo
Summary:	VDR plugin: How to add SVDRP support to a plugin
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-svdrpdemo
This plugin shows how to add SVDRP support to a plugin.

%package plugin-pictures
Summary:	VDR plugin: A simple picture viewer
Group:		Video/Utilities
Requires:	vdr-abi = %vdr_abi

%description plugin-pictures
The 'pictures' plugin implements a simple picture viewer.

There is already an 'image' plugin out there which has a lot more
functionality than this one but is also more complex.

This plugin assumes that the pictures have already been converted to
MPEG frames (with the 'pic2mpg' script that comes with this package),
and doesn't implement any fancy features like zooming, panning or
tiled previews. It's just a very simple viewer.

%prep
%setup -q
%autopatch -p1
# drop backups for documentation to avoid them ending up in the rpm
rm -f {README,CONTRIBUTORS,HISTORY,INSTALL,MANUAL,README}.[0-9][0-9][0-9][0-9]

sed -i "/isyslog(\"VDR version %%s started\", VDRVERSION);/s/VDRVERSION/\"%{fullversion} (%{version}-%{release})\"/" vdr.c
sed -ri '/define APIVERSION/s/^(.*")%{oapiversion}(".*)$/\1%{apiversion}\2/' config.h
sed -ri '/define VDRVERSION/s/^(.*")%{fullversion}(".*)$/\1%{version}-%{release}\2/' config.h

# check that the macros are set correctly
[ $(sed -rn '/define APIVERSION/s/^.*"(.*)".*$/\1/p' config.h) == "%apiversion" ]
[ $(sed -rn '/define VDRVERSION/s/^.*"(.*)".*$/\1/p' config.h) == "%version-%release" ]

cp -a %SOURCE3 shutdown.sh.example

cat > README.%{_real_vendor}.custom-plugins <<EOF
=========================================
Installing additional plugins manually
=========================================

In some cases you want to be able to build and install a plugin manually
against %{product_distribution} VDR, such as when you are developing a new plugin or the
plugin does not yet have a %{product_distribution} package. (Note that in the latter case,
you can send me a packaging request).

You need to have the packages vdr-devel and rpm-build installed.

1. cd into the plugin source directory
2. execute:
     eval \$(rpm --eval %%vdr_plugin_build)
3. copy the resulting libvdr-*.so.* into %{vdr_plugin_dir}

You can give the plugins parameters as instructed in /etc/sysconfig/vdr.
EOF

cat > README.%{_real_vendor}.multi-vdr <<EOF
You can setup a system that runs multiple vdr daemons simultaneusly by doing
the following:
# cp /usr/share/doc/vdr/vdr2.service.sample /etc/systemd/system/vdr2.service
# cp /etc/sysconfig/vdr /etc/sysconfig/vdr2
and editing the files accordingly.

To set plugin parameters individually, you need to set them using
VDR_PLUGIN_ARGS_ in the instance sysconfig fie ("vdr2" above).

The extra VDR daemons will not be restarted automatically on upgrades.
EOF

# Comment default examples out
perl -pi -e "s/^S/# S/" diseqc.conf

cat > README.1.7.0.upgrade.urpmi <<EOF
VDR 1.7 series is a major upgrade and you may need to make configuration
changes to adapt for this new series.

Notable changes that may require user action are:
- DVB output devices ("FF cards") are now supported by the dvbsddevice
  plugin instead of being supported by VDR core.
- Default SVDRP port has been changed to 6419 as assigned for SVDRP use by
  IANA.
- Some scripts have had their '.pl' suffix removed, notably 'svdrpsend'.
- VDR now uses the TS recording format instead of PES. Old recordings
  are still playable.
- LNB sharing is now implemented in VDR core and is now configured
  differently.

See HISTORY in the documentation directory for the full list of changes.
EOF

cat > Make.config <<EOF
CFLAGS   = %optflags %{?ldflags}
CXXFLAGS = \$(CFLAGS) -Werror=overloaded-virtual

BINDIR   = %{_bindir}
INCDIR   = %{_includedir}
MANDIR   = %{_mandir}
LOCDIR   = %{_datadir}/locale
PCDIR    = %{_libdir}/pkgconfig

LIBDIR   = %{vdr_plugin_dir}
VIDEODIR = %{vdr_videodir}
CONFDIR  = %{vdr_cfgdir}
RESDIR   = %{vdr_datadir}
CACHEDIR = %{vdr_plugin_cachedir}

LIRC_DEVICE = %{_var}/run/lirc/lircd
BIDI = 1
EOF

cat > README.install.urpmi <<EOF
VDR is an advanced PVR suite and configuring it may not be straight-forward.
Please take a look at the provided documentation first.

Note that VDR does not support output to X11 or framebuffer without
additional plugins, such as xineliboutput or softdevice.

VDR service is provided for your convenience. Instead of running vdr
directly, you should use the vdr service.

%{product_distribution} VDR packages have the following filesystem layout:

%{_sysconfdir}/sysconfig/vdr
%{product_distribution} VDR configuration file; the settings in this file are used to
construct the VDR parameters.

%{_sysconfdir}/sysconfig/vdr-PLUGINNAME
%{product_distribution} VDR plugin configuration files; the settings in these files are used
to construct the parameters for VDR plugins.

%vdr_videodir
Default VDR recordings directory.

%vdr_cfgdir
Default VDR configuration directory.

%vdr_chanlogodir
Default channel logo directory; The channel logos are used by plugins that
support them. The most compatible format is 64x48px 16-color xpm.

For more information on VDR and its plugins, see http://linuxtv.org/vdrwiki/ .
EOF

# The escaping gets a little messy:
# \$	= plain $ in macros
# \\	= multiline macro
# \\\\	= plain \ in macros
# these and their combinations are the only types of escaping present below:
cat > vdr.macros <<EOF
## VDR plugin macros ##

%%vdr_version		%{version}-%{release}
%%vdr_rpmversion	%version
%%vdr_apiversion	%apiversion
%%vdr_abi		%vdr_abi

%%vdr_plugin_flags	%%{optflags} %vdr_plugin_flags %%{vdr_plugin_ldflags} \${VDR_PLUGIN_EXTRA_FLAGS}
%%vdr_plugin_ldflags	%%(echo "%%{?ldflags}" | sed 's@-Wl,--no-undefined@@')

%%_vdr_plugin_dir	%{vdr_plugin_dir}
%%_vdr_plugin_datadir	%{vdr_plugin_datadir}
%%_vdr_plugin_cfgdir	%{vdr_plugin_cfgdir}
%%_vdr_plugin_paramdir	%{vdr_plugin_paramdir}
%%_vdr_plugin_cachedir	%{vdr_plugin_cachedir}
%%_vdr_videodir		%{vdr_videodir}
%%_vdr_cfgdir		%{vdr_cfgdir}
%%_vdr_chanlogodir	%{vdr_chanlogodir}
%%_vdr_themedir		%{vdr_themedir}
%%_vdr_epgimagesdir	%{vdr_epgimagesdir}

%%vdr_plugin_prep \\
for file in po/*.po; do \\
	# drop empty translations \\
	grep -Eq 'msgstr ".+"' \$file || rm -f \$file \\
done \\
set +x \\
echo Silent renaming of locales \\
for file in po/*_*.po; do \\
	[ -f \$file ] || continue \\
	[ \$(basename \$file .po) == "zh_CN" ] && continue \\
	# VDR wrongly uses the _COUNTRY identification always \\
	rm -rf \${file%_*.po}.po \\
	mv \$file \${file%_*.po}.po \\
done \\
set -x \\
touch vdr_plugin_prep.done

%%vdr_plugin_build \\
    %%make_build all						\\\\\\
    CFLAGS="%%{vdr_plugin_flags}"				\\\\\\
    CXXFLAGS="%%{vdr_plugin_flags}"				\\\\\\
    LDFLAGS="%%{vdr_plugin_ldflags}"				\\\\\\
    PLUGINLIBDIR=%%{_vdr_plugin_dir}				\\\\\\
    VIDEODIR=%%{_vdr_videodir}					\\\\\\
    LIBDIR=.							\\\\\\
    LOCALEDIR=locale						\\\\\\
    VDRLOCALE='""'						\\\\\\
    DVBDIR=%%{_prefix}						\\\\\\
    VDRDIR=%{_includedir}/vdr					\\\\\\
    VDRVERSION=%%{vdr_version}					\\\\\\
    VDRVERSNUM=%%(echo %%{vdr_rpmversion} |			\\\\\\
        %__awk -F'.' '{ print \$1*10000+\$2*100+\$3 }')		\\\\\\
    APIVERSION=%%{vdr_apiversion}				\\\\\\
    APIVERSNUM=%%(echo %%{vdr_apiversion} |			\\\\\\
        %__awk -F'.' '{ print \$1*10000+\$2*100+\$3 }')

%%vdr_plugin_install \\
    if ! [ -e vdr_plugin_prep.done ]; then \\
        echo "Missing %%%%vdr_plugin_prep, aborting!" \\
        exit 1 \\
    fi \\
    if grep -q "^install:" Makefile; then \\
        %%make_install \\
    fi \\
    rename .so.%%{vdr_version} .so.%%{vdr_apiversion} *.so.%%{vdr_version} &>/dev/null || : \\
    for f in libvdr-*.so.%%{vdr_apiversion}; do \\
        [ -e "\$f" ] || continue \\
        install -D -m755 \$f %%{buildroot}%%{_vdr_plugin_dir}/\$f \\
        install -d -m755 %%{buildroot}%%{_datadir} \\
        [ -d locale ] && cp -r locale %%{buildroot}%%{_datadir} \\
    done \\
    for f in %%{buildroot}%%{_vdr_plugin_dir}/libvdr-*.so.%%{vdr_apiversion}; do \\
        NAME=\$(echo \$f | perl -pe "s/^.*libvdr-(.*).so.%%{vdr_apiversion}/\\\\1/") \\
        echo %%{_vdr_plugin_dir}/\$(basename "\$f") > \$NAME.vdr \\
        %%find_lang vdr-\$NAME ||: \\
        cat vdr-\$NAME.lang >> \$NAME.vdr \\
        if [ -f "\$NAME.rpm-params" ]; then \\
            install -D -m644 \$NAME.rpm-defaults %%{buildroot}%%{_vdr_plugin_paramdir}/\$NAME.defaults \\
            install -D -m644 \$NAME.rpm-params %%{buildroot}%%{_vdr_plugin_paramdir}/\$NAME.params \\
            install -D -m644 \$NAME.rpm-sysconfig %%{buildroot}%%{_sysconfdir}/sysconfig/vdr-\$NAME \\
            echo "%%config(noreplace) %%{_sysconfdir}/sysconfig/vdr-\$NAME" >> \$NAME.vdr \\
            echo "%%{_vdr_plugin_paramdir}/\$NAME.defaults" >> \$NAME.vdr \\
            echo "%%{_vdr_plugin_paramdir}/\$NAME.params" >> \$NAME.vdr \\
        fi \\
    done \\
    if [ -e "%%{buildroot}%%{_vdr_cfgdir}/themes" ]; then \\
        mv "%%{buildroot}%%{_vdr_cfgdir}/themes" "%%{buildroot}%%{_vdr_themedir}" \\
    fi

%%vdr_chanlogo_notice This skin is able to display channel logos. In order to use this \\
functionality, channel logos must be put in %%{_vdr_chanlogodir}. The \\
recommended format is 64x48px 16-color xpm. When using dxr3 as the \\
output device, the recommended maximum number of colors is 6.

%%vdr_plugin_params_begin() \\
vdr_plugin_params_do() { \\
	vdr_plugin_params_handle() { \\
		if echo "\$gotparam" | grep -q "\$gotvar"; then \\
			echo "local \$gotvar=\\\\"\$gotdefault\\\\"" >> %%1.rpm-defaults \\
			echo "# \$gotvar=\\\\"\$gotdefault\\\\"" >> %%1.rpm-sysconfig \\
			gotparam="\$(echo "\$gotparam" | sed "s/\$gotvar/'\\\\\$\$gotvar'/")" \\
			echo "[ -n \\\\"\\\\\$\$gotvar\\\\" ] && echo \\\\"\$gotparam\\\\"" >> %%1.rpm-params \\
		elif echo "\$gotparam" | grep -q "MULTIPLE_PARAMS"; then \\
			echo "local \$gotvar=\\\\"\$gotdefault\\\\"" >> %%1.rpm-defaults \\
			echo "# \$gotvar=\\\\"\$gotdefault\\\\"" >> %%1.rpm-sysconfig \\
			echo "local gotparam=\\\\"\$gotparam\\\\"" >> %%1.rpm-params \\
			echo "echo \\\\"\\\\\$\$gotvar\\\\" | xargs -n1 | while read subvar &&" >> %%1.rpm-params \\
			echo "	[ -n \\\\"\\\\\$subvar\\\\" ]; do" >> %%1.rpm-params \\
			echo "	echo \\\\"\\\\\$gotparam\\\\" | sed \\\\"s/MULTIPLE_PARAMS/'\\\\\$subvar'/\\\\"" >> %%1.rpm-params \\
			echo "done" >> %%1.rpm-params \\
		else \\
			[ -z "\$gotdefault" ] && gotdefault=no \\
			echo "local \$gotvar=\\\\"\$gotdefault\\\\"" >> %%1.rpm-defaults \\
			echo "# \$gotvar=\\\\"\$gotdefault\\\\"" >> %%1.rpm-sysconfig \\
			echo "[ \\\\"\\\\\$\$gotvar\\\\" = \\\\"yes\\\\" ] && echo \\\\"\$gotparam\\\\"" >> %%1.rpm-params \\
		fi \\
		echo >> %%1.rpm-sysconfig \\
		gotvar= \\
		gotparam= \\
		gotdefault= \\
	} \\
	local gotvar= \\
	local gotparam= \\
	local gotdefault= \\
	echo "# Do not modify this file, use %%{_sysconfdir}/sysconfig/%{name}-%%1 instead" > %%1.rpm-defaults \\
	echo "# Do not modify this file, use %%{_sysconfdir}/sysconfig/%{name}-%%1 instead" > %%1.rpm-params \\
	echo "# VDR plugin %%1 configuration" > %%1.rpm-sysconfig \\
	echo >> %%1.rpm-sysconfig \\
	echo "# You can also define the plugin arguments manually by using the" >> %%1.rpm-sysconfig \\
	echo "# VDR_PLUGIN_ARGS variable below. Note that setting VDR_PLUGIN_ARGS will" >> %%1.rpm-sysconfig \\
	echo "# override all the other settings in this file and that setting" >> %%1.rpm-sysconfig \\
	echo "# VDR_PLUGIN_ARGS_%%1 in the main VDR sysconfig file will" >> %%1.rpm-sysconfig \\
	echo "# override this file completely." >> %%1.rpm-sysconfig \\
	echo "# VDR_PLUGIN_ARGS=\\\\"\\\\"" >> %%1.rpm-sysconfig \\
	echo >> %%1.rpm-sysconfig \\
	while read INPUT; do \\
		if [ -z "\$INPUT" ]; then \\
			continue \\
		fi \\
		if echo "\$INPUT" | grep -q '^#'; then \\
			[ -n "\$gotvar" ] && [ -n "\$gotparam" ] && vdr_plugin_params_handle \\
			echo "\$INPUT" >> %%1.rpm-sysconfig \\
			continue \\
		fi \\
		if echo "\$INPUT" | grep -q '^var='; then \\
			gotvar="\${INPUT/var=}" \\
			continue \\
		fi \\
		if echo "\$INPUT" | grep -q '^param='; then \\
			eval gotparam="\${INPUT/param=}" \\
			continue \\
		fi \\
		if echo "\$INPUT" | grep -q '^default='; then \\
			eval gotdefault="\${INPUT/default=}" \\
			continue \\
		fi \\
		exit 1 \\
	done \\
	vdr_plugin_params_handle \\
} \\
vdr_plugin_params_do <<VDR_PLUGIN_PARAMS_EOF \\
%%nil

%%vdr_plugin_params_end VDR_PLUGIN_PARAMS_EOF

%%vdr_plugin_post() %%{nil}
%%vdr_plugin_postun() %%{nil}

EOF

cp %SOURCE9 .

%build
%make_build vdr i18n

%define vdr_plugin_ldflags %(echo "%{?ldflags}" | sed 's@-Wl,--no-undefined@@')
# [a-z] does not match v,w on fi_FI.ISO-8859-15, TODO: patch to use [[:lower:]]
LC_ALL=C %make_build plugins \
	CFLAGS="%optflags %vdr_plugin_flags -I%{_includedir}/ncursesw %vdr_plugin_ldflags" \
	CXXFLAGS="%optflags %vdr_plugin_flags -I%{_includedir}/ncursesw %vdr_plugin_ldflags"

%install
%make_install

rm -f %{buildroot}%{vdr_cfgdir}/channels.conf

install -d -m755 %{buildroot}%{vdr_plugin_datadir}
install -d -m755 %{buildroot}%{vdr_chanlogodir}
install -d -m755 %{buildroot}%{vdr_themedir}
ln -s %{vdr_themedir} %{buildroot}%{vdr_cfgdir}/themes

# included by plugin makefiles, in includedir because plugin makefiles
# may use $(VDRDIR) for both Make.global and grepping VDR headers:
install -m644 Make.global %{buildroot}%{_includedir}/%{name}

# required at least by sc:
install -d -m755 %{buildroot}%{_includedir}/%{name}/dvb{sd,hd}device/
install -m644 PLUGINS/src/dvbsddevice/dvbsdffdevice.h %{buildroot}%{_includedir}/%{name}/dvbsddevice/
install -m644 PLUGINS/src/dvbhddevice/dvbhdffdevice.h %{buildroot}%{_includedir}/%{name}/dvbhddevice/
# deps of dvbhdffdevice.h:
install -m644 PLUGINS/src/dvbhddevice/hdffcmd.h %{buildroot}%{_includedir}/%{name}/dvbhddevice/
install -d -m755 %{buildroot}%{_includedir}/%{name}/dvbhddevice/libhdffcmd
install -m644 PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd*.h %{buildroot}%{_includedir}/%{name}/dvbhddevice/libhdffcmd/

install -d -m755 %{buildroot}%{_sysconfdir}/rpm/macros.d
install -m644 vdr.macros %{buildroot}%{_sysconfdir}/rpm/macros.d

install -d -m755 %{buildroot}%{vdr_plugin_cfgdir}

install -d -m755 %{buildroot}%{vdr_plugin_paramdir}
install -d -m755 %{buildroot}%{vdr_epgimagesdir}

# init stuff
install -d -m755 %{buildroot}%{_unitdir}
install -d -m755 %{buildroot}%{_sysconfdir}/sysconfig
install -d -m755 %{buildroot}%{_datadir}/%{name}
install -m755 %SOURCE11 %{buildroot}%{_unitdir}/vdr.service
install -m755 %SOURCE2 %{buildroot}%{_bindir}/runvdr
install -m644 %SOURCE4 %{buildroot}%{_sysconfdir}/sysconfig/%{name}
install -m755 %SOURCE10 %{buildroot}%{_datadir}/%{name}/plugin-update.sh


# fix locales
for dir in %{buildroot}%{_datadir}/locale/*_*; do
	[ $(basename $dir) == "zh_CN" ] && continue
	# VDR wrongly uses the _COUNTRY identification always
	rm -rf ${dir%_*}
	mv $dir ${dir%_*}
done

# pictures plugin
install -m755 PLUGINS/src/pictures/pic2mpg{,-sd} %{buildroot}%{_bindir}
# We don't have the nice %%vdr_plugin_params_begin available yet, so hardcode..:
cat > %{buildroot}%{vdr_plugin_paramdir}/pictures.defaults <<EOF
# Do not modify this file, use /etc/sysconfig/vdr-pictures instead
local DIR=""
EOF
cat > %{buildroot}%{vdr_plugin_paramdir}/pictures.params <<EOF
# Do not modify this file, use /etc/sysconfig/vdr-pictures instead
[ -n "\$DIR" ] && echo "--remote='\$DIR'"
EOF
cat > %{buildroot}%{_sysconfdir}/sysconfig/vdr-pictures <<EOF
# VDR plugin pictures configuration

# Set a custom picture directory
# DIR=""
EOF

# dvbsddevice
# We don't have the nice %%vdr_plugin_params_begin available yet, so hardcode..:
cat > %{buildroot}%{vdr_plugin_paramdir}/dvbsddevice.defaults <<EOF
# Do not modify this file, use /etc/sysconfig/vdr-dvbsddevice instead
local OUTPUT_ONLY=""
EOF
cat > %{buildroot}%{vdr_plugin_paramdir}/dvbsddevice.params <<EOF
# Do not modify this file, use /etc/sysconfig/vdr-dvbsddevice instead
[ "\$OUTPUT_ONLY" = "yes" ] && echo "-o"
EOF
cat > %{buildroot}%{_sysconfdir}/sysconfig/vdr-dvbsddevice <<EOF
# VDR plugin dvbsddevice configuration

# Use the device as output device only
# OUTPUT_ONLY="no"
EOF

# rcu
# We don't have the nice %%vdr_plugin_params_begin available yet, so hardcode..:
cat > %{buildroot}%{vdr_plugin_paramdir}/rcu.defaults <<EOF
# Do not modify this file, use /etc/sysconfig/vdr-rcu instead
local DEVICE=""
EOF
cat > %{buildroot}%{vdr_plugin_paramdir}/rcu.params <<EOF
# Do not modify this file, use /etc/sysconfig/vdr-rcu instead
[ -n "\$DEVICE" ] && echo "--device='\$DEVICE'"
EOF
cat > %{buildroot}%{_sysconfdir}/sysconfig/vdr-rcu <<EOF
# VDR plugin rcu configuration

# Set the serial device to be used (default: /dev/ttyS1).
# Note that the vdr user has to have proper permissions to it.
# DEVICE=""
EOF

# scripts
install -m755 epg2html summary2info %{buildroot}%{_bindir}

%find_lang vdr
%find_lang vdr-dvbhddevice
%find_lang vdr-hello
%find_lang vdr-skincurses
%find_lang vdr-pictures


# automatic plugin post and postun actions
install -D -m755 %SOURCE8 %{buildroot}%{_var}/lib/rpm/filetriggers/vdr-plugins.script
%transfiletriggerin -- %{vdr_plugin_dir}
grep -F '.so.' | %{_var}/lib/rpm/filetriggers/vdr-plugins.script

%pre common
%_pre_useradd vdr %{_localstatedir}/lib/%{name} /bin/nologin
%{_bindir}/gpasswd -a vdr video >/dev/null

%post
# This test can be removed when ccp is updated to check that .rpmnew is
# not obsolete (via ctime, not mtime) -Anssi
if test -e %{_sysconfdir}/sysconfig/vdr.rpmnew && test $(stat -c%%Z %{_sysconfdir}/sysconfig/vdr.rpmnew) \
		-gt $(stat -c%%Z %{_sysconfdir}/sysconfig/vdr); then
	ccp --backup --delete --ifexists --set NoOrphans --oldfile \
		%{_sysconfdir}/sysconfig/vdr --newfile %{_sysconfdir}/sysconfig/vdr.rpmnew
fi
%_post_unit vdr

%preun
%_preun_unit vdr

%postun common
%_postun_userdel vdr

%files -f vdr.lang
%doc HISTORY* INSTALL* MANUAL* CONTRIBUTORS* UPDATE* README*
%doc shutdown.sh.example
%doc vdr2.service.example
%attr(-,vdr,vdr) %dir %{vdr_cfgdir}
%attr(-,vdr,vdr) %dir %{vdr_plugin_cfgdir}
%attr(-,vdr,vdr) %dir %{vdr_themedir}
%config(noreplace) %{vdr_cfgdir}/*.conf
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_bindir}/vdr
%{_unitdir}/%{name}.service
%{_bindir}/runvdr
%{_bindir}/epg2html
%{_bindir}/summary2info
%{_bindir}/svdrpsend
%{_mandir}/man1/vdr.1*
%{_mandir}/man1/svdrpsend.1*
%{_mandir}/man5/vdr.5*
%attr(-,vdr,vdr) %dir %{vdr_videodir}
%dir %{vdr_plugin_dir}
%dir %{vdr_datadir}
%dir %{vdr_plugin_datadir}
%attr(-,vdr,vdr) %dir %{vdr_plugin_cachedir}
%dir %{vdr_chanlogodir}
# symlink
%{vdr_cfgdir}/themes
%dir %{vdr_plugin_paramdir}
%attr(-,vdr,vdr) %dir %{vdr_epgimagesdir}
%{_var}/lib/rpm/filetriggers/vdr-plugins.script
%{_datadir}/%{name}/plugin-update.sh

%files common
%attr(-,vdr,vdr) %dir %{_localstatedir}/lib/%{name}

%files devel
%{_sysconfdir}/rpm/macros.d/vdr.macros
%{_includedir}/vdr
%{_includedir}/libsi
%{_libdir}/pkgconfig/vdr.pc

%files plugin-dvbhddevice -f vdr-dvbhddevice.lang
%doc PLUGINS/src/dvbhddevice/HISTORY
%doc PLUGINS/src/dvbhddevice/README
%{vdr_plugin_dir}/libvdr-dvbhddevice.so.%{apiversion}

%files plugin-dvbsddevice
%doc PLUGINS/src/dvbsddevice/HISTORY
%doc PLUGINS/src/dvbsddevice/README
%config(noreplace) %{_sysconfdir}/sysconfig/vdr-dvbsddevice
%{vdr_plugin_dir}/libvdr-dvbsddevice.so.%{apiversion}
%{vdr_plugin_paramdir}/dvbsddevice.*

%files plugin-epgtableid0
%doc PLUGINS/src/epgtableid0/HISTORY
%doc PLUGINS/src/epgtableid0/README
%{vdr_plugin_dir}/libvdr-epgtableid0.so.%{apiversion}

%files plugin-hello -f vdr-hello.lang
%doc PLUGINS/src/hello/HISTORY
%doc PLUGINS/src/hello/README
%{vdr_plugin_dir}/libvdr-hello.so.%{apiversion}

%files plugin-osddemo
%doc PLUGINS/src/osddemo/HISTORY
%doc PLUGINS/src/osddemo/README
%{vdr_plugin_dir}/libvdr-osddemo.so.%{apiversion}

%files plugin-pictures -f vdr-pictures.lang
%doc PLUGINS/src/pictures/HISTORY
%doc PLUGINS/src/pictures/README
%config(noreplace) %{_sysconfdir}/sysconfig/vdr-pictures
%{_bindir}/pic2mpg
%{_bindir}/pic2mpg-sd
%{vdr_plugin_dir}/libvdr-pictures.so.%{apiversion}
%{vdr_plugin_paramdir}/pictures.*

%files plugin-rcu
%doc PLUGINS/src/rcu/HISTORY
%doc PLUGINS/src/rcu/README
%config(noreplace) %{_sysconfdir}/sysconfig/vdr-rcu
%{vdr_plugin_dir}/libvdr-rcu.so.%{apiversion}
%{vdr_plugin_paramdir}/rcu.*

%files plugin-skincurses -f vdr-skincurses.lang
%doc PLUGINS/src/skincurses/HISTORY
%doc PLUGINS/src/skincurses/README
%{vdr_plugin_dir}/libvdr-skincurses.so.%{apiversion}

%files plugin-status
%doc PLUGINS/src/status/HISTORY
%doc PLUGINS/src/status/README
%{vdr_plugin_dir}/libvdr-status.so.%{apiversion}

%files plugin-servicedemo
%doc PLUGINS/src/servicedemo/HISTORY
%doc PLUGINS/src/servicedemo/README
%{vdr_plugin_dir}/libvdr-svccli.so.%{apiversion}
%{vdr_plugin_dir}/libvdr-svcsvr.so.%{apiversion}

%files plugin-svdrpdemo
%doc PLUGINS/src/svdrpdemo/HISTORY
%doc PLUGINS/src/svdrpdemo/README
%{vdr_plugin_dir}/libvdr-svdrpdemo.so.%{apiversion}


%changelog
* Fri Nov 13 2020 wally <wally> 2.0.7-9.mga8
+ Revision: 1645014
- add debian patch to fix build with glibc 2.31
- add gentoo patch to fix build with kernel >= 4.17
+ umeabot <umeabot>
- Mageia 8 Mass Rebuild

* Sun Sep 23 2018 umeabot <umeabot> 2.0.7-8.mga7
+ Revision: 1301576
- Mageia 7 Mass Rebuild

* Tue Jul 31 2018 wally <wally> 2.0.7-7.mga7
+ Revision: 1246363
- update vdr macros
  - use new make macros
  - don't end %%vdr_plugin_install to failure if translations aren't found

* Tue Jul 10 2018 wally <wally> 2.0.7-6.mga7
+ Revision: 1242929
- add patch to fix build with gcc7

* Wed Aug 30 2017 guillomovitch <guillomovitch> 2.0.7-5.mga7
+ Revision: 1148601
- rebuild for latest openssl

* Sun Oct 16 2016 tv <tv> 2.0.7-4.mga6
+ Revision: 1061018
- switch to %%autosetup (mga#15579)

* Fri Feb 12 2016 doktor5000 <doktor5000> 2.0.7-3.mga6
+ Revision: 958191
- drop old deprecated filetriggers
- add transaction-based filetrigger

* Tue Feb 09 2016 umeabot <umeabot> 2.0.7-2.mga6
+ Revision: 952230
- Mageia 6 Mass Rebuild

* Sat Jan 31 2015 anssi <anssi> 2.0.7-1.mga5
+ Revision: 812851
- new version 2.0.7, bugfixes only

* Mon Jan 05 2015 anssi <anssi> 2.0.6-5.mga5
+ Revision: 808480
- use sed instead of bash parameter expansion in plugin macros
  (the expansion semantics have subtly changed, breaking parameter
   generation)

* Mon Jan 05 2015 anssi <anssi> 2.0.6-4.mga5
+ Revision: 808454
- Fix epgimages dir owner

* Mon Jan 05 2015 anssi <anssi> 2.0.6-3.mga5
+ Revision: 808448
- Fix wrong vdr_plugin_datadir definition
- fix wrong owner of VDR plugin cache directory

* Mon Nov 24 2014 anssi <anssi> 2.0.6-2.mga5
+ Revision: 798731
- fix %%vdr_plugin_params_begin() macro with current rpm (there is now
  an additional newline in stdin)

* Sat Nov 22 2014 anssi <anssi> 2.0.6-1.mga5
+ Revision: 798343
- new stable version 2.0.6
- migrate to a systemd service file
- drop VDR_NICE configuration setting
- add more complete LCN support (Rolf Ahrenberg)
- update patches for the current version

* Wed Oct 15 2014 umeabot <umeabot> 2.0.3-6.mga5
+ Revision: 739778
- Second Mageia 5 Mass Rebuild

* Fri Sep 26 2014 tv <tv> 2.0.3-5.mga5
+ Revision: 725273
- rebuild for bogus file deps

* Tue Sep 16 2014 umeabot <umeabot> 2.0.3-4.mga5
+ Revision: 690143
- Mageia 5 Mass Rebuild

* Tue Oct 22 2013 umeabot <umeabot> 2.0.3-3.mga4
+ Revision: 545113
- Mageia 4 Mass Rebuild

* Tue Oct 15 2013 anssi <anssi> 2.0.3-2.mga4
+ Revision: 500760
- fix new-style-plugin check in %%vdr_plugin_prep macro to work on all
  systems

* Tue Oct 15 2013 anssi <anssi> 2.0.3-1.mga4
+ Revision: 499388
- new version 2.0.3
- drop patches applied upstream or no longer needed by plugins
  (finnish.patch, fontconfig2.9.patch, ttxtsubs-on.patch,
  disable_ca_updates.patch, intcamdevices.patch, linux-3.7.patch)
- drop jumpplay and noepg patches as unmaintained
- include naludump patch to avoid junk data in recordings on
  some networks
- update other patches
- adapt macros for new plugin build system

* Sat May 04 2013 anssi <anssi> 1.7.25-5.mga3
+ Revision: 412291
- fix runtime assert with fontconfig 2.9 (fontconfig2.9.patch)

* Mon Jan 14 2013 umeabot <umeabot> 1.7.25-4.mga3
+ Revision: 385249
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Jan 13 2013 cjw <cjw> 1.7.25-3.mga3
+ Revision: 362369
- patch603: fix build with new kernel headers

* Sun Dec 02 2012 malo <malo> 1.7.25-2.mga3
+ Revision: 325318
- update RPM group

* Wed Mar 07 2012 anssi <anssi> 1.7.25-1.mga2
+ Revision: 221031
- new version 1.7.25
  o RCU (custom IR receiver + four digit display) support has been
    splitted off to a new rcu plugin (vdr-plugin-rcu)
- update liemikuutio patchset to 1.34
- update rediffed jumpplay.patch from Fedora
- switch to Fedora version of mainmenuhooks patch, for epgsearch plugin
- fix unescaped macro in README.mageia.custom-plugins

* Sat Feb 25 2012 anssi <anssi> 1.7.23-2.mga2
+ Revision: 214840
- really enable BIDI support
- provide some dvbsddevice and dvbhddevice plugin headers in vdr-devel,
  needed by sc

* Sat Feb 25 2012 anssi <anssi> 1.7.23-1.mga2
+ Revision: 214747
- new version 1.7.23, notable changes that may require user action:
  o DVB output devices ("FF cards") are now supported by the dvbsddevice
    plugin instead of being supported by VDR core.
  o Default SVDRP port has been changed to 6419 as assigned for SVDRP use by
    IANA.
  o Some scripts have had their '.pl' suffix removed, notably 'svdrpsend'.
  o VDR now uses the TS recording format instead of PES. Old recordings
    are still playable.
  o LNB sharing is now implemented in VDR core and is now configured
    differently.
- enable BIDI support
- remove old backportability definitions from .spec
- remove sky plugin, dropped upstream
- add vdr-plugin-dvbsddevice and vdr-plugin-dvbhddevice plugin packages
- add patches
  o show current program in channel list (channel+epg.patch), from Fedora
  o Finnish translation update (finnish.patch), from Rolf Ahrenberg
  o drop confusing additional teletext option (ttxtsubs-on.patch), for
    upstream http://projects.vdr-developer.org/issues/819 , from Fedora
  o logical channel number support (lcn.patch), from Rolf Ahrenberg
- update patches
  o timercmd.diff, from epgsearch plugin
  o GraphTFT plugin support (graphtft.patch), from e-tobi debian repository
  o Yaepg plugin support (yaepg.patch), from e-tobi
  o noepg plugin support (noepg.patch), from e-tobi
  o timer-info patch (timer-info.diff), from toms-cafe.de
  o liemikuutio patchset (from 1.27 to 1.33), from Rolf Ahrenberg
  o jumpplay support (jumpplay.patch, jumpplay-finnish.patch), from Fedora
  o pin plugin support (pin.patch), from e-tobi
  o ttxtsubs plugin support (ttxtsubs.patch), from ttxtsubs plugin
  o iptv plugin support (disable_ca_updates.patch), from iptv plugin
  o rotor plugin support (rotor.patch), from yavdr
- drop now unneeded patches:
  o fix-overlapping-strcpy.patch, fixed upstream
  o vdr-1.6.0-hasdecoder.patch, fixed upstream
  o addon-fix_nid_tid_channel_iterator.diff, fixed upstream
  o drop-dvbapi-check.patch, fixed upstream
  o plugindev-disable-ca-updates.patch, fixed upstream
  o frontend-facilities.patch, implemented upstream
  o adapt-to-v4l2.patch, fixed upstream
  o cap_sys_nice.patch, applied upstream
  o hitk.patch, implemented upstream
  o logident.patch, implemented upstream with a different name
  o ionice.patch, applied upstream
  o sourcecaps.patch, implemented upstream differently
  o h264 support patch, implemented upstream
  o h264-non-pod-type.patch, was only relevant for h264 support patch
  o printf-format.patch, applied upstream
  o parentalrating-content.diff, implemented upstream
  o configurablelnbshare.diff, implemented upstream differently
  o grab.diff, fixed upstream
  o thread-name.diff, implemented upstream
  o const.diff, fixed upstream
  o pluginparam.patch, implemented upstream
  o shared-devices.patch, implemented upstream differently
  o pvrinput.patch, unneeded with current pvrinput plugin
  o subtitles-button.patch, implemented upstream
  o cutter-marks.diff, fixed upstream
  o gcc4.6.patch, fixed upstream
- drop other patches:
  o sort-options.patch, conflicts with nicer channel+epg.patch (this can be
    brought back if really needed)
  o cmdsubmenu.patch, not updated (this can be brought back if needed)
  o dd-record-option.patch, there will now be a single dd option (can be
- rediff patches menuorg.patch, intcamdevices.patch, analogtv.patch,
  rsvps.patch, dxr3.patch, MainMenuHooks.patch,
  epgsearch-exttimeredit-0.0.2.diff
- reorder and renumber patches, use %%apply_patches
- update Description
- rename our readme file to README.mageia.custom-plugins
- add README.1.7.0.upgrade.urpmi to replace 1.6.0 upgrade README file
- replace some "mandriva" occurrences
- cosmetic fixes to configuration handler .params files
- install a sysconfig file for pictures plugin
- adapt package for renamed scripts
- add support for VDR_PLUGIN_ARGS in plugin sysconfig files
- drop obsolete commands from the initscript
- fix missing initscript result output ("OK"/"FAILED")
- Mageiafy some mdv instances
+ guillomovitch <guillomovitch>
- rename distribution-specific documentation file to README.mga, and switch to herein document

* Fri May 13 2011 anssi <anssi> 1.6.0-19.mga1
+ Revision: 98048
- drop old conditionals
- adapt for V4L2 (fixes build with with recent linux headers, patch
  adapt-to-v4l2.patch from upstream)
- fix build with GCC 4.6 (gcc4.6.patch)
- revert incorrect changes made in 18mdv
+ obgr_seneca <obgr_seneca>
- imported package vdr


* Fri Aug 06 2010 Funda Wang <fwang@mandriva.org> 1.6.0-18mdv2011.0
+ Revision: 567114
- deal with our flags

  + Anssi Hannula <anssi@mandriva.org>
    - make the escaping in .spec more consistent and add a comment explaining
      it

* Sat Jan 16 2010 Funda Wang <fwang@mandriva.org> 1.6.0-17mdv2010.1
+ Revision: 492262
- rebuild for new libjpegv8

* Wed Jan 06 2010 Anssi Hannula <anssi@mandriva.org> 1.6.0-16mdv2010.1
+ Revision: 486591
- fix plugin arguments corruption on x86_64 with glibc 2.11+
  (P37: fix-overlapping-strcpy.patch)

* Sun Dec 13 2009 Anssi Hannula <anssi@mandriva.org> 1.6.0-15mdv2010.1
+ Revision: 478264
- adapt for new location of lirc socket on 2010.0+
- update URL

* Sun Aug 23 2009 Funda Wang <fwang@mandriva.org> 1.6.0-14mdv2010.0
+ Revision: 419763
- rebuild for new libjpeg v7

* Mon Aug 03 2009 Anssi Hannula <anssi@mandriva.org> 1.6.0-13mdv2010.0
+ Revision: 407680
- start vdr after dkms, if present

* Fri Jul 31 2009 Anssi Hannula <anssi@mandriva.org> 1.6.0-12mdv2010.0
+ Revision: 405053
- fix an error in filetriggers handling preventing VDR from restarting
  when the plugins were explicitely listed in sysconfig file
- fix filetriggers filter

* Thu Jul 30 2009 Anssi Hannula <anssi@mandriva.org> 1.6.0-10mdv2010.0
+ Revision: 404798
- enable filetriggers on 2009.1 as well, with a requirement on the fixed
  rpm in main/updates

* Tue Jul 28 2009 Anssi Hannula <anssi@mandriva.org> 1.6.0-9mdv2010.0
+ Revision: 402631
- fix a bug in Reinhard Nissl's h264 patch that would cause "Illegal
  instruction" error when trying to emit an error into syslog in one
  specific case (h264-non-pod-type.patch)

* Tue Jul 28 2009 Anssi Hannula <anssi@mandriva.org> 1.6.0-8mdv2010.0
+ Revision: 401086
- disable parallel make for included plugins due to errors with klodia
  buildhost
- apply ldflags in main vdr package as well
- VDR 1.6.0-2
- embed patch version numbers into Patch lines in spec
- use filetriggers for plugin %%post and %%postun handling on 2009.0 and
  cooker (2009.1 will follow after rpm update #52470)
- apply %%ldflags for plugins
- replace $VDR_PLUGIN_FLAGS with $VDR_PLUGIN_EXTRA_FLAGS
- do not wait for harddrake on boot
- fix typo in initscript description
- do not print success/failure twice when shutting down VDR
- add condrestart support for initscript
- add patches:
  o fix build with gcc4.4 (grab.diff from upstream, const.diff from
    Ludwig Nussel)
  o add subtitles selection button into Setup/DVB menu
    (subtitles-button.patch from Rolf Ahrenberg)
  o use cap_sys_nice capabilities (cap_sys_nice.patch from Rolf Ahrenberg,
    applied in upstream devel)
  o add keymacro support for hitk SVDRP command (hitk.patch from Rolf
    Ahrenberg)
  o set thread specific I/O priorities (ionice.patch from Rolf Ahrenberg,
  o add timercmd patch from epgsearch (timercmd-0.1_1.6.0.diff)
  o disable CA updates for pluginparam devices
    (plugindev-disable-ca-updates.patch from iptv plugin)
  o allow epgsearch plugin to replace timer edit screen (exttimeredit.diff
    from epgsearch)
- update patches:
  o update liemikuutio patchset to 1.27 (Rolf Ahrenberg)
  o update parentalrating-content.diff with new broadcaster-defined
    ratings (Rolf Ahrenberg)
  o update ttxtsubs support patch from ttxtsubs (ttxtsubs.patch)
  o update noepg support patch from e-tobi / noepgmenu plugin
  o update menuorg support patch from e-tobi / menuorg plugin
  o update graphtft support patch from e-tobi / graphtft plugin
  o update timer-info patch to 0.5 (Thomas G?\195?\188nther)
  o update jumpplay patch to 1.0 (Thomas G?\195?\188nther)
  o update pvrinput support patch from e-tobi (add CA ids A0 and A2,
    suggested by Christian Jarczyk)
- ABI is modified by patches, plugins have to be rebuilt
- rediff patches: configurable lnbshare, pluginparam.patch, Reinhard
  Nissl's h264+etc patch, cmdsubmenu.patch, MainMenuHooks.patch,
  pin.patch
- fix init script containing return outside function, called when vdr
  is already started

* Fri Mar 20 2009 Anssi Hannula <anssi@mandriva.org> 1.6.0-6mdv2009.1
+ Revision: 359268
- bump ABI version due to patch changes, plugins have to be rebuilt
- fix printf format strings (printf-format.patch and hunks in h264 patch)
- drop kernel dvb api check (drop-dvbapi-check.patch) as the api
  version is bumped arbitrarily
- update liemikuutio patchset to 1.24
- drop oldsubs.patch, merged into liemikuutio
- add frontend-facilities.patch
- rediff patches rotor, pin, mainmenuhooks
- rediff patches lnbshare, graphtft, shared-devices, sourcecaps,
  h264, cmdsubmenu, rotor, jumpplay, mainmenuhooks
- build plugins with current optflags instead of vdr optflags
- check for already running vdr in initscript

  + Funda Wang <fwang@mandriva.org>
    - really rediff
    - rediff vdrversion patch

* Mon Jul 07 2008 Oden Eriksson <oeriksson@mandriva.com> 1.6.0-5mdv2009.0
+ Revision: 232374
- rebuilt against new libcap

  + Anssi Hannula <anssi@mandriva.org>
    - define %%_localstatedir locally for backportability

  + Pixel <pixel@mandriva.com>
    - adapt to %%_localstatedir now being /var instead of /var/lib (#22312)

* Thu May 15 2008 Anssi Hannula <anssi@mandriva.org> 1.6.0-4mdv2009.0
+ Revision: 207713
- add an introductory README.install.urpmi file
- fix default configdir path when running outside runvdr (#40641)
- add configurable logident for multi-vdr systems (logident.patch), not
  added to sysconfig until accepted upstream
- fix HasDecoder() when in pmExtern playmode (hasdecoder.patch)
- detach runvdr from controlling terminal using setsid
- start vdr only after all filesystems have been mounted
  (Should-Start: $local_fs $remote_fs)

* Sun May 04 2008 Anssi Hannula <anssi@mandriva.org> 1.6.0-3mdv2009.0
+ Revision: 201088
- play subtitles automatically on old recordings (oldsubs.patch)

* Mon Apr 28 2008 Anssi Hannula <anssi@mandriva.org> 1.6.0-2mdv2009.0
+ Revision: 197884
- handle shared devices with --only-in= and --only-out (P9)
- add patch to properly handle CA with streamdev (P10)
- patches modify the ABI, plugins have to rebuilt

* Fri Apr 25 2008 Anssi Hannula <anssi@mandriva.org> 1.6.0-1mdv2009.0
+ Revision: 197497
- adapt cflags for ncursesw
- add urpmi readme file for upgrades
- VDR 1.6.0-1
- subtitles support integrated, drop the patch and add obsoletes
  on vdr-plugin-subtitles
- minor description and summary updates
- drop unneeded translationerror-only-when-debug patch (P1)
- drop maxdevices patch, applied upstream (P2)
- drop getdevices patch, applied upstream (P3)
- rediff rsvps patch (P4)
- hack around bad subtitle support of DXR3 (P6)
- set monospace as default monospace font and sans serif as default
  large font (P7)
- show more font aliases in the font lists (P8)
- update liemikuutio patchset to 1.19 (P12)
- add Rolf Ahrenberg's cutter-marks, parentalrating-content and
  thread-name patches (P13, P14, P15)
- drop closefilter patch, applied upstream (P16)
- update sort-options and dd-record-option patches from e-tobi
  (P21, P22)
- switch to e-tobi versions of yaepg, pin, graphtft, sourcecaps, and
  reelchannelscan patches (P23, P25, P26, P27, P29)
- replace submenu patch with menuorg patch from e-tobi (P24)
- replace noepgmenu patch with noepg patch from e-tobi (P28)
- add pvrinput support patch from e-tobi (P30)
- update lnbshare patch (P34)
- update rotor support patch (P40)
- drop unneeded decruft patch (P45)
- update jumpplay, timer-info and cmdsubmenu patches (P50, P52, P53)
- drop smooth-fastforward patch, applied upstream (P56)
- drop unneeded exthooks patch (P60)
- drop sc patch, applied upstream (P63)
- update h264 patch (P67)
- add a fix for h264 patch (P68)
- now buildrequires libncursesw-devel instead of ncurses-devel
- buildrequires fontconfig-devel and freetype2-devel
- drop old obsoletes on vdr-core packages
- add the new pictures plugin
- adapt build macros for gettext localization, and rename the locales to
  standard names
- require gettext in vdr-devel
- fix vdr_plugin_post and vdr_plugin_postun macros to not consume the
  line after them
- do not disable UTF-8 anymore, vdr now supports it
- add new options into sysconfig file

* Fri Jan 04 2008 Anssi Hannula <anssi@mandriva.org> 1.4.7-9mdv2008.1
+ Revision: 144612
- add handling for plugin parameters that can be specified multiple
  times (MULTIPLE_PARAMS)
- provide VdrVersion() for fetching version at runtime
- get rid of %%vdr_add_optflags for specifying additional compiler flags
  and use more standard and robust VDR_PLUGIN_FLAGS variable that
  overrides %%{vdr_plugin_flags}, in the same way as CFLAGS=>%%{optflags}
- set VDRVERSION to version-release
- add vdr_sub_abi number to APIVERSION
- adapt license tag for new policy
- P67: add H.264 support by Reinhard Nissl, adapted for 1.4.7 by Petri
  Hintukainen (http://phivdr.dyndns.org/vdr/.h264/), adapted for
  Mandriva package by Petri Suvila
- the VDR ABI is modified, plugins have to be rebuilt

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request

* Mon Oct 29 2007 Anssi Hannula <anssi@mandriva.org> 1.4.7-8mdv2008.1
+ Revision: 103023
- add support for smooth fast forward with output plugins that support it
  (P56, from xineliboutput plugin)
- add pluginparam and closefilter patches for iptv plugin (P16, P17)
- patches modify the VDR ABI, plugins have to be rebuilt

* Sat Oct 27 2007 Anssi Hannula <anssi@mandriva.org> 1.4.7-7mdv2008.1
+ Revision: 102679
- minor description fixes
- update subtitles+ttxtsubs patch (fixes bug in PES_EXTENSION insertion)
- raise maximum number of DVB devices to 8 (patch2)
- use silent grep in module check in runvdr

* Wed Sep 05 2007 Anssi Hannula <anssi@mandriva.org> 1.4.7-6mdv2008.0
+ Revision: 80287
- add dummy LOCALEDIR to plugin build call to allow building plugins
  that contain support for both the new and the legacy i18n handling

* Thu Jul 12 2007 Anssi Hannula <anssi@mandriva.org> 1.4.7-5mdv2008.0
+ Revision: 51440
- call modprobe and rmmod with exact path
- set HOME to VDR_USER homedir (default /var/lib/vdr), fixes crash with dvd
  plugin, reported by Johan Schuring

* Tue Jul 10 2007 Anssi Hannula <anssi@mandriva.org> 1.4.7-4mdv2008.0
+ Revision: 51060
- use BASH_ENV instead of --login to load system variables
- provide global macro %%vdr_plugin_flags

* Sun Jul 08 2007 Anssi Hannula <anssi@mandriva.org> 1.4.7-3mdv2008.0
+ Revision: 49956
- patches modify the ABI, plugins have to be rebuilt
- do not show "no translation" errors when running under low logging
  level (patch1)
- add clean support for external CI handlers (patch63), drop now
  unneeded hunks from patch60
- add %%_vdr_epgimagesdir as global macro
- set plugin configuration variables as local to prevent namespace clashes
- do not show pin plugin specific options when it is not loaded
- reset environment when launching runvdr

* Thu Jun 21 2007 Anssi Hannula <anssi@mandriva.org> 1.4.7-2mdv2008.0
+ Revision: 42043
- add menu patch for graphtft plugin (P32)
- add patch for reelchannelscan plugin (P47)
- add patch for pin plugin (P58)
- patches break plugin ABI, plugins have to be rebuilt
- plugins now require vdr with specific arch
- add README.mdv regarding manually compiling plugins
- load capability kernel module in runvdr if needed

* Sat May 12 2007 Anssi Hannula <anssi@mandriva.org> 1.4.7-1mdv2008.0
+ Revision: 26424
- 1.4.7

* Sat May 05 2007 Anssi Hannula <anssi@mandriva.org> 1.4.6-8mdv2008.0
+ Revision: 23261
- fix VDRVERSION during plugin build

* Sat May 05 2007 Anssi Hannula <anssi@mandriva.org> 1.4.6-6mdv2008.0
+ Revision: 22669
- VDR 1.4.6-1
- drop patch2, no longer needed by streamdev
- re-enable patch4
  o breaks ABI, plugins have to be rebuilt
- drop patch5, applied upstream
- update Ahrenberg's subtitles+ttxtsubs patch
- minor improvements in description
- add epg2html.pl and summary2info.pl

* Fri May 04 2007 Anssi Hannula <anssi@mandriva.org> 1.4.6-3mdv2008.0
+ Revision: 22557
- disable patch4 for now

* Tue May 01 2007 Anssi Hannula <anssi@mandriva.org> 1.4.6-2mdv2008.0
+ Revision: 19858
- patch4: allow using running status as VPS fallback
- patch5: fix NIT handling on Finnish Digita DVB-T
- patch65: menu hooks for epgsearch plugin


* Sun Mar 04 2007 Anssi Hannula <anssi@mandriva.org> 1.4.6-1mdv2007.0
+ Revision: 132164
- VDR 1.4.6

* Sat Jan 20 2007 Anssi Hannula <anssi@mandriva.org> 1.4.5-1mdv2007.1
+ Revision: 111087
- VDR 1.4.5
- update urls of Rolf Ahrenberg's patches
- make VDR_PLUGIN_ARGS usable in plugin-specific sysconfig files as well
- add some comments into the vdr sysconfig file

* Mon Dec 04 2006 Anssi Hannula <anssi@mandriva.org> 1.4.4-2mdv2007.1
+ Revision: 90489
- raise release
- VDR 1.4.4-2
- upgrade modifies the ABI, plugins have to be rebuilt
- lirc is hotpluggable, remove from should-start
- add harddrake to should-start

* Sat Nov 04 2006 Anssi Hannula <anssi@mandriva.org> 1.4.4-1mdv2007.1
+ Revision: 76610
- VDR 1.4.4

* Sun Oct 29 2006 Anssi Hannula <anssi@mandriva.org> 1.4.3-1mdv2007.1
+ Revision: 73620
- VDR 1.4.3-4
- upgrade modifies the ABI, plugins have to be rebuilt
- liemikuutio 1.13
- upgrade to fixed configurableLNBshare
- drop patch1, patch3, applied upstream
- fix patch60
- add better comments to files in /usr/share/vdr/defaults/
- fix uninstalling plugins if rpm didn't honor Requires(preun)
- fix missing backslash from runvdr
- Import vdr

* Thu Sep 07 2006 Anssi Hannula <anssi@mandriva.org> 1.4.2-3mdv2007.0
- patch4: fix cTimer assignment
- patch1: raise APIVERSION as patch4 is from upstream
- patch4 modifies the ABI, plugins have to be rebuilt
- remove /etc/vdr symlink, it only adds confusion

* Mon Sep 04 2006 Anssi Hannula <anssi@mandriva.org> 1.4.2-2mdv2007.0
- VDR 1.4.2-1 (bugfixes)
- add note about permissions to VDR_RCU comment in sysconfig

* Fri Sep 01 2006 Anssi Hannula <anssi@mandriva.org> 1.4.2-1mdv2007.0
- VDR 1.4.2
- liemikuutio 1.10
- no audio group by default
- rediff patch3

* Thu Aug 24 2006 Anssi Hannula <anssi@mandriva.org> 1.4.1-7mdv2007.0
- use underscore instead of dash in vdr_abi

* Thu Aug 24 2006 Anssi Hannula <anssi@mandriva.org> 1.4.1-6mdv2007.0
- VDR 1.4.1-5
- upgrade modifies the ABI, plugins have to be rebuilt
- patch3: fix device selection
- stricter ABI requires for plugins
- build plugins with -fPIC by default on x86, add macro for overriding
- rediff patch34

* Fri Aug 11 2006 Anssi Hannula <anssi@mandriva.org> 1.4.1-5mdv2007.0
- fix runvdr to check for UTF-8 before disabling it

* Mon Aug 07 2006 Anssi Hannula <anssi@mandriva.org> 1.4.1-4mdv2007.0
- VDR 1.4.1-3
- upgrade modifies the ABI, plugins have to be rebuilt
- update runvdr to disable UTF-8 (#24155)
- better description
- remove reference to the non-existent .vdr_plugins from runvdr
- rediff patch60

* Tue Jul 25 2006 Anssi Hannula <anssi@mandriva.org> 1.4.1-3mdv2007.0
- VDR 1.4.1-2
- liemikuutio 1.8
- do not use -b for patches
- eval the default keyword in plugin params macro
- use ccp for sysconfig files
- modify comments in main sysconfig file
- post and postun for plugins included with vdr
- do not use conditional patches, other patches depend on them
- patch22: separate "record DD" and "use DD" options
- patch45: support for decruft plugin
- patch60: hooks for plugins
- patches modify the ABI, plugins have to be rebuilt

* Mon Jun 19 2006 Anssi Hannula <anssi@mandriva.org> 1.4.1-2mdv2007.0
- use _ prefix for system path macros as per convention
- VDR 1.4.1-1
- patch20: better support for analogtv plugin
- patch21: new recording sort options
- patch34: configurable LNB sharing
- patch36: per-device source configuration, aka sourcecaps
- patch42: support for noepgmenu plugin
- patch51: submenu support
- patch52: show if enough space for a recording, aka timer-info
- patch53: hierarchical command menu support

* Mon Jun 12 2006 Anssi Hannula <anssi@mandriva.org> 1.4.1-1mdv2007.0
- VDR 1.4.1
- liemikuutio 1.6
- fix a typo in the VDR initial logmessage
- drop Finnish patch, upstream

* Sun Jun 11 2006 Anssi Hannula <anssi@mandriva.org> 1.4.0-6mdv2007.0
- do not use -fPIC on x86

* Fri Jun 09 2006 Anssi Hannula <anssi@mandriva.org> 1.4.0-5mdv2007.0
- silence rename in vdr_plugin_install
- rotor patch
- buildrequires ncurses-devel
- drop the multiple cores thing, too complicated with plugins
- ship standard core only, add build switches
- drop COPYING, vdr is GPL

* Mon Jun 05 2006 Anssi Hannula <anssi@mandriva.org> 1.4.0-4mdv2007.0
- maintenance patch 1.4.0-3
- use getenv to get the user homedir
- fix requires of plugins shipped with vdr
- update bigpatch core to 1.4.0-1
- fix VDRVERSION
- modify diseqc.conf earlier

* Fri Jun 02 2006 Anssi Hannula <anssi@mandriva.org> 1.4.0-3mdv2007.0
- patch2: add friend declaration in dvbsub.h for streamdev
- fix build switches for building a custom core

* Thu Jun 01 2006 Anssi Hannula <anssi@mandriva.org> 1.4.0-2mdv2007.0
- fix missing backslash in vdr.macros
- use the real config dir instead of the symlink as the default VDR_CONFIGDIR
- touch channels.conf in run-time, drop from package

* Wed May 31 2006 Anssi Hannula <anssi@mandriva.org> 1.4.0-1mdv2007.0
- initial Mandriva release