3 %define releasedate 20140604
5 Summary: Silicon Dust HDHomeRun configuration utility
8 Release: 0.%{releasedate}.%{rel}
9 License: LGPL v3 and GPL v3
10 Group: Applications/System
11 Source0: http://download.silicondust.com/hdhomerun/lib%{name}_%{releasedate}.tgz
12 # Source0-md5: 13d4b0f5f20448179a5c05ee85b83786
13 Source1: http://download.silicondust.com/hdhomerun/%{name}_config_gui_%{releasedate}.tgz
14 # Source1-md5: 317c833cab1a2c50bdb651ed3149ee2d
15 Source2: %{name}_config_gui.desktop
16 URL: http://www.silicondust.com/
17 BuildRequires: desktop-file-utils
18 BuildRequires: gtk+2-devel
19 BuildRequires: libicns
21 Requires: gtk-update-icon-cache
22 Requires: hicolor-icon-theme
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 The configuration and firmware upgrade utility for Silicon Dust's
27 networked HDTV dual-tuner HDHomeRun device.
30 The configuration and firmware upgrade utility for Silicon Dust's
31 networked HDTV dual-tuner HDHomeRun device.
34 Summary: Developer tools for the hdhomerun library
36 Requires: %{name} = %{version}-%{release}
39 The hdhumerun-devel package provides developer tools for the hdhomerun
45 # Fix up linefeeds, drop execute bit and don't strip binaries
46 %{__sed} -i 's/\r//' libhdhomerun/*
47 %{__chmod} -x libhdhomerun/*
48 %{__sed} -i -e '/$(STRIP).*/d' -e 's/C\(PP\)\?FLAGS .=/C\1FLAGS ?=/' libhdhomerun/Makefile
50 # Convert files to utf8
51 for f in libhdhomerun/*; do
52 iconv -f iso-8859-1 -t utf-8 --output $f.new $f && mv $f.new $f
55 cat << __EOF__ > README.firmware
56 The HDHomeRun Firmwares are not redistributable, but the latest versions of
57 both the US ATSC and European DVB-T firmwares can always be obtained from
58 the Silicon Dust web site:
60 http://www.silicondust.com/downloads/linux
65 cd hdhomerun_config_gui
71 # fails with assertion:
72 #+ icns2png -x hdhr.icns
73 #icns2png: jpc_dec.c:1072: jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed.
74 cd hdhomerun_config_gui/OSX
80 rm -rf $RPM_BUILD_ROOT
81 %{__make} -C hdhomerun_config_gui install \
82 DESTDIR=$RPM_BUILD_ROOT
84 install -p libhdhomerun/hdhomerun_config $RPM_BUILD_ROOT%{_bindir}
87 cp -a libhdhomerun/*.h include
88 sed -r 's|(^#include +["])(.*)(["] *$)|#include <hdhomerun/\2>|' \
89 libhdhomerun/hdhomerun.h > include/hdhomerun.h
90 install -d $RPM_BUILD_ROOT%{_includedir}/hdhomerun
91 cp -p include/*.h $RPM_BUILD_ROOT%{_includedir}/hdhomerun
92 desktop-file-install --dir=${RPM_BUILD_ROOT}%{_desktopdir} %{SOURCE2}
95 for size in 16x16 32x32 128x128 256x256 512x512; do
96 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}
97 cp -p hdhomerun_config_gui/OSX/hdhr_${size}x32.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}/hdhr.png
102 rm -rf $RPM_BUILD_ROOT
106 %update_icon_cache hicolor
109 %update_icon_cache hicolor
113 %defattr(644,root,root,755)
114 %doc libhdhomerun/lgpl.txt libhdhomerun/README hdhomerun_config_gui/COPYING README.firmware
115 # lib and cli are LGPLv3
116 %{_libdir}/libhdhomerun.so
117 %attr(755,root,root) %{_bindir}/hdhomerun_config
119 %attr(755,root,root) %{_bindir}/hdhomerun_config_gui
120 %{_desktopdir}/hdhomerun_config_gui.desktop
121 #%{_iconsdir}/hicolor/*/hdhr.png
124 %defattr(644,root,root,755)
125 %dir %{_includedir}/hdhomerun
126 %{_includedir}/hdhomerun/*.h