/[gentoo-x86]/media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.07.06-r1.ebuild
Gentoo

Contents of /media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.07.06-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu May 1 12:45:50 2014 UTC (6 years, 2 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +4 -5 lines
Specify LICENSE more precisely, bug 445952.

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-tv/linuxtv-dvb-firmware/linuxtv-dvb-firmware-2009.07.06-r1.ebuild,v 1.3 2009/09/10 17:56:50 billie Exp $
4
5 DESCRIPTION="Firmware files needed for operation of some dvb-devices"
6 HOMEPAGE="http://www.linuxtv.org"
7
8 LICENSE="freedist ISC all-rights-reserved"
9 SLOT="0"
10 KEYWORDS="~amd64 ~x86"
11 IUSE=""
12 RESTRICT="mirror bindist"
13
14 DEPEND=""
15 RDEPEND=""
16
17 S="${WORKDIR}"
18
19 # Files which can be fetched from linuxtv.org
20 PACKET_NAME=dvb-firmwares-1.tar.bz2
21 PACKET_SRC_URI="http://www.linuxtv.org/downloads/firmware/${PACKET_NAME}"
22 get_dvb_firmware="${FILESDIR}/get_dvb_firmware-${PV}"
23 # from http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6-stable.git;a=history;f=Documentation/dvb/get_dvb_firmware
24
25 FW_USE_FLAGS=(
26 # packet
27 "usb-a800"
28 "dibusb-usb2"
29 "usb-dtt200u"
30 "usb-umt"
31 "usb-vp702x"
32 "usb-vp7045"
33 "usb-wt220u"
34 "dibusb-usb1"
35 "or51211"
36 "or51132"
37 "or51132"
38 # own URL
39 "ttpci"
40 "bcm3510"
41 "usb-wt220u"
42 "usb-wt220u"
43 "usb-dib0700"
44 "usb-af9015"
45 "sp887x"
46 "af9005"
47 "cx231xx"
48 "cx18"
49 "cx18"
50 "cx18"
51 "cx23885"
52 "cx23885"
53 "pvrusb2"
54 "usb-bluebird"
55 "tda10045"
56 # get_dvb_firmware
57 "sp8870"
58 "tda10046"
59 "tda10046lifeview"
60 "ttusb-dec"
61 "ttusb-dec"
62 "ttusb-dec"
63 "opera1"
64 "opera1"
65 "vp7041"
66 "nxt200x"
67 "mpc718"
68 )
69
70 FW_FILES=(
71 # packet
72 "dvb-usb-avertv-a800-02.fw"
73 "dvb-usb-dibusb-6.0.0.8.fw"
74 "dvb-usb-dtt200u-01.fw"
75 "dvb-usb-umt-010-02.fw"
76 "dvb-usb-vp702x-01.fw"
77 "dvb-usb-vp7045-01.fw"
78 "dvb-usb-wt220u-01.fw"
79 "dvb-usb-dibusb-5.0.0.11.fw"
80 "dvb-fe-or51211.fw"
81 "dvb-fe-or51132-qam.fw"
82 "dvb-fe-or51132-vsb.fw"
83 # own URL
84 "dvb-ttpci-01.fw"
85 "dvb-fe-bcm3510-01.fw"
86 "dvb-usb-wt220u-02.fw"
87 "dvb-usb-wt220u-fc03.fw"
88 "dvb-usb-dib0700-1.20.fw"
89 "dvb-usb-af9015.fw"
90 "dvb-fe-sp887x.fw"
91 "af9005.fw"
92 "v4l-cx231xx-avcore-01.fw"
93 "v4l-cx23418-apu.fw"
94 "v4l-cx23418-cpu.fw"
95 "v4l-cx23418-dig.fw"
96 "v4l-cx23885-avcore-01.fw"
97 "v4l-cx23885-enc.fw"
98 "v4l-cx25840.fw"
99 "dvb-usb-bluebird-01.fw"
100 "dvb-fe-tda10045.fw"
101 # get_dvb_firmware
102 "dvb-fe-sp8870.fw"
103 "dvb-fe-tda10046.fw"
104 "dvb-fe-tda10046.fw"
105 "dvb-ttusb-dec-2000t.fw"
106 "dvb-ttusb-dec-2540t.fw"
107 "dvb-ttusb-dec-3000s.fw"
108 "dvb-usb-opera1-fpga-01.fw"
109 "dvb-usb-opera-01.fw"
110 "dvb-vp7041-2.422.fw"
111 "dvb-fe-nxt2004.fw"
112 "dvb-cx18-mpc718-mt352.fw"
113 )
114
115 FW_GET_PARAMETER=(
116 # packet
117 "-"
118 "-"
119 "-"
120 "-"
121 "-"
122 "-"
123 "-"
124 "-"
125 "-"
126 "-"
127 "-"
128 # own URL
129 "-"
130 "-"
131 "-"
132 "-"
133 "-"
134 "-"
135 "-"
136 "-"
137 "-"
138 "-"
139 "-"
140 "-"
141 "-"
142 "-"
143 "-"
144 "-"
145 "-"
146 # get_dvb_firmware
147 "sp8870"
148 "tda10046"
149 "tda10046lifeview"
150 "dec2000t"
151 "dec2540t"
152 "dec3000s"
153 "opera1"
154 "-"
155 "vp7041"
156 "nxt2004"
157 "mpc718"
158 )
159
160 FW_URLS=(
161 # packet
162 "${PACKET_SRC_URI}"
163 "${PACKET_SRC_URI}"
164 "${PACKET_SRC_URI}"
165 "${PACKET_SRC_URI}"
166 "${PACKET_SRC_URI}"
167 "${PACKET_SRC_URI}"
168 "${PACKET_SRC_URI}"
169 "${PACKET_SRC_URI}"
170 "${PACKET_SRC_URI}"
171 "${PACKET_SRC_URI}"
172 "${PACKET_SRC_URI}"
173 # own URL
174 "http://www.escape-edv.de/endriss/firmware/dvb-ttpci-01.fw-fc2624"
175 "http://www.linuxtv.org/downloads/firmware/dvb-fe-bcm3510-01.fw"
176 "http://www.linuxtv.org/downloads/firmware/dvb-usb-wt220u-02.fw"
177 "http://home.arcor.de/efocht/dvb-usb-wt220u-fc03.fw"
178 "http://www.wi-bw.tfh-wildau.de/~pboettch/home/files/dvb-usb-dib0700-1.20.fw"
179 "http://www.otit.fi/~crope/v4l-dvb/af9015/af9015_firmware_cutter/firmware_files/4.95.0/dvb-usb-af9015.fw"
180 "http://peterdamen.com/dvb-fe-sp887x.fw"
181 "http://ventoso.org/luca/af9005/af9005.fw"
182 "http://linuxtv.org/downloads/firmware/v4l-cx231xx-avcore-01.fw"
183 "http://linuxtv.org/downloads/firmware/v4l-cx23418-apu.fw"
184 "http://linuxtv.org/downloads/firmware/v4l-cx23418-cpu.fw"
185 "http://linuxtv.org/downloads/firmware/v4l-cx23418-dig.fw"
186 "http://linuxtv.org/downloads/firmware/v4l-cx23885-avcore-01.fw"
187 "http://linuxtv.org/downloads/firmware/v4l-cx23885-enc.fw"
188 "http://linuxtv.org/downloads/firmware/v4l-cx25840.fw"
189 "http://linuxtv.org/downloads/firmware/dvb-usb-bluebird-01.fw"
190 "http://www.fireburn.co.uk/dvb-fe-tda10045.fw"
191 # get_dvb_firmware
192 "http://2.download.softwarepatch.pl/1619edb0dcb493dd5337b94a1f79c3f6/tt_Premium_217g.zip"
193 "http://www.tt-download.com/download/updates/219/TT_PCI_2.19h_28_11_2006.zip"
194 "http://www.lifeview.hk/dbimages/document/7%5Cdrv_2.11.02.zip"
195 "http://hauppauge.lightpath.net/de/dec217g.exe"
196 "http://hauppauge.lightpath.net/de/dec217g.exe"
197 "http://hauppauge.lightpath.net/de/dec217g.exe"
198 "http://www.informatik.uni-leipzig.de/~hlawit/dvb/2830SCap2.sys"
199 "http://www.informatik.uni-leipzig.de/~hlawit/dvb/2830SLoad2.sys"
200 "http://www.twinhan.com/files/AW/Software/TwinhanDTV2.608a.zip"
201 "http://www.avermedia-usa.com/support/Drivers/AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip"
202 "ftp://ftp.work.acer-euro.com/desktop/aspire_idea510/vista/Drivers/Yuan%20MPC718%20TV%20Tuner%20Card%202.13.10.1016.zip"
203 )
204
205 SRC_URI=""
206 NEGATIVE_USE_FLAGS=""
207 NEGATIVE_END_BRACKETS=""
208 ALL_URLS=""
209
210 for ((CARD=0; CARD < ${#FW_USE_FLAGS[*]}; CARD++)) do
211 URL="${FW_URLS[CARD]}"
212
213 if [[ -z ${URL} ]]; then
214 echo "missing url for ${FW_USE_FLAGS[CARD]}"
215 continue
216 fi
217 SRC_URI="${SRC_URI} dvb_cards_${FW_USE_FLAGS[CARD]}? ( ${URL} )"
218
219 IUSE="${IUSE} dvb_cards_${FW_USE_FLAGS[CARD]}"
220 NEGATIVE_USE_FLAGS="${NEGATIVE_USE_FLAGS} !dvb_cards_${FW_USE_FLAGS[CARD]}? ( "
221 NEGATIVE_END_BRACKETS="${NEGATIVE_END_BRACKETS} )"
222 ALL_URLS="${ALL_URLS} ${URL}"
223
224 GET_PARAM="${FW_GET_PARAMETER[CARD]}"
225 if [[ ${GET_PARAM} != "-" ]]; then
226 # all firmwares extracted by get_dvb_firmware need unzip
227 DEPEND="${DEPEND} dvb_cards_${FW_USE_FLAGS[CARD]}? ( app-arch/unzip )"
228 fi
229 done
230
231 SRC_URI="${SRC_URI} ${NEGATIVE_USE_FLAGS} ${ALL_URLS} ${NEGATIVE_END_BRACKETS}"
232
233 DEPEND="${DEPEND}
234 ${NEGATIVE_USE_FLAGS}
235 app-arch/unzip
236 ${NEGATIVE_END_BRACKETS}"
237
238 install_dvb_card() {
239 if [[ -z ${DVB_CARDS} ]]; then
240 # install (almost) all firmware files
241 # do not install this one due to conflicting filenames
242 [[ "${1}" != "tda10046lifeview" ]]
243 else
244 # Check if this flag is set
245 use dvb_cards_${1}
246 fi
247 }
248
249 pkg_setup() {
250 #echo SRC_URI=${SRC_URI}
251 #echo DEPEND=${DEPEND}
252 if has tda1004x ${DVB_CARDS}; then
253 eerror
254 eerror "DVB_CARDS flag tda1004x has been split into"
255 eerror "tda10045, tda10046 and tda10046lifeview".
256 eerror
257 eerror "But beware that you cannot enable tda10046 and"
258 eerror "tda10046lifeview at the same time."
259 fi
260
261 if [[ -z ${DVB_CARDS} ]]; then
262 elog
263 elog "DVB_CARDS is not set, installing all available firmware files."
264 elog "To save bandwidth please consider setting the DVB_CARDS variable"
265 elog "in ${ROOT%/}/etc/make.conf. This way only the firmwares you own"
266 elog "the hardware will be installed."
267 fi
268 # according to http://devmanual.gentoo.org/general-concepts/use-flags/index.html
269 # we should not die here. However, there is no sensible fallback choice to make
270 # because the user may have either the one or the other. WYGIWYG
271 if use dvb_cards_tda10046 && use dvb_cards_tda10046lifeview; then
272 eerror
273 eerror "You cannot have both tda10046 and tda10046lifeview in DVB_CARDS"
274 eerror "because of colliding firmware filenames (dvb-fe-tda10046.fw)."
275 eerror "Sorry."
276 die "Conflicting values for DVB_CARDS set."
277 fi
278 elog
279 elog "List of possible card-names to use for DVB_CARDS:"
280 echo ${FW_USE_FLAGS[*]}| tr ' ' '\n' | sort | uniq | fmt \
281 | while read line; do
282 elog " ${line}"
283 done
284 elog
285 elog "If you need another firmware file and want it included create a bug"
286 elog "at bugs.gentoo.org."
287 elog "In case some firmware sources are not fetchable please try again at"
288 elog "a later time and if it still does not fetch report a bug. If there"
289 elog "is no alternative source or an update to the firmware available we"
290 elog "have to remove it from the ebuild and you are on your own."
291 }
292
293 src_unpack() {
294 local distfile
295
296 # link all downloaded files to ${S}
297 for distfile in ${A}; do
298 [[ -L ${distfile} ]] || ln -s ${DISTDIR}/${distfile} ${distfile}
299 done
300
301 # unpack firmware-packet
302 if has ${PACKET_NAME} ${A}; then
303 unpack ${PACKET_NAME}
304 fi
305
306 if [[ -z ${DVB_CARDS} ]] || use dvb_cards_mpc718 ; then
307 mv Yuan%20MPC718%20TV%20Tuner%20Card%202.13.10.1016.zip "Yuan MPC718 TV Tuner Card 2.13.10.1016.zip"
308 fi
309 if [[ -z ${DVB_CARDS} ]] || use dvb_cards_ttpci ; then
310 mv dvb-ttpci-01.fw-fc2624 dvb-ttpci-01.fw
311 fi
312
313 local script_v=${PV}
314
315 # Adjust temp-dir of get_dvb_firmware
316 sed "${FILESDIR}"/get_dvb_firmware-${script_v} \
317 -e "s#/tmp#${T}#g" > get_dvb_firmware
318 chmod a+x get_dvb_firmware
319
320 # extract the firmware-files
321 for ((CARD=0; CARD < ${#FW_USE_FLAGS[*]}; CARD++)) do
322 install_dvb_card ${FW_USE_FLAGS[CARD]} || continue
323
324 GET_PARAM=${FW_GET_PARAMETER[CARD]}
325 if [[ ${GET_PARAM} != "-" ]]; then
326 [[ -f ${FW_FILES[CARD]} ]] && ewarn "Already existing: ${FW_FILES[CARD]}"
327 elog "Extracting ${FW_FILES[CARD]}"
328 ./get_dvb_firmware ${GET_PARAM}
329 fi
330 done
331 }
332
333 src_install() {
334 insinto /lib/firmware
335
336 for ((CARD=0; CARD < ${#FW_USE_FLAGS[*]}; CARD++)) do
337 if install_dvb_card ${FW_USE_FLAGS[CARD]}; then
338 local file=${FW_FILES[CARD]}
339 [[ -f ${file} ]] || die "File ${file} does not exist!"
340 doins ${file}
341 fi
342 done
343 }

  ViewVC Help
Powered by ViewVC 1.1.20