# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="A parallel port pin programming library" HOMEPAGE="http://parapin.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="LGPL-2.1" IUSE="module doc" KEYWORDS="~amd64" SLOT="0" DEPEND="virtual/os-headers doc? ( dev-tex/latex2html )" src_compile() { echo ${KV} | grep 2.6. > /dev/null if [ $? == 1 ]; then ./setup-2.6.sh || die "setup-2.6.sh failed" else ./setup-2.4.sh || die "setup-2.4.sh failed" fi if use module; then emake all || die else emake || die fi } src_install() { dolib.a libparapin.a insopts -m0444; insinto /usr/include; doins parapin.h if use module; then insopts -m0644 insinto /lib/modules/`uname -r`/kernel doins kparapin.o parapindriver.o insinto /usr/include doins parapindriver.h fi dodoc README if use doc; then cd doc emake html cd parapin dohtml *.html *.css *.png cd ${S} docinto examples dodoc examples/*.c fi } pkg_postinst() { [ "${ROOT}" == "/" ] && depmod -a }