forked from pool/tvheadend
Accepting request 460709 from home:sleep_walker:branches:multimedia:apps
- replace original (but long-time broken) package with the working one living in PackMan build service (and adopt their changelog) - keep tvheadend-fix-daemon-user-group.patch - remove pre-systemd stuff and init scripts - move "homedir" of the user to /var/lib/tvheadend process spec file with spec-cleaner OBS-URL: https://build.opensuse.org/request/show/460709 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/tvheadend?expand=0&rev=5
This commit is contained in:
committed by
Git OBS Bridge
parent
55fd2777bc
commit
e81d11a8c1
@@ -1,7 +1,8 @@
|
||||
#
|
||||
# spec file for package tvheadend
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 Packman Team <packman@links2linux.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,30 +19,35 @@
|
||||
|
||||
%define htsgroup video
|
||||
%define htsuser hts
|
||||
%define homedir %{_localstatedir}/lib/tvheadend
|
||||
Name: tvheadend
|
||||
Version: 4.0.8
|
||||
Version: 4.0.9
|
||||
Release: 0
|
||||
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: ccache
|
||||
Source2: %{name}.rpmlintrc
|
||||
Source3: %{name}_super
|
||||
# PATCH-FIX-OPENSUSE tvheadend-4.0_no-werror.patch -- Do not treat warnings as errors.
|
||||
Patch0: %{name}-4.0_no-werror.patch
|
||||
# PATCH-FIX-OPENSUSE tvheadend-fix-misleading-indent.patch malcolmlewis@opensuse.org -- Fix warning/error produced with gcc-6.
|
||||
Patch1: %{name}-fix-misleading-indent.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libhdhomerun-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: pkgconfig(avahi-client)
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
BuildRequires: pkgconfig(libavcodec)
|
||||
BuildRequires: pkgconfig(libavformat)
|
||||
BuildRequires: pkgconfig(libavresample)
|
||||
BuildRequires: pkgconfig(libavutil)
|
||||
BuildRequires: pkgconfig(libavcodec) = 56.60.100
|
||||
BuildRequires: pkgconfig(libavformat) = 56.40.101
|
||||
BuildRequires: pkgconfig(libavresample) = 2.1.0
|
||||
BuildRequires: pkgconfig(libavutil) = 54.31.100
|
||||
BuildRequires: pkgconfig(libssl)
|
||||
BuildRequires: pkgconfig(libswscale)
|
||||
BuildRequires: pkgconfig(libswscale) = 3.1.101
|
||||
BuildRequires: pkgconfig(liburiparser)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: python-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
@@ -54,12 +60,20 @@ scheduling recordings.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -p1
|
||||
%patch0
|
||||
%if 0%{?suse_version} >= 1320
|
||||
%patch1 -p1
|
||||
%endif
|
||||
|
||||
sed -e "s/-u \([^ ]*\) -g \([^ ]*\)/-u %{htsuser} -g %{htsgroup}/" -i rpm/%{name}.sysconfig
|
||||
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
|
||||
%configure --disable-dvbscan \
|
||||
--disable-libffmpeg_static \
|
||||
--disable-libffmpeg_static_x264 \
|
||||
--disable-hdhomerun_static
|
||||
make V=1 %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
@@ -67,8 +81,12 @@ make V=1 %{?_smp_mflags}
|
||||
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates/
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
install -D -m 644 rpm/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service
|
||||
sed -i 's@/home/tvheadend@%{homedir}@' rpm/%{name}.sysconfig
|
||||
install -m 644 rpm/%{name}.sysconfig %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
# Install superuser helper script
|
||||
sed -i 's@/home/tvheadend@%{homedir}@' %{SOURCE3}
|
||||
install -Dm0755 %{SOURCE3} %{buildroot}%{_sbindir}/%{name}_super
|
||||
%fdupes -s %{buildroot}%{_datadir}
|
||||
chmod -x %{buildroot}%{_mandir}/man1/tvheadend.1
|
||||
|
||||
@@ -76,16 +94,21 @@ chmod -x %{buildroot}%{_mandir}/man1/tvheadend.1
|
||||
%fillup_only %{name}
|
||||
%service_add_post %{name}.service
|
||||
cat << 'EOM'
|
||||
==> All configuration is maintained through the web interface:
|
||||
==> 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:
|
||||
==>
|
||||
==> 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}/useradd -u 1337 -g %{htsgroup} -m -d %{homedir} -r -s /bin/false %{htsuser} -c "Tvheadend TV server" &> /dev/null || :
|
||||
%{_sbindir}/passwd -l %{htsuser} &> /dev/null || :
|
||||
|
||||
%preun
|
||||
@@ -96,12 +119,13 @@ EOM
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc CONTRIBUTING.md LICENSE.md
|
||||
%{_bindir}/tvheadend
|
||||
%{_datadir}/tvheadend
|
||||
%{_mandir}/man1/tvheadend.1.gz
|
||||
%{_mandir}/man1/tvheadend.1%{?ext_man}
|
||||
%{_unitdir}/%{name}.service
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
||||
%{_sbindir}/%{name}_super
|
||||
%{_sbindir}/rc%{name}
|
||||
|
||||
%changelog
|
||||
|
||||
|
Reference in New Issue
Block a user