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