# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="A small utility in C that quickly displays USE flag descriptions" HOMEPAGE="http://www.xs4all.nl/~rooversj/gentoo" SRC_URI="http://www.xs4all.nl/~rooversj/gentoo/${P}.c" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" IUSE="" DEPEND="virtual/libc" src_unpack() { /bin/cp -v ${DISTDIR}/${A} ${WORKDIR} || die "Where is it?" } src_compile() { cd ${WORKDIR} einfo "Compiling..." echo "cc ${CFLAGS} -Wall -pedantic -ansi -o cguses ${P}.c" cc ${CFLAGS} -Wall -pedantic -ansi -o cguses ${P}.c || die "Failed to build" einfo "Done!" } src_install() { /bin/install -D -m 0755 ${WORKDIR}/cguses ${D}/usr/bin/guses || die "Somethings went wrong" /bin/gzip ${WORKDIR}/${P}.c /bin/install -D -m 0644 ${WORKDIR}/${P}.c.gz ${D}/usr/share/doc/${P}/${P}.c.gz || die "Oops" } pkg_postinst() { echo einfo "Run '[/usr/bin/]guses' to find out how this simple program works." einfo "Run 'guses ' to see immediate results." echo ewarn "TODO: Make it check paths properly (and do other sanity checks)." ewarn "TODO: Fix the problem with hyphenated USE flags." ewarn "TODO: Add args to specify what files to search and" ewarn " possibly to limit the search to only USE flags." echo }