/[gentoo-x86]/net-fs/netatalk/netatalk-2.2.1-r3.ebuild
Gentoo

Contents of /net-fs/netatalk/netatalk-2.2.1-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sun Oct 7 13:18:02 2012 UTC (18 months, 1 week ago) by ulm
Branch: MAIN
Changes since 1.9: +2 -2 lines
Update blocker after package move of yudit.

(Portage version: 2.1.11.24/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20