# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # Tested with gentoo-sources-r7. Requires video4linux in kernel. # Fails with 2.6 kernels. DESCRIPTION="SPCA50X USB Camera Driver" HOMEPAGE="http://spca50x.sourceforge.net/" EV="0.30" SRC_URI="mirror://sourceforge/spca50x/spca50x-src-${EV}.tar.gz" IUSE="" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" DEPEND="sys-kernel/gentoo-sources" pkg_setup() { [ -z "$KV" ] && die "Couldn't detect kernel version. Does /usr/src/linux exist?" return 0 } src_unpack() { unpack spca50x-src-${EV}.tar.gz epatch ${FILESDIR}/${P}-gentoo.diff } src_compile() { cd work emake binary || die } src_install() { cd ${P}/work einfo `pwd` # install the driver in the right palce insinto "/lib/modules/${KV}/misc/" doins spca50x.o # install the READMEs and License dodoc README CHANGELOG } pkg_postinst() { if [ "${ROOT}" = "/" ]; then /sbin/update-modules fi }