Skip to content

Commit

Permalink
Update to 0.10.4
Browse files Browse the repository at this point in the history
- Update to 0.10.4
- Use %%license tag
- Patch updated
  • Loading branch information
sagitter authored and sergiomb2 committed Feb 26, 2016
1 parent c7695fa commit b51e05c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1 +1 @@
mythtv-status-0.9.0.tar.gz
mythtv-status-0.10.4.tar.gz
18 changes: 7 additions & 11 deletions mythtv-status-fedora.patch
Expand Up @@ -35,7 +35,7 @@ diff -up mythtv-status-0.9.0/bin/mythtv_recording_soon.orig mythtv-status-0.9.0/
diff -up mythtv-status-0.9.0/bin/mythtv-update-motd.orig mythtv-status-0.9.0/bin/mythtv-update-motd
--- mythtv-status-0.9.0/bin/mythtv-update-motd.orig 2008-07-11 01:13:30.000000000 +0300
+++ mythtv-status-0.9.0/bin/mythtv-update-motd 2009-04-13 11:29:30.000000000 +0300
@@ -1,16 +1,33 @@
@@ -1,17 +1,29 @@
#!/bin/bash

-. /etc/default/mythtv-status
Expand Down Expand Up @@ -64,14 +64,10 @@ diff -up mythtv-status-0.9.0/bin/mythtv-update-motd.orig mythtv-status-0.9.0/bin
+fi

-cp /var/run/motd.orig /var/run/motd.new
-if mythtv-status $ARGS -h $HOST >> /var/run/motd.new
+# Add mythtv status to end of stub
+if mythtv-status $ARGS -h $HOST >> /tmp/motd.new
then
- mv /var/run/motd.new /var/run/motd
+ cp /tmp/motd.new /etc/motd # If succesful, replace motd
+fi
+
+if [ -f /tmp/motd.new ]; then
+ rm /tmp/motd.new
ret=0
-mythtv-status $ARGS -h $HOST >> /var/run/motd.new 2> /dev/null || ret=$?
+mythtv-status $ARGS -h $HOST >> /tmp/motd.new 2> /dev/null || ret=$?
if [ $ret -eq 0 -o $ret -eq 1 ]; then
- [ -f /var/run/motd.new ] && mv /var/run/motd.new /var/run/motd
+ [ -f /tmp/motd.new ] && mv /tmp/motd.new /etc/motd
fi
38 changes: 19 additions & 19 deletions mythtv-status.spec
@@ -1,16 +1,13 @@
Name: mythtv-status
Version: 0.9.0
Release: 8%{?dist}
Version: 0.10.4
Release: 1%{?dist}
Summary: Get the current status of your MythTV system at the command line
Group: Applications/Multimedia
# Scripts claim to be under GPLv2 but COPYING and ChangeLog state license
# is GPLv3. Contacted upstream, new release coming soon.
License: GPLv3
URL: http://www.etc.gen.nz/projects/mythtv/mythtv-status.html
Source0: http://www.etc.gen.nz/projects/mythtv/tarballs/mythtv-status-0.9.0.tar.gz
Source0: http://www.etc.gen.nz/projects/mythtv/tarballs/mythtv-status-%{version}.tar.gz
# Patch for Fedora specifics
Patch0: mythtv-status-fedora.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch

# Requires not detected automatically
Expand All @@ -31,41 +28,44 @@ is based on /etc/motd.stub, added with the output of mythtv-status.
%patch0 -p1

%build
# Nothing to do

%install
rm -rf %{buildroot}

# 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}
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
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}
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/usr/sbin/mythtv-update-motd" > %{buildroot}%{_sysconfdir}/cron.hourly/mythtv-update-motd.cron
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

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING FAQ README THANKS
%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
* 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

Expand Down
2 changes: 1 addition & 1 deletion sources
@@ -1 +1 @@
953828e140f166252c7ba65dce63f1d6 mythtv-status-0.9.0.tar.gz
e53666a10a050e47dd371d0083d81b99 mythtv-status-0.10.4.tar.gz

0 comments on commit b51e05c

Please sign in to comment.