2015-12-07 07:40:04 +00:00
|
|
|
#
|
|
|
|
# spec file for package tvheadend
|
|
|
|
#
|
2020-03-24 13:41:33 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2017-02-27 14:12:27 +00:00
|
|
|
# Copyright (c) 2016 Packman Team <packman@links2linux.de>
|
2015-12-07 07:40:04 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-10-10 08:15:48 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-12-07 07:40:04 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define htsgroup video
|
|
|
|
%define htsuser hts
|
2017-02-27 14:12:27 +00:00
|
|
|
%define homedir %{_localstatedir}/lib/tvheadend
|
2015-12-07 07:40:04 +00:00
|
|
|
Name: tvheadend
|
2019-01-13 18:17:21 +00:00
|
|
|
Version: 4.2.8
|
2016-01-06 17:42:33 +00:00
|
|
|
Release: 0
|
2015-12-07 07:40:04 +00:00
|
|
|
Summary: A TV Streaming Server
|
2017-02-27 20:57:50 +00:00
|
|
|
# parsers are from FFMpeg project under LGPL-2.1
|
|
|
|
# FFdecsa and extra/capmt_ca.c is GPL-2.0+ which is compatibile with GPL-3.0+
|
|
|
|
# rest of code seems to be GPL-3.0+
|
2018-03-18 08:50:08 +00:00
|
|
|
License: GPL-3.0-or-later AND LGPL-2.1-only
|
2015-12-07 07:40:04 +00:00
|
|
|
Group: Productivity/Multimedia/Other
|
2020-03-24 13:41:33 +00:00
|
|
|
URL: https://tvheadend.org/
|
2017-05-17 09:10:33 +00:00
|
|
|
Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2017-03-16 08:45:01 +00:00
|
|
|
Source2: %{name}-rpmlintrc
|
2017-02-27 14:12:27 +00:00
|
|
|
Source3: %{name}_super
|
2018-03-18 08:50:08 +00:00
|
|
|
# From https://github.com/tvheadend/dtv-scan-tables.git as build system fails to retrieve them
|
2019-01-13 18:17:21 +00:00
|
|
|
Source4: dvb-scan-git20190112.tar.gz
|
2017-02-28 10:33:29 +00:00
|
|
|
# PATCH-FIX-OPENSUSE tvheadend-fix-service-dependency.patch -- do not wait for or require syslog
|
|
|
|
Patch2: %{name}-fix-service-dependency.patch
|
2019-10-10 08:15:48 +00:00
|
|
|
# PATCH-FIX-UPSTREAM -- fix unsufficient configure checks when using LTO (check optimized away)
|
|
|
|
Patch3: fix_configure_checks_with_LTO.patch
|
2015-12-07 07:40:04 +00:00
|
|
|
BuildRequires: fdupes
|
2017-04-21 12:46:38 +00:00
|
|
|
BuildRequires: gcc-c++
|
2017-02-27 14:12:27 +00:00
|
|
|
BuildRequires: pkgconfig
|
2020-03-24 13:41:33 +00:00
|
|
|
BuildRequires: python3-base
|
2015-12-07 07:40:04 +00:00
|
|
|
BuildRequires: pkgconfig(avahi-client)
|
|
|
|
BuildRequires: pkgconfig(dbus-1)
|
2019-02-13 08:07:18 +00:00
|
|
|
BuildRequires: pkgconfig(libavcodec)
|
|
|
|
BuildRequires: pkgconfig(libavfilter)
|
|
|
|
BuildRequires: pkgconfig(libavformat)
|
|
|
|
BuildRequires: pkgconfig(libavresample)
|
|
|
|
BuildRequires: pkgconfig(libavutil)
|
2015-12-07 07:40:04 +00:00
|
|
|
BuildRequires: pkgconfig(libssl)
|
2019-02-13 08:07:18 +00:00
|
|
|
BuildRequires: pkgconfig(libswscale)
|
2015-12-07 07:40:04 +00:00
|
|
|
BuildRequires: pkgconfig(liburiparser)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2017-03-13 12:18:17 +00:00
|
|
|
Requires(pre): group(%{htsgroup})
|
2020-03-24 13:41:33 +00:00
|
|
|
%{?systemd_ordering}
|
2015-12-07 07:40:04 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
A TV streaming server supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV,
|
|
|
|
and Analog video (V4L) as input sources.
|
|
|
|
|
2017-05-18 12:47:05 +00:00
|
|
|
It also comes with a web interface both used for configuration and
|
|
|
|
day-to-day operations, such as searching the electronic program guide
|
|
|
|
(EPG) and for scheduling recordings.
|
2015-12-07 07:40:04 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2017-02-28 10:33:29 +00:00
|
|
|
%patch2 -p1
|
2019-10-10 08:15:48 +00:00
|
|
|
%patch3 -p1
|
2017-02-27 14:12:27 +00:00
|
|
|
|
|
|
|
sed -e "s/-u \([^ ]*\) -g \([^ ]*\)/-u %{htsuser} -g %{htsgroup}/" -i rpm/%{name}.sysconfig
|
2015-12-07 07:40:04 +00:00
|
|
|
sed -e '/^TVH_ARGS/cTVH_ARGS="-C"' -i debian/%{name}.default
|
2017-04-21 12:46:38 +00:00
|
|
|
sed -e '/cmake/d' -i configure
|
2018-03-18 08:50:08 +00:00
|
|
|
# Disable failing attempt to download from within the build host which has no internet connectivity
|
|
|
|
sed -e 's@"${ROOTDIR}/support/getmuxlist"@true@g' -i configure
|
2015-12-07 07:40:04 +00:00
|
|
|
echo %{version} > rpm/version
|
|
|
|
|
|
|
|
%build
|
2017-04-21 12:46:38 +00:00
|
|
|
export CFLAGS_NO_WERROR="yes"
|
2020-06-12 12:49:16 +00:00
|
|
|
export CFLAGS="%{optflags} -fcommon"
|
2017-04-21 12:54:56 +00:00
|
|
|
%configure \
|
2020-03-24 13:41:33 +00:00
|
|
|
--python=%{_bindir}/python3 \
|
2017-04-21 12:54:56 +00:00
|
|
|
--disable-ffmpeg_static \
|
|
|
|
--disable-hdhomerun_static
|
2018-03-18 08:50:08 +00:00
|
|
|
mkdir -p data/dvb-scan
|
|
|
|
tar -C data/dvb-scan -xvf %{SOURCE4}
|
|
|
|
touch data/dvb-scan/.stamp
|
2020-03-24 13:41:33 +00:00
|
|
|
%make_build
|
2015-12-07 07:40:04 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
2017-11-23 15:02:16 +00:00
|
|
|
mkdir -p %{buildroot}%{_fillupdir}/
|
2015-12-07 07:40:04 +00:00
|
|
|
mkdir -p %{buildroot}%{_sbindir}
|
|
|
|
install -D -m 644 rpm/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service
|
2017-02-27 14:12:27 +00:00
|
|
|
sed -i 's@/home/tvheadend@%{homedir}@' rpm/%{name}.sysconfig
|
2017-11-23 15:02:16 +00:00
|
|
|
install -m 644 rpm/%{name}.sysconfig %{buildroot}/%{_fillupdir}/sysconfig.%{name}
|
2015-12-07 07:40:04 +00:00
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
2017-02-27 14:12:27 +00:00
|
|
|
# Install superuser helper script
|
|
|
|
sed -i 's@/home/tvheadend@%{homedir}@' %{SOURCE3}
|
|
|
|
install -Dm0755 %{SOURCE3} %{buildroot}%{_sbindir}/%{name}_super
|
2015-12-07 07:40:04 +00:00
|
|
|
%fdupes -s %{buildroot}%{_datadir}
|
|
|
|
chmod -x %{buildroot}%{_mandir}/man1/tvheadend.1
|
|
|
|
|
|
|
|
%post
|
|
|
|
%fillup_only %{name}
|
|
|
|
%service_add_post %{name}.service
|
|
|
|
cat << 'EOM'
|
2017-02-27 14:12:27 +00:00
|
|
|
==> IMPORTANT: Post configuration tasks;
|
|
|
|
==> 1. Start the tvheadend service (to create home directory).
|
|
|
|
==> 2. Run tvheadend_super to set default username and password.
|
|
|
|
==> 3. Restart tvheadend service.
|
|
|
|
==>
|
|
|
|
==>
|
|
|
|
==> All further configuration is maintained through the web interface:
|
2015-12-07 07:40:04 +00:00
|
|
|
==>
|
|
|
|
==> http://localhost:9981/
|
|
|
|
==>
|
|
|
|
EOM
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre %{name}.service
|
2020-03-24 13:41:33 +00:00
|
|
|
getent passwd %{htsuser} >/dev/null || %{_sbindir}/useradd -g %{htsgroup} -m -d %{homedir} -r -s /bin/false %{htsuser} -c "Tvheadend TV server"
|
2015-12-07 07:40:04 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
|
|
|
|
%files
|
2019-10-10 08:15:48 +00:00
|
|
|
%doc CONTRIBUTING.md
|
|
|
|
%license LICENSE.md
|
2015-12-07 07:40:04 +00:00
|
|
|
%{_bindir}/tvheadend
|
|
|
|
%{_datadir}/tvheadend
|
2017-02-27 14:12:27 +00:00
|
|
|
%{_mandir}/man1/tvheadend.1%{?ext_man}
|
2015-12-07 07:40:04 +00:00
|
|
|
%{_unitdir}/%{name}.service
|
2017-11-23 15:02:16 +00:00
|
|
|
%{_fillupdir}/sysconfig.%{name}
|
2017-02-27 14:12:27 +00:00
|
|
|
%{_sbindir}/%{name}_super
|
2015-12-07 07:40:04 +00:00
|
|
|
%{_sbindir}/rc%{name}
|
|
|
|
|
|
|
|
%changelog
|