File vdradmin-am.spec of Package vdradmin-am
#
# spec file for package vdradmin-am (Version 3.6.8)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010-2012 B1 Systems GmbH, Vohburg, Germany
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: vdradmin-am
BuildRequires: perl(CGI)
BuildRequires: perl-gettext
BuildRequires: perl-Authen-SASL perl-Compress-Zlib perl-Digest-HMAC perl-libwww-perl
BuildRequires: perl-IO-Socket-INET6 perl-Socket6
BuildRequires: systemd
BuildRequires: procps
BuildRequires: firewall-macros
Url: http://andreas.vdr-developer.org
License: GPL-2.0+
Group: Productivity/Multimedia/Other
AutoReqProv: on
Requires: perl(CGI)
Requires: perl(HTTP::Date)
Requires: perl(URI)
%{?systemd_requires}
Summary: Webinterface for managing the Linux Video Disk Recorder (VDR)
Version: 3.6.10
Release: 1
BuildArch: noarch
Source: %{name}-%{version}.tar.bz2
Source1: vdradmin.service
Source2: vdradmin.xml
Patch1: vdradmin-3.6.7-destdir-fix.diff
Patch2: vdradmin-3.6.9-recdetail-fix.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Vdradmin provides a webinterface for managing the Linux Video Disk
Recorder (VDR), it has a virtual remote to control your VDR and you can
search for certain shows in the EPG
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
%build
%install
./make.sh local
DOCDIR=%{_docdir}/vdradmin \
VIDEODIR=/var/spool/video \
VDRCONF=/etc/vdr \
DESTDIR=$RPM_BUILD_ROOT ./install.sh
# the questions:
# What's your VDR hostname (e.g video.intra.net)? [localhost]:
# On which port does VDR listen to SVDRP queries? [2001]:
# On which address should VDRAdmin-AM listen (0.0.0.0 for any)? [0.0.0.0]:
# On which port should VDRAdmin-AM listen? [8001]:
# Username? [linvdr]: Password? [linvdr]:
# Where are your recordings stored? [/video]:
# Where are your VDR's configuration files located? [/video]
echo -e "\n6419\n\n\nvdradmin\nvdradmin\n/var/spool/video\n/etc/vdr\n" | ./vdradmind.pl --config
# /* don't include build hostname in config file */
sed -i -e "s/^MAIL_FROM =.*/MAIL_FROM = from@address.tld/" \
-e "s/^MAIL_SERVER =.*/MAIL_SERVER = your.email.server/" vdradmind.conf
install -m 755 -d $RPM_BUILD_ROOT/etc/vdradmin/
install -m 644 vdradmind.conf $RPM_BUILD_ROOT/etc/vdradmin/
install -m 0644 -D %{S:1} %{buildroot}/%{_unitdir}/vdradmin.service
install -m 0644 -D %{S:2} %{buildroot}%{_prefix}/lib/firewalld/services/vdradmin.xml
install -d %{buildroot}%{_sbindir}
ln -s service %{buildroot}%{_sbindir}/rcvdradmin
mkdir -p $RPM_BUILD_ROOT/var/cache/vdradmin
%find_lang vdradmin
%clean
rm -rf "$RPM_BUILD_ROOT"
%files -f vdradmin.lang
%defattr(-,root,root)
%{_docdir}/vdradmin
%dir /etc/vdradmin
%config(noreplace) /etc/vdradmin/vdradmind.conf
%{_unitdir}/vdradmin.service
/usr/bin/vdradmind
%{_sbindir}/rcvdradmin
%{_mandir}/man8/vdradmind.8.*
/usr/share/vdradmin
%dir /var/cache/vdradmin
%dir %{_prefix}/lib/firewalld
%dir %{_prefix}/lib/firewalld/services
%{_prefix}/lib/firewalld/services/vdradmin.xml
%pre
%service_add_pre vdradmin.service
%post
%service_add_post vdradmin.service
%firewalld_reload
%preun
%service_del_preun vdradmin.service
%postun
%service_del_postun vdradmin.service
%changelog