# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/autofs-5.0.4-r5.ebuild,v 1.2 2009/09/23 18:35:30 patrick Exp $ inherit eutils multilib autotools IUSE="ldap sasl" DESCRIPTION="Kernel based automounter" HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html" SRC_URI_BASE="mirror://kernel/linux/daemons/${PN}/v5" # This list is taken directly from http://kernel.org/pub/linux/daemons/autofs/v5/patch_order-${PV} # Please do not modify the order PATCH_LIST=" ${P}-fix-included-map-read-fail-handling.patch ${P}-refactor-ldap-sasl-bind.patch ${PN}-5.0.4-add-mount-wait-parameter.patch ${P}-special-case-cifs-escapes.patch ${P}-fix-libxml2-workaround-configure.patch ${P}-more-code-analysis-corrections.patch ${P}-fix-backwards-ifndef-INET6.patch ${P}-fix-stale-init-for-file-map-instance.patch ${P}-fix-ext4-fsck-at-mount.patch ${P}-dont-use-master_lex_destroy-to-clear-parse-buffer.patch ${P}-make-documentation-for-set-log-priority-clearer.patch ${P}-fix-timeout-in-connect_nb.patch ${P}-fix-pidof-init-script-usage.patch ${P}-check-for-path-mount-location-in-generic-module.patch ${P}-dont-fail-mount-on-access-fail.patch ${P}-fix-rpc-large-export-list.patch ${P}-fix-memory-leak-on-reload.patch ${P}-update-kernel-patches-2.6.18-and-2.6.19.patch ${P}-dont-connect-at-ldap-lookup-module-init.patch ${P}-fix-random-selection-option.patch ${P}-fix-disable-timeout.patch ${P}-fix-strdup-return-value-check.patch ${P}-fix-reconnect-get-base-dn.patch ${P}-add-sasl-mutex-callbacks.patch ${P}-fix-get-qdn-fail.patch ${P}-fix-ampersand-escape-in-auto-smb.patch ${P}-add-locality-as-valid-ldap-master-map-attribute.patch" SRC_URI="${SRC_URI_BASE}/${P}.tar.bz2" for i in ${PATCH_LIST} ; do SRC_URI="${SRC_URI} ${SRC_URI_BASE}/${i}" done ; DEPEND="ldap? ( >=net-nds/openldap-2.0 ) sasl? ( virtual/krb5 )" # currently, sasl code assumes the presence of kerberosV RDEPEND="${DEPEND}" SLOT="0" LICENSE="GPL-2" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" src_unpack() { unpack ${P}.tar.bz2 for i in ${PATCH_LIST}; do EPATCH_OPTS="-p1 -d ${S}" epatch "${DISTDIR}"/${i} done cd "${S}" # # use CC and CFLAGS from environment (bug #154797) # write these values in Makefile.conf (echo "# Use the compiler and cflags determined by configure"; echo "CC := @CC@"; echo "CFLAGS := @CFLAGS@") >> Makefile.conf.in # make sure Makefile.conf is parsed after Makefile.rules sed -ni '/include Makefile.conf/{x; n; G}; p' Makefile sed -i 's/^\(CC\|CXX\).*//' Makefile.rules sed -i 's/^CFLAGS=-fPIE.*//' configure.in # do not include , rather , # as the former is a lame header for the latter (bug #157968) sed -i 's@nfs/nfs.h@linux/nfs.h@' include/rpc_subs.h eautoreconf || die "Autoconf failed" } src_compile() { CFLAGS="${CFLAGS}" \ econf \ $(use_with ldap openldap) \ $(use_with sasl) \ --enable-ignore-busy \ || die "configure failed" emake DONTSTRIP=1 || die "make failed" } src_install() { make DESTDIR="${D}" install || die "make install failed" newinitd "${FILESDIR}"/autofs5.rc1 autofs } pkg_postinst() { elog "Note: If you plan on using autofs for automounting" elog "remote NFS mounts without having the NFS daemon running" elog "please add rpcbind to your default run-level." }