1 |
Walter Dnes wrote: |
2 |
> I intend to get the Silicon Dust HDHomerun dual tuner box. It has a |
3 |
> linux library and CLI plus a separate gtk+ GUI. The linux source comes |
4 |
> with a makefile that puts stuff in /usr/local. But I want at least a |
5 |
> "wrapper" ebuild so that Portage knows about the files, and can manage |
6 |
> them. I'd prefer to write my own ebuild rather than depend on somebody |
7 |
> else to always have the most recent version supported somwehere in |
8 |
> layman. I've RTFM'd a lot, including |
9 |
> http://devmanual.gentoo.org/ebuild-writing/index.html but am still |
10 |
> unsure about a few things. Here's my setup so far... |
11 |
> |
12 |
> * The latest file is |
13 |
> http://download.silicondust.com/hdhomerun/libhdhomerun_20100213.tgz |
14 |
> (underscore instead of hyphen, bleagh). |
15 |
> * I've set PORTDIR_OVERLAY="/usr/local/portage" in /etc/make.conf |
16 |
> * I've actually created /usr/local/portage/media-tv |
17 |
> * my ebuild file in media-tv is named libhdhomerun-20100213.ebuild |
18 |
> * here it is so far... |
19 |
> |
20 |
> # Copyright 1999-2006 Gentoo Foundation |
21 |
> # Distributed under the terms of the GNU General Public License v2 |
22 |
> # $Header: $ |
23 |
> |
24 |
> DESCRIPTION="HD Homerun networked TV tuner base library and API" |
25 |
> ACTUAL_P="${PN}_${PV}" |
26 |
> SRC_URI="http://download.silicondust.com/hdhomerun/${ACTUAL_P}.tgz" |
27 |
> HOMEPAGE="http://www.silicondust.com/downloads/linux" |
28 |
> KEYWORDS="x86" |
29 |
> SLOT="0" |
30 |
> LICENSE="LGPL-3" |
31 |
> IUSE="" |
32 |
> RESTRICT="test" |
33 |
> |
34 |
> src_install () { |
35 |
> emake -j1 DESTDIR="${D}" install || die "make failed" |
36 |
> dobin hdhomerun_config |
37 |
> dolib libhdhomerun.so |
38 |
> dodoc README |
39 |
> insinto /usr/include/local/libhdhomerun |
40 |
> doins *.h |
41 |
> } |
42 |
> |
43 |
> Now for the questions... |
44 |
> 1) do I need to create /usr/local/portage/distfiles? |
45 |
> |
46 |
Nope. DISTDIR is /usr/portage/distfiles, even for overlay ebuilds. |
47 |
> 2) the provided Makefile is supposed to put everything into the |
48 |
> /usr/local hierarchy. Does portage/emerge over-ride that, and if so, |
49 |
> what do I have to do to get send all files to the /usr/local hierarchy? |
50 |
> |
51 |
Don't know. |
52 |
But... AFAIK, '/usr/local' is not a location favored by ebuilds. On my |
53 |
server it's virtually empty: |
54 |
~ # find /usr/local/ -type f -exec qfile '{}' \; |
55 |
app-portage/layman (/usr/local/portage/layman/.keep_app-portage_layman-0) |
56 |
|
57 |
I'd attempt to have my ebuild install to /usr. Most probably that's a |
58 |
very common procedure when moving from barebones makefile to portage. If |
59 |
make can't help you w/that (e.g. --prefix /usr or something like that), |
60 |
try browsing other ebuilds. qgrep is a handy tool for that. |
61 |
> 3) any glaring errors ? |
62 |
> |
63 |
> I intend to pick it up next week, so I won't be able to test it |
64 |
> immediately. I do want my laptop to be ready to go when I bring the |
65 |
> tuner box home. |
66 |
> |
67 |
> |