]>
Commit | Line | Data |
---|---|---|
3197483f ER |
1 | # TODO |
2 | # - fix icons | |
3197483f ER |
3 | Summary: Silicon Dust HDHomeRun configuration utility |
4 | Name: hdhomerun | |
a28aa669 ER |
5 | Version: 20141210 |
6 | Release: 1 | |
3197483f ER |
7 | License: LGPL v3 and GPL v3 |
8 | Group: Applications/System | |
a28aa669 ER |
9 | Source0: http://download.silicondust.com/hdhomerun/lib%{name}_%{version}.tgz |
10 | # Source0-md5: c3bf11ecfa3b1ceeedc54ec67e7f25b4 | |
11 | Source1: http://download.silicondust.com/hdhomerun/%{name}_config_gui_%{version}.tgz | |
12 | # Source1-md5: b4bf62b088fb58c5b0e85ed7e30294a2 | |
3197483f ER |
13 | Source2: %{name}_config_gui.desktop |
14 | URL: http://www.silicondust.com/ | |
15 | BuildRequires: desktop-file-utils | |
16 | BuildRequires: gtk+2-devel | |
17 | BuildRequires: libicns | |
3197483f ER |
18 | Requires: gtk-update-icon-cache |
19 | Requires: hicolor-icon-theme | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
23 | The configuration and firmware upgrade utility for Silicon Dust's | |
24 | networked HDTV dual-tuner HDHomeRun device. | |
25 | ||
26 | %description | |
27 | The configuration and firmware upgrade utility for Silicon Dust's | |
28 | networked HDTV dual-tuner HDHomeRun device. | |
29 | ||
30 | %package devel | |
31 | Summary: Developer tools for the hdhomerun library | |
32 | Group: Development | |
33 | Requires: %{name} = %{version}-%{release} | |
34 | ||
35 | %description devel | |
36 | The hdhumerun-devel package provides developer tools for the hdhomerun | |
37 | library. | |
38 | ||
39 | %prep | |
40 | %setup -qc -a 1 | |
41 | ||
42 | # Fix up linefeeds, drop execute bit and don't strip binaries | |
43 | %{__sed} -i 's/\r//' libhdhomerun/* | |
44 | %{__chmod} -x libhdhomerun/* | |
45 | %{__sed} -i -e '/$(STRIP).*/d' -e 's/C\(PP\)\?FLAGS .=/C\1FLAGS ?=/' libhdhomerun/Makefile | |
46 | ||
47 | # Convert files to utf8 | |
48 | for f in libhdhomerun/*; do | |
49 | iconv -f iso-8859-1 -t utf-8 --output $f.new $f && mv $f.new $f | |
50 | done | |
51 | ||
52 | cat << __EOF__ > README.firmware | |
53 | The HDHomeRun Firmwares are not redistributable, but the latest versions of | |
54 | both the US ATSC and European DVB-T firmwares can always be obtained from | |
55 | the Silicon Dust web site: | |
56 | ||
57 | http://www.silicondust.com/downloads/linux | |
58 | ||
59 | __EOF__ | |
60 | ||
61 | %build | |
62 | cd hdhomerun_config_gui | |
63 | %configure | |
64 | %{__make} | |
65 | cd .. | |
66 | ||
67 | %if 0 | |
68 | # fails with assertion: | |
69 | #+ icns2png -x hdhr.icns | |
70 | #icns2png: jpc_dec.c:1072: jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed. | |
71 | cd hdhomerun_config_gui/OSX | |
72 | icns2png -x hdhr.icns | |
73 | cd - | |
74 | %endif | |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | %{__make} -C hdhomerun_config_gui install \ | |
79 | DESTDIR=$RPM_BUILD_ROOT | |
80 | ||
81 | install -p libhdhomerun/hdhomerun_config $RPM_BUILD_ROOT%{_bindir} | |
82 | rm -rf include | |
83 | install -d include | |
84 | cp -a libhdhomerun/*.h include | |
85 | sed -r 's|(^#include +["])(.*)(["] *$)|#include <hdhomerun/\2>|' \ | |
86 | libhdhomerun/hdhomerun.h > include/hdhomerun.h | |
87 | install -d $RPM_BUILD_ROOT%{_includedir}/hdhomerun | |
88 | cp -p include/*.h $RPM_BUILD_ROOT%{_includedir}/hdhomerun | |
89 | desktop-file-install --dir=${RPM_BUILD_ROOT}%{_desktopdir} %{SOURCE2} | |
90 | ||
91 | %if 0 | |
92 | for size in 16x16 32x32 128x128 256x256 512x512; do | |
93 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size} | |
94 | cp -p hdhomerun_config_gui/OSX/hdhr_${size}x32.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}/hdhr.png | |
95 | done | |
96 | %endif | |
97 | ||
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %if 0 | |
102 | %post | |
103 | %update_icon_cache hicolor | |
104 | ||
105 | %postun | |
106 | %update_icon_cache hicolor | |
107 | %endif | |
108 | ||
109 | %files | |
110 | %defattr(644,root,root,755) | |
111 | %doc libhdhomerun/lgpl.txt libhdhomerun/README hdhomerun_config_gui/COPYING README.firmware | |
112 | # lib and cli are LGPLv3 | |
113 | %{_libdir}/libhdhomerun.so | |
114 | %attr(755,root,root) %{_bindir}/hdhomerun_config | |
115 | # gui is GPLv3 | |
116 | %attr(755,root,root) %{_bindir}/hdhomerun_config_gui | |
117 | %{_desktopdir}/hdhomerun_config_gui.desktop | |
118 | #%{_iconsdir}/hicolor/*/hdhr.png | |
119 | ||
120 | %files devel | |
121 | %defattr(644,root,root,755) | |
122 | %dir %{_includedir}/hdhomerun | |
123 | %{_includedir}/hdhomerun/*.h |