# # spec file for package tvheadend # # Copyright (c) 2015 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 htsgroup video %define htsuser hts Name: tvheadend Version: 4.0.7 Release: 1.3 Summary: A TV Streaming Server License: GPL-3.0 Group: Productivity/Multimedia/Other Url: https://tvheadend.org/ Source0: http://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch: tvheadend-fix-daemon-user-group.patch BuildRequires: fdupes BuildRequires: pkgconfig(avahi-client) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavresample) BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libssl) BuildRequires: pkgconfig(libswscale) BuildRequires: pkgconfig(liburiparser) BuildRequires: pkgconfig(zlib) BuildRequires: pkg-config BuildRequires: python-devel %{?systemd_requires} %description A TV streaming server supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources. It also comes with a powerful and easy to use web interface both used for configuration and day-to-day operations, such as searching the EPG and scheduling recordings. %prep %setup -q %patch -p1 sed -e '/^TVH_ARGS/cTVH_ARGS="-C"' -i debian/%{name}.default echo %{version} > rpm/version %build %configure --disable-dvbscan --disable-libffmpeg_static --disable-libffmpeg_static_x264 make V=1 %{?_smp_mflags} %install %make_install mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates/ mkdir -p %{buildroot}%{_sbindir} install -D -m 644 rpm/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service install -m 644 rpm/%{name}.sysconfig %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} %fdupes -s %{buildroot}%{_datadir} chmod -x %{buildroot}%{_mandir}/man1/tvheadend.1 %post %fillup_only %{name} %service_add_post %{name}.service cat << 'EOM' ==> All configuration is maintained through the web interface: ==> ==> http://localhost:9981/ ==> ==> Default login without username/password. EOM %pre %service_add_pre %{name}.service %{_sbindir}/useradd -g %{htsgroup} -m -s /bin/false %{htsuser} -c "Tvheadend TV server" &> /dev/null || : %{_sbindir}/passwd -l %{htsuser} &> /dev/null || : %preun %service_del_preun %{name}.service %postun %service_del_postun %{name}.service %files %defattr(-,root,root) %{_bindir}/tvheadend %{_datadir}/tvheadend %{_mandir}/man1/tvheadend.1.gz %{_unitdir}/%{name}.service %{_localstatedir}/adm/fillup-templates/sysconfig.%{name} %{_sbindir}/rc%{name} %changelog