# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-video/em8300-modules-cvs/em8300-modules-cvs-20031209-r2.ebuild,v 1.1 2006/01/11 06:32:15 zzam Exp $ test -z "$ECVS_SERVER" && ECVS_SERVER="cvs.sourceforge.net:/cvsroot/dxr3" ECVS_MODULE="em8300" ECVS_TOP_DIR="${DISTDIR}/cvs-src/${PN}" inherit cvs debug flag-o-matic linux-mod strip-flags S=${WORKDIR}/${ECVS_MODULE}/modules DESCRIPTION="em8300 (RealMagic Hollywood+/Creative DXR3) video decoder card cvs kernel modules" HOMEPAGE="http://dxr3.sourceforge.net/" SRC_URI= LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="" DEPEND="virtual/linux-sources !media-video/em8300-modules" RDEPEND="${DEPEND} >=sys-apps/portage-1.9.10" PROVIDES="media-video/em8300-modules" src_unpack() { cvs_src_unpack convert_to_m ${S}/Makefile # NTSC default... #sed -e 's/PAL/NTSC/g' \ # Makefile > Makefile.hacked #mv Makefile.hacked Makefile } src_compile() { cd ${S} if grep -q ^all: Makefile; then DEST=all else DEST=build fi env -u ARCH emake clean ${DEST} || die "problem compiling modules" } src_install() { # Install header files # What is this for? # is there any application that relies on # patched kernel-sources? # insinto "/usr/src/linux/include/linux" # doins ../include/linux/em8300.h insinto "/usr/include/linux/" doins ../include/linux/em8300.h insinto "/lib/modules/${KV_FULL}/em8300" for mod in em8300 bt865 adv717x; do doins ${mod}.${KV_OBJ} done # Docs dodoc README-modoptions \ README-modules.conf \ devfs_symlinks \ ldm \ rmm insinto /etc/modules.d newins ${FILESDIR}/modules.em8300 em8300 insinto /etc/udev/rules.d newins em8300-udev.rules 15-em8300.rules } pkg_postinst() { linux-mod_pkg_postinst einfo einfo "The em8300 kernel modules have been installed into the modules" einfo "directory of your currently running kernel. They haven't been" einfo "loaded. Please read the documentation, and if you would like" einfo "to have the modules load at startup, add em8300, bt865, adv717x" einfo "to your /etc/modules.autoload they may need module options to " einfo "work correctly on your system. You will also need to add" einfo "the contents of /usr/share/doc/${P}/devfs_symlinks.gz" einfo "to your devfsd.conf so that the em8300 devices will be linked" einfo "correctly." einfo einfo "You will also need to have the i2c kernel modules compiled for" einfo "this to be happy, no need to patch any kernel though just turn" einfo "all the i2c stuff in kernel config to M and you'll be fine." einfo }