| 1 |
flameeyes |
1.1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
maekke |
1.4 |
# $Header: /var/cvsroot/gentoo-x86/net-fs/netatalk/netatalk-2.2.1-r3.ebuild,v 1.3 2012/04/17 19:46:44 ranger Exp $ |
| 4 |
flameeyes |
1.1 |
|
| 5 |
|
|
EAPI="4" |
| 6 |
|
|
|
| 7 |
|
|
inherit pam flag-o-matic multilib autotools |
| 8 |
|
|
|
| 9 |
|
|
RESTRICT="test" |
| 10 |
|
|
DESCRIPTION="Open Source AFP server and other AppleTalk-related utilities" |
| 11 |
|
|
HOMEPAGE="http://netatalk.sourceforge.net/" |
| 12 |
|
|
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" |
| 13 |
|
|
|
| 14 |
|
|
LICENSE="GPL-2 BSD" |
| 15 |
|
|
SLOT="0" |
| 16 |
maekke |
1.4 |
KEYWORDS="~amd64 arm ppc ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
| 17 |
flameeyes |
1.1 |
IUSE="acl appletalk avahi cracklib cups debug kerberos ldap pam quota slp ssl static-libs tcpd" |
| 18 |
|
|
|
| 19 |
|
|
RDEPEND=">=sys-libs/db-4.2.52 |
| 20 |
|
|
avahi? ( net-dns/avahi[dbus] ) |
| 21 |
|
|
cracklib? ( sys-libs/cracklib ) |
| 22 |
|
|
pam? ( virtual/pam ) |
| 23 |
|
|
ssl? ( dev-libs/openssl ) |
| 24 |
|
|
tcpd? ( sys-apps/tcp-wrappers ) |
| 25 |
|
|
slp? ( net-libs/openslp ) |
| 26 |
|
|
kerberos? ( virtual/krb5 ) |
| 27 |
|
|
>=sys-apps/coreutils-7.1 |
| 28 |
|
|
!app-text/yudit |
| 29 |
|
|
dev-libs/libgcrypt |
| 30 |
|
|
appletalk? ( |
| 31 |
|
|
cups? ( net-print/cups ) |
| 32 |
|
|
) |
| 33 |
|
|
acl? ( |
| 34 |
|
|
sys-apps/attr |
| 35 |
|
|
sys-apps/acl |
| 36 |
|
|
) |
| 37 |
|
|
ldap? ( |
| 38 |
|
|
net-nds/openldap |
| 39 |
|
|
) |
| 40 |
|
|
" |
| 41 |
|
|
DEPEND="${RDEPEND}" |
| 42 |
|
|
RDEPEND="sys-apps/openrc" |
| 43 |
|
|
|
| 44 |
|
|
REQUIRED_USE="ldap? ( acl )" |
| 45 |
|
|
|
| 46 |
|
|
DOCS=( CONTRIBUTORS NEWS VERSION AUTHORS doc/README.AppleTalk ) |
| 47 |
|
|
|
| 48 |
|
|
src_prepare() { |
| 49 |
|
|
epatch "${FILESDIR}"/${P}-gentoo.patch |
| 50 |
|
|
eautoreconf |
| 51 |
|
|
} |
| 52 |
|
|
|
| 53 |
|
|
src_configure() { |
| 54 |
|
|
local myconf= |
| 55 |
|
|
|
| 56 |
|
|
if use appletalk; then |
| 57 |
|
|
myconf+=" --enable-ddp --enable-timelord $(use_enable cups)" |
| 58 |
|
|
else |
| 59 |
|
|
myconf+=" --disable-ddp --disable-timelord --disable-cups" |
| 60 |
|
|
fi |
| 61 |
|
|
|
| 62 |
|
|
if use acl; then |
| 63 |
|
|
myconf+=" --with-acls $(use_with ldap)" |
| 64 |
|
|
else |
| 65 |
|
|
myconf+=" --without-acls --without-ldap" |
| 66 |
|
|
fi |
| 67 |
|
|
|
| 68 |
|
|
append-flags -fno-strict-aliasing |
| 69 |
|
|
|
| 70 |
|
|
# Ignore --enable-gentoo, we install the init.d by hand and we avoid having |
| 71 |
|
|
# to sed the Makefiles to not do rc-update. |
| 72 |
|
|
econf \ |
| 73 |
|
|
$(use_enable avahi zeroconf) \ |
| 74 |
|
|
$(use_enable debug) \ |
| 75 |
|
|
$(use_enable kerberos krbV-uam) \ |
| 76 |
|
|
$(use_enable quota) \ |
| 77 |
|
|
$(use_enable slp srvloc) \ |
| 78 |
|
|
$(use_enable static-libs static) \ |
| 79 |
|
|
$(use_enable tcpd tcp-wrappers) \ |
| 80 |
|
|
$(use_with cracklib) \ |
| 81 |
|
|
$(use_with pam) \ |
| 82 |
|
|
$(use_with ssl ssl-dir) \ |
| 83 |
|
|
--disable-krb4-uam \ |
| 84 |
|
|
--disable-afs \ |
| 85 |
|
|
--enable-fhs \ |
| 86 |
|
|
--with-bdb=/usr \ |
| 87 |
|
|
${myconf} |
| 88 |
|
|
} |
| 89 |
|
|
|
| 90 |
|
|
src_install() { |
| 91 |
|
|
default |
| 92 |
|
|
|
| 93 |
|
|
newinitd "${FILESDIR}"/afpd.init.3 afpd |
| 94 |
|
|
newinitd "${FILESDIR}"/cnid_metad.init.2 cnid_metad |
| 95 |
|
|
|
| 96 |
|
|
if use appletalk; then |
| 97 |
|
|
newinitd "${FILESDIR}"/atalkd.init atalkd |
| 98 |
|
|
newinitd "${FILESDIR}"/atalk_service.init.2 timelord |
| 99 |
|
|
newinitd "${FILESDIR}"/atalk_service.init.2 papd |
| 100 |
|
|
fi |
| 101 |
|
|
|
| 102 |
|
|
use avahi || sed -i -e '/need avahi-daemon/d' "${D}"/etc/init.d/afpd |
| 103 |
|
|
use slp || sed -i -e '/need slpd/d' "${D}"/etc/init.d/afpd |
| 104 |
|
|
|
| 105 |
|
|
use ldap || rm "${D}"/etc/netatalk/afp_ldap.conf |
| 106 |
|
|
|
| 107 |
|
|
rm "${D}"/etc/netatalk/netatalk.conf |
| 108 |
|
|
|
| 109 |
|
|
# The pamd file isn't what we need, use pamd_mimic_system |
| 110 |
|
|
rm -rf "${D}/etc/pam.d" |
| 111 |
|
|
pamd_mimic_system netatalk auth account password session |
| 112 |
|
|
|
| 113 |
|
|
# Move /usr/include/netatalk to /usr/include/netatalk2 to avoid collisions |
| 114 |
|
|
# with /usr/include/netatalk/at.h provided by glibc (strange, uh?) |
| 115 |
|
|
# Packages that wants to link to netatalk should then probably change the |
| 116 |
|
|
# includepath then, but right now, nothing uses netatalk. |
| 117 |
|
|
# On a side note, it also solves collisions with freebsd-lib and other libcs |
| 118 |
|
|
mv "${D}"/usr/include/netatalk{,2} || die |
| 119 |
|
|
sed -i \ |
| 120 |
|
|
-e 's/include <netatalk/include <netatalk2/g' \ |
| 121 |
|
|
"${D}"usr/include/{netatalk2,atalk}/* || die |
| 122 |
|
|
|
| 123 |
|
|
# These are not used at all, as the uams are loaded with their .so |
| 124 |
|
|
# extension. |
| 125 |
|
|
rm "${D}"/usr/$(get_libdir)/netatalk/*.la |
| 126 |
|
|
|
| 127 |
|
|
use static-libs || rm "${D}"/usr/$(get_libdir)/*.la |
| 128 |
|
|
} |
| 129 |
|
|
|
| 130 |
|
|
pkg_postinst() { |
| 131 |
|
|
elog "Starting from version 2.2.1-r1 the netatalk init script has been split" |
| 132 |
|
|
elog "into different services depending on what you need to start." |
| 133 |
|
|
elog "This was done to make sure that all services are started and reported" |
| 134 |
|
|
elog "properly." |
| 135 |
|
|
elog "" |
| 136 |
|
|
elog "The new services are:" |
| 137 |
|
|
elog " cnid_metad" |
| 138 |
|
|
elog " afpd" |
| 139 |
|
|
if use appletalk; then |
| 140 |
|
|
elog " atalkd" |
| 141 |
|
|
elog " timelord" |
| 142 |
|
|
elog " papd" |
| 143 |
|
|
fi |
| 144 |
|
|
elog "" |
| 145 |
|
|
elog "Dependencies should be resolved automatically depending on settings" |
| 146 |
|
|
elog "but please report issues with this on https://bugs.gentoo.org/ if" |
| 147 |
|
|
elog "you find any." |
| 148 |
|
|
elog "" |
| 149 |
|
|
elog "The old configuration file /etc/netatalk/netatalk.conf is no longer" |
| 150 |
|
|
elog "installed, and will be ignored. The new configuration is supposed" |
| 151 |
|
|
elog "to be done through individual /etc/conf.d files, for everything that" |
| 152 |
|
|
elog "cannot be set already through their respective configuration files." |
| 153 |
|
|
} |