forked from rpmfusion/mythtv-status
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mythtv-status.spec
110 lines (88 loc) · 3.94 KB
/
mythtv-status.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Name: mythtv-status
Version: 0.10.4
Release: 2%{?dist}
Summary: Get the current status of your MythTV system at the command line
Summary(sv): Hämta ett MythTV-systems status på kommandoraden
License: GPLv3
URL: http://www.etc.gen.nz/projects/mythtv/mythtv-status.html
Source0: http://www.etc.gen.nz/projects/mythtv/tarballs/mythtv-status-%{version}.tar.gz
# Patch for Fedora specifics
Patch0: mythtv-status-fedora.patch
Patch1: mythtv-status-update-motd.patch
BuildArch: noarch
# For pod2man
BuildRequires: perl-podlators
# Requires not detected automatically
Requires: mythtv-backend
Requires: perl(MythTV)
%description
This Perl script will display the current status of your MythTV system at the
command line. It can optionally append it to the system message of the day
(MOTD) on a regular basis.
If you want to enable motd update, edit /etc/sysconfig/mythtv-status and change
UPDATEMOTD=no to UPDATEMOTD=yes. The update is run hourly. The resulting motd
is based on /etc/motd.stub, added with the output of mythtv-status.
%description -l sv
Detta Perl-skript kommer visa den aktuella statusen för ett MythTV-system på
kommandoraden. Möjligheten finns även att lägga till statusen till dagens
systemmeddelande (MOTD) med regelbundna intervaller.
För att aktivera motd-uppdateringar redigerar man
/etc/sysconfig/mythtv-status och ändrar UPDATEMOTD=no till UPDATEMOTD=yes.
Uppdateringen körs en gång i timmen. Den resulterande motd:n baseras på
/etc/motd.stub med utskriften från mythtv-status tillagd.
%prep
%setup -q
%patch0 -p1 -b .orig
%patch1 -p1 -b .fedora
%build
pod2man bin/mythtv-status man/mythtv-status.1
%install
# Install scripts
mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_sbindir}
install -p -m 755 bin/mythtv-status bin/mythtv_recording_{now,soon} %{buildroot}%{_bindir}
install -p -m 755 bin/mythtv-update-motd %{buildroot}%{_sbindir}
# Man files
mkdir -p %{buildroot}%{_mandir}/man1
install -p -m 644 man/* %{buildroot}%{_mandir}/man1
# Sysconfig file
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
echo -e "HOST=127.0.0.1\nUPDATEMOTD=no" > %{buildroot}%{_sysconfdir}/sysconfig/%{name}
# Cron file to update motd, doesn't do anything if not enabled in sysconfig
mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly
echo -e "#!/bin/sh\n%{_sbindir}/mythtv-update-motd" > %{buildroot}%{_sysconfdir}/cron.hourly/mythtv-update-motd.cron
chmod 755 %{buildroot}%{_sysconfdir}/cron.hourly/mythtv-update-motd.cron
%files
%doc ChangeLog FAQ README THANKS
%license COPYING
%{_bindir}/mythtv*
%{_sbindir}/mythtv*
%{_mandir}/man1/mythtv*.1.gz
%{_sysconfdir}/cron.hourly/mythtv-update-motd.cron
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%changelog
* Tue Mar 8 2016 Göran Uddeborg <goeran@Uddeborg.se> - 0.10.4-2
- Tweak the update-motd script adaption slightly
- Generate a manual page for mythtv-status itself
- Add Swedish description
- Remove some specs no longer needed with current build systems.
* Thu Feb 25 2016 Antonio Trande <sagitter@fedoraproject.org> - 0.10.4-1
- Update to 0.10.4
- Use %%license tag
- Patch updated
* Sun Aug 31 2014 Sérgio Basto <sergio@serjux.com> - 0.9.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Mar 03 2013 Nicolas Chauvet <kwizart@gmail.com> - 0.9.0-7
- Mass rebuilt for Fedora 19 Features
* Wed Feb 08 2012 Nicolas Chauvet <kwizart@gmail.com> - 0.9.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Dec 16 2010 Jussi Lehtola <jussi.lehtola@iki.fi> - 0.9.0-5
- Changed R: perl-net-UPnP to R: perl(MythTV).
* Mon Apr 13 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 0.9.0-4
- Copy motd instead of move to avoid SELinux errors.
- Fix motd update to use stub instead of motd.
* Sun Apr 12 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 0.9.0-3
- Modify motd update method and update script location.
* Sat Apr 11 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 0.9.0-2
- Fix sysconfig file location.
* Sat Apr 11 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 0.9.0-1
- First release.