/[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.12 - (hide annotations) (download)
Sat Mar 1 22:29:42 2014 UTC (6 weeks, 6 days ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +3 -3 lines
Update libgcrypt dep to use slot :0.

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)

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

  ViewVC Help
Powered by ViewVC 1.1.20