]> git.pld-linux.org Git - packages/tvheadend.git/blobdiff - tvheadend.spec
- add supplementary usb group
[packages/tvheadend.git] / tvheadend.spec
index 72069096ebbd0110d22e98228774c8a0d7b1a096..a6d9c4ad41a8e67bf949b8bc78c292c68644a08c 100644 (file)
@@ -1,20 +1,29 @@
 Summary:       TV streaming server
 Name:          tvheadend
-Version:       3.9
+# keep stable version announced on web page
+Version:       3.4.27
 Release:       0.1
 License:       GPL v3
-Group:         Video/Television
+Group:         Applications/Multimedia
 URL:           https://tvheadend.org/projects/tvheadend
-Source0:       https://github.com/tvheadend/tvheadend/archive/v3.9.tar.gz
-# Source0-md5: 177f5ecf771a1877d38a00bf18806f15
+%define vername 3.4patch1
+Source0:       https://github.com/tvheadend/tvheadend/archive/%{vername}.tar.gz
+# Source0-md5: 86d1be0ad6e02bd2aecd3d529a026797
 Source1:       %{name}.conf
 Source2:       %{name}.service
 Source3:       %{name}.sysconfig
+Source4:       %{name}.init
+BuildRequires: avahi-devel
+BuildRequires: curl-devel
+BuildRequires: python-modules
 BuildRequires: rpmbuild(macros) >= 1.647
+BuildRequires: zlib-devel
 Requires(post,preun,postun):   systemd-units >= 38
 Requires:      systemd-units >= 0.38
 Requires(post):        pwgen
 Requires(post):        sed >= 4.0
+Requires(post):        /sbin/chkconfig
+Requires(post,preun):  /sbin/chkconfig
 Requires:      group(video)
 Provides:      user(%{name})
 
@@ -23,19 +32,19 @@ Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2,
 DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources.
 
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q -n %{name}-%{vername}
 
 %build
 export CFLAGS="%{rpmcflags}"
 export CC="%{__cc}"
-#tvheadend uses a custom configure script, so %%configure cannot be used
+
+# tvheadend uses a custom script, so %%configure cannot be used
 # as not all options are supported
 ./configure \
        --prefix=%{_prefix} \
        --release \
        --libdir=%{_libdir} \
-       --mandir=%{_mandir}/man1 \
-       --disable-dvbscan
+       --mandir=%{_mandir}/man1
 
 %{__make} V=1
 
@@ -44,7 +53,7 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/.hts/%{name}/accesscontrol \
        $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/Videos \
        $RPM_BUILD_ROOT%{systemdunitdir} \
-       $RPM_BUILD_ROOT/etc/sysconfig
+       $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -52,13 +61,16 @@ install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/.hts/%{name}/accesscontr
 cp %{SOURCE1} $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/.hts/%{name}/accesscontrol/1
 cp %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
 cp %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+cp %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
 chmod +x $RPM_BUILD_ROOT%{_bindir}/%{name}
 
 %pre
-%useradd -u 20 -d %{_localstatedir}/lib/%{name} -g video -c "tvheadend User" %{name}
+%useradd -u 20 -d %{_localstatedir}/lib/%{name} -g video -G usb -c "tvheadend User" %{name}
 
 %post
+/sbin/chkconfig --add tvheadend
+%service tvheadend reload "tvheadend"
 %systemd_post %{name}.service
 
 # check if the access control file still has the initial dummy password, and
@@ -68,6 +80,10 @@ if  grep -q '"password": "dummypassword"' %{_localstatedir}/lib/%{name}/.hts/%{n
 fi
 
 %preun
+if [ "$1" = "0" ]; then
+       %service tvheadend stop
+       /sbin/chkconfig --del tvheadend
+fi
 %systemd_preun %{name}.service
 
 %postun
@@ -83,6 +99,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc docs
 %attr(755,root,root) %{_bindir}/%{name}
+%attr(754,root,root) /etc/rc.d/init.d/tvheadend
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
 %{_mandir}/man1/%{name}.1*
 %{_datadir}/%{name}
This page took 0.12294 seconds and 4 git commands to generate.