# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Library providing the FAM File Alteration Monitor API" HOMEPAGE="http://www.gnome.org/~veillard/gamin" SRC_URI="${HOMEPAGE}/sources/${P}.tar.gz" LICENSE="LGPL-2" SLOT="0" KEYWORDS="~x86 ~amd64 ~arm ~hppa ~ia64 ~ppc ~s390" IUSE="debug doc noinotify" RDEPEND="virtual/libc >=dev-libs/glib-2 !app-admin/fam" DEPEND="${RDEPEND} dev-util/pkgconfig" PROVIDE="virtual/fam" src_compile() { econf \ $(use_enable !noinotify inotify) \ $(use_enable debug) \ $(use_enable debug debug-api) \ || die emake || die "emake failed" } src_install() { make DESTDIR="${D}" install || die dodoc AUTHORS ChangeLog README TODO NEWS doc/*txt use doc && dohtml doc/* } pkg_postinst() { echo if use noinotify; then ewarn "You have chosen to build gamin without inotify support." ewarn ewarn "This is strongly unrecommended and you will suffer" ewarn "from extremely poor performance!" ewarn ewarn "Please consider switching to an inotify-enabled kernel" ewarn "such as >=sys-kernel/gentoo-sources-2.6.12" else ewarn "You have built gamin with inotify support. In order for this to" ewarn "work, you must use an inofity-enabled kernel." echo einfo "This release of gamin requires inotify version 0.23 or newer." einfo "Get the latest patch for your kernel from" einfo " http://www.kernel.org/pub/linux/kernel/people/rml/inotify/v2.6/0.23" einfo einfo "To add inotify-0.23 support to your current kernel:" einfo einfo " cd /usr/src/linux" einfo " patch -p1 <${FILESDIR}/inotify-0.23-rml-2.6.12-rc4-7.patch" einfo " make oldconfig" # einfo " make && cp arch/$(uname -m)/boot/bzImage \\" # einfo " /boot/kernel-$(uname -r)" # einfo " reboot" einfo einfo "Now re-compile your kernel as usual and boot it." fi echo }