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

Contents of /net-fs/netatalk/netatalk-2.2.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Tue Jun 26 04:40:58 2012 UTC (2 years, 1 month ago) by zmedico
Branch: MAIN
Changes since 1.1: +2 -2 lines
inherit eutils for epatch

(Portage version: 2.2.0_alpha113/cvs/Linux i686)

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

  ViewVC Help
Powered by ViewVC 1.1.20