summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2005-03-15 04:18:38 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2005-03-15 04:18:38 +0000
commit81527e780e8d5d51740a9edc7999106b0bbddde4 (patch)
treea059fb327031dceb8407baedb08d2eef72fd76a8 /net-fs/autofs/autofs-4.1.3-r4.ebuild
parentMark ~amd64. Closes #85171 (diff)
downloadgentoo-2-81527e780e8d5d51740a9edc7999106b0bbddde4.tar.gz
gentoo-2-81527e780e8d5d51740a9edc7999106b0bbddde4.tar.bz2
gentoo-2-81527e780e8d5d51740a9edc7999106b0bbddde4.zip
Bug #82086 - totally revamp the init script, now supports all daemon options. Also cleanup all usage of unsafe sub-shells.
(Portage version: 2.0.51.19)
Diffstat (limited to 'net-fs/autofs/autofs-4.1.3-r4.ebuild')
-rw-r--r--net-fs/autofs/autofs-4.1.3-r4.ebuild86
1 files changed, 86 insertions, 0 deletions
diff --git a/net-fs/autofs/autofs-4.1.3-r4.ebuild b/net-fs/autofs/autofs-4.1.3-r4.ebuild
new file mode 100644
index 000000000000..f26d103f68c2
--- /dev/null
+++ b/net-fs/autofs/autofs-4.1.3-r4.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/autofs-4.1.3-r4.ebuild,v 1.1 2005/03/15 04:18:38 robbat2 Exp $
+
+inherit eutils
+
+IUSE="ldap"
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI_BASE="mirror://kernel/linux/daemons/${PN}/v4"
+SRC_URI="${SRC_URI_BASE}/${P}.tar.bz2
+ ${SRC_URI_BASE}/${P}-strict.patch
+ ${SRC_URI_BASE}/${P}-mtab_lock.patch
+ ${SRC_URI_BASE}/${P}-bad_chdir.patch
+ ${SRC_URI_BASE}/${P}-non_block_ping.patch
+ ${SRC_URI_BASE}/${P}-sock-leak-fix.patch
+ ${SRC_URI_BASE}/${P}-replicated_server_select.patch
+ mirror://gentoo/${P}-miscfixes.patch.gz"
+DEPEND="virtual/libc
+ ldap? ( >=net-nds/openldap-2.0 )"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~alpha ~ppc ~sparc ~amd64 ~ia64 ~ppc64"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ PATCH_LIST="${P}-strict.patch ${P}-mtab_lock.patch ${P}-bad_chdir.patch ${P}-non_block_ping.patch ${P}-sock-leak-fix.patch ${P}-replicated_server_select.patch ${P}-miscfixes.patch.gz"
+ for i in ${PATCH_LIST}; do
+ EPATCH_OPTS="-p1 -d ${S}" epatch ${DISTDIR}/${i}
+ done
+
+ # Upstream version of this patch is incorrect
+ epatch ${FILESDIR}/${P}-signal-race-fix.patch
+
+ cd ${S}
+ autoconf || die "Autoconf failed"
+
+ cd ${S}/daemon
+ sed -i 's/LIBS \= \-ldl/LIBS \= \-ldl \-lnsl \$\{LIBLDAP\}/' Makefile || die "LIBLDAP change failed"
+}
+
+src_compile() {
+ local myconf
+ use ldap || myconf="--without-openldap"
+
+ econf ${myconf} || die
+ sed -i -e '/^\(CFLAGS\|CXXFLAGS\|LDFLAGS\)[[:space:]]*=/d' Makefile.rules || die "Failed to remove (C|CXX|LD)FLAGS"
+ emake || die "make failed"
+}
+
+src_install() {
+ into /usr
+ dosbin daemon/automount
+ exeinto /usr/lib/autofs
+ doexe modules/*.so
+
+ dodoc COPYING COPYRIGHT NEWS README* TODO CHANGELOG CREDITS
+ cd ${S}/samples
+ docinto samples ; dodoc auto.misc auto.master
+ cd ${S}/man
+ sed -i 's:\/etc\/:\/etc\/autofs\/:g' *.8 *.5 *.in || die "Failed to update path in manpages"
+ doman auto.master.5 autofs.5 autofs.8 automount.8
+
+ dodir /etc/autofs /etc/init.d /etc/conf.d
+ insinto /etc/autofs ; doins ${FILESDIR}/auto.master
+ insinto /etc/autofs ; doins ${FILESDIR}/auto.misc
+ exeinto /etc/autofs ; doexe ${FILESDIR}/auto.net # chmod 755 is important!
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/autofs.rc11 autofs
+ insinto /etc/conf.d ; newins ${FILESDIR}/autofs.confd9 autofs
+ if use ldap; then
+ cd ${S}/samples
+ docinto samples ; dodoc ldap* auto.master.ldap
+ insinto /etc/openldap/schema ; doins autofs.schema
+ exeinto /usr/lib/autofs ; doexe autofs-ldap-auto-master
+ fi
+}
+
+pkg_postinst() {
+ einfo "Note: If you plan on using autofs for automounting"
+ einfo "remote NFS mounts without having the NFS daemon running"
+ einfo "please add portmap to your default run-level."
+ echo ""
+ einfo "Also the normal autofs status has been renamed stats"
+ einfo "as there is already a predefined Gentoo status"
+}