]>
Commit | Line | Data |
---|---|---|
3197483f ER |
1 | # TODO |
2 | # - fix icons | |
3 | %define releasedate 20140604 | |
4 | %define rel 0.1 | |
5 | Summary: Silicon Dust HDHomeRun configuration utility | |
6 | Name: hdhomerun | |
7 | Version: 0.0 | |
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 | |
20 | Requires: gtk+2 | |
21 | Requires: gtk-update-icon-cache | |
22 | Requires: hicolor-icon-theme | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | The configuration and firmware upgrade utility for Silicon Dust's | |
27 | networked HDTV dual-tuner HDHomeRun device. | |
28 | ||
29 | %description | |
30 | The configuration and firmware upgrade utility for Silicon Dust's | |
31 | networked HDTV dual-tuner HDHomeRun device. | |
32 | ||
33 | %package devel | |
34 | Summary: Developer tools for the hdhomerun library | |
35 | Group: Development | |
36 | Requires: %{name} = %{version}-%{release} | |
37 | ||
38 | %description devel | |
39 | The hdhumerun-devel package provides developer tools for the hdhomerun | |
40 | library. | |
41 | ||
42 | %prep | |
43 | %setup -qc -a 1 | |
44 | ||
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 | |
49 | ||
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 | |
53 | done | |
54 | ||
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: | |
59 | ||
60 | http://www.silicondust.com/downloads/linux | |
61 | ||
62 | __EOF__ | |
63 | ||
64 | %build | |
65 | cd hdhomerun_config_gui | |
66 | %configure | |
67 | %{__make} | |
68 | cd .. | |
69 | ||
70 | %if 0 | |
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 | |
75 | icns2png -x hdhr.icns | |
76 | cd - | |
77 | %endif | |
78 | ||
79 | %install | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | %{__make} -C hdhomerun_config_gui install \ | |
82 | DESTDIR=$RPM_BUILD_ROOT | |
83 | ||
84 | install -p libhdhomerun/hdhomerun_config $RPM_BUILD_ROOT%{_bindir} | |
85 | rm -rf include | |
86 | install -d include | |
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} | |
93 | ||
94 | %if 0 | |
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 | |
98 | done | |
99 | %endif | |
100 | ||
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %if 0 | |
105 | %post | |
106 | %update_icon_cache hicolor | |
107 | ||
108 | %postun | |
109 | %update_icon_cache hicolor | |
110 | %endif | |
111 | ||
112 | %files | |
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 | |
118 | # gui is GPLv3 | |
119 | %attr(755,root,root) %{_bindir}/hdhomerun_config_gui | |
120 | %{_desktopdir}/hdhomerun_config_gui.desktop | |
121 | #%{_iconsdir}/hicolor/*/hdhr.png | |
122 | ||
123 | %files devel | |
124 | %defattr(644,root,root,755) | |
125 | %dir %{_includedir}/hdhomerun | |
126 | %{_includedir}/hdhomerun/*.h |