/[gentoo-x86]/net-ftp/proftpd/proftpd-1.3.4a-r1.ebuild
Gentoo

Contents of /net-ftp/proftpd/proftpd-1.3.4a-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Wed Sep 19 08:27:54 2012 UTC (8 months, 4 weeks ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Version bump, fixes bug #422941 (fbsd-9.0 support). Add multilib inherit where needed

(Portage version: 2.2.0_alpha129/cvs/Linux x86_64)

1 voyageur 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 voyageur 1.3 # $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/proftpd-1.3.4a-r1.ebuild,v 1.2 2012/05/13 10:49:47 swift Exp $
4 voyageur 1.1
5     EAPI=4
6 voyageur 1.3 inherit eutils multilib
7 voyageur 1.1
8     MOD_CASE="0.7"
9     MOD_CLAMAV="0.11rc"
10     MOD_DISKUSE="0.9"
11     MOD_GSS="1.3.3"
12     MOD_VROOT="0.9.2"
13    
14     DESCRIPTION="An advanced and very configurable FTP server."
15     HOMEPAGE="http://www.proftpd.org/
16     http://www.castaglia.org/proftpd/
17     http://www.thrallingpenguin.com/resources/mod_clamav.htm
18     http://gssmod.sourceforge.net/"
19     SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.bz2
20     case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
21     clamav? ( https://secure.thrallingpenguin.com/redmine/attachments/download/1/mod_clamav-${MOD_CLAMAV}.tar.gz )
22     diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
23     kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
24     vroot? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-vroot-${MOD_VROOT}.tar.gz )"
25     LICENSE="GPL-2"
26    
27     SLOT="0"
28     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
29     IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse doc dso exec ifsession ifversion ident ipv6
30     kerberos ldap linguas_bg_BG linguas_en_US linguas_fr_FR linguas_it_IT linguas_ja_JP linguas_ko_KR
31     linguas_ru_RU linguas_zh_CN linguas_zh_TW memcache mysql ncurses nls openssl pam +pcre postgres qos radius
32     ratio readme rewrite selinux sftp shaper sitemisc softquota sqlite ssl tcpd test trace vroot xinetd"
33     REQUIRED_USE="ban? ( ctrls )
34     sftp? ( openssl )
35     shaper? ( ctrls )
36     ssl? ( openssl )"
37    
38     CDEPEND="acl? ( virtual/acl )
39     caps? ( sys-libs/libcap )
40     clamav? ( app-antivirus/clamav )
41     kerberos? ( virtual/krb5 )
42     ldap? ( net-nds/openldap )
43     memcache? ( >=dev-libs/libmemcached-0.41 )
44     mysql? ( virtual/mysql )
45     nls? ( virtual/libiconv )
46     ncurses? ( sys-libs/ncurses )
47     openssl? ( dev-libs/openssl )
48     pam? ( virtual/pam )
49     pcre? ( dev-libs/libpcre )
50     postgres? ( dev-db/postgresql-base )
51     sqlite? ( dev-db/sqlite:3 )
52     xinetd? ( virtual/inetd )"
53     DEPEND="${CDEPEND}
54     test? ( dev-libs/check )"
55     RDEPEND="${CDEPEND}
56     net-ftp/ftpbase
57 swift 1.2 selinux? ( sec-policy/selinux-ftp )"
58 voyageur 1.1
59     S="${WORKDIR}/${P/_/}"
60    
61     __prepare_module() {
62     mv "${WORKDIR}"/$1/$1.c contrib
63     mv "${WORKDIR}"/$1/$1.html doc/contrib
64     rm -r "${WORKDIR}"/$1
65     }
66    
67     src_prepare() {
68     # Skip 'install-conf' / Support LINGUAS
69     sed -i -e "/install-all/s/ install-conf//" Makefile.in
70     sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in
71    
72     # Prepare external modules
73     use case && __prepare_module mod_case
74     if use clamav ; then
75     mv "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib
76     epatch "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/${PN}.patch
77     rm -r "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}
78     fi
79     use vroot && __prepare_module mod_vroot
80    
81     # Fix Gentoo Bug #354295 / ProFTPD Bug #3682
82     epatch "${FILESDIR}"/${P}-ubug-3682.patch
83    
84     # Fix Gentoo Bug #393189 / ProFTPD Bug #3728
85     epatch "${FILESDIR}"/${P}-ubug-3728.patch
86    
87     # Prepare external kerberos module
88     if use kerberos ; then
89     cd "${WORKDIR}"/mod_gss-${MOD_GSS}
90    
91     # Support app-crypt/heimdal / Gentoo Bug #284853
92     sed -i -e "s/krb5_principal2principalname/_\0/" mod_auth_gss.c.in
93    
94     # Remove obsolete DES / Gentoo Bug #324903
95     # Replace 'rpm' lookups / Gentoo Bug #391021
96     sed -i -e "/ac_gss_libs/s/ -ldes425//" \
97     -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
98     -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" configure{,.in}
99     fi
100     }
101    
102     src_configure() {
103     local c m
104    
105     use acl && m="${m}:mod_facl"
106     use ban && m="${m}:mod_ban"
107     use case && m="${m}:mod_case"
108     use clamav && m="${m}:mod_clamav"
109     use copy && m="${m}:mod_copy"
110     use ctrls && m="${m}:mod_ctrls_admin"
111     use deflate && m="${m}:mod_deflate"
112     if use diskuse ; then
113     cd "${WORKDIR}"/mod_diskuse
114     econf
115     mv mod_diskuse.{c,h} "${S}"/contrib
116     mv mod_diskuse.html "${S}"/doc/contrib
117     cd "${S}"
118     rm -r "${WORKDIR}"/mod_diskuse
119     m="${m}:mod_diskuse"
120     fi
121     use exec && m="${m}:mod_exec"
122     use ifsession && m="${m}:mod_ifsession"
123     use ifversion && m="${m}:mod_ifversion"
124     if use kerberos ; then
125     cd "${WORKDIR}"/mod_gss-${MOD_GSS}
126     if has_version app-crypt/mit-krb5 ; then
127     econf --enable-mit
128     else
129     econf --enable-heimdal
130     fi
131     mv mod_{auth_gss,gss}.c "${S}"/contrib
132     mv mod_gss.h "${S}"/include
133     mv README.mod_{auth_gss,gss} "${S}"
134     mv mod_gss.html "${S}"/doc/contrib
135     mv rfc{1509,2228}.txt "${S}"/doc/rfc
136     cd "${S}"
137     rm -r "${WORKDIR}"/mod_gss-${MOD_GSS}
138     m="${m}:mod_gss:mod_auth_gss"
139     fi
140     use ldap && m="${m}:mod_ldap"
141     if use mysql || use postgres || use sqlite ; then
142     m="${m}:mod_sql:mod_sql_passwd"
143     use mysql && m="${m}:mod_sql_mysql"
144     use postgres && m="${m}:mod_sql_postgres"
145     use sqlite && m="${m}:mod_sql_sqlite"
146     fi
147     use qos && m="${m}:mod_qos"
148     use radius && m="${m}:mod_radius"
149     use ratio && m="${m}:mod_ratio"
150     use readme && m="${m}:mod_readme"
151     use rewrite && m="${m}:mod_rewrite"
152     if use sftp ; then
153     m="${m}:mod_sftp"
154     use pam && m="${m}:mod_sftp_pam"
155     use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
156     fi
157     use shaper && m="${m}:mod_shaper"
158     use sitemisc && m="${m}:mod_site_misc"
159     if use softquota ; then
160     m="${m}:mod_quotatab:mod_quotatab_file"
161     use ldap && m="${m}:mod_quotatab_ldap"
162     use radius && m="${m}:mod_quotatab_radius"
163     use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
164     fi
165     if use ssl ; then
166     m="${m}:mod_tls:mod_tls_shmcache"
167     use memcache && m="${m}:mod_tls_memcache"
168     fi
169     if use tcpd ; then
170     m="${m}:mod_wrap2:mod_wrap2_file"
171     use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
172     fi
173     use vroot && m="${m}:mod_vroot"
174    
175     [ -z ${m} ] || c="${c} --with-modules=${m:1}"
176     econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
177     $(use_enable acl facl) \
178     $(use_enable authfile auth-file) \
179     $(use_enable caps cap) \
180     $(use_enable ctrls) \
181     $(use_enable dso) \
182     $(use_enable ident) \
183     $(use_enable ipv6) \
184     $(use_enable memcache) \
185     $(use_enable ncurses) \
186     $(use_enable nls) \
187     $(use_enable openssl) \
188     $(use_enable pam auth-pam) \
189     $(use_enable pcre) \
190     $(use_enable test tests) \
191     $(use_enable trace) \
192     $(use_enable userland_GNU shadow) \
193     $(use_enable userland_GNU autoshadow) \
194     ${c:1}
195     }
196    
197     src_test() {
198     emake api-tests -C tests
199     }
200    
201     src_install() {
202     default
203     [ -z ${LINGUAS} ] && rm -r "${ED}"/usr/share/locale
204     newinitd "${FILESDIR}"/proftpd.initd proftpd
205     insinto /etc/proftpd
206     doins "${FILESDIR}"/proftpd.conf.sample
207    
208     if use xinetd ; then
209     insinto /etc/xinetd.d
210     newins "${FILESDIR}"/proftpd.xinetd proftpd
211     fi
212    
213     dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
214     if use doc ; then
215     dohtml doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
216     docinto rfc
217     dodoc doc/rfc/*.txt
218     fi
219     }
220    
221     pkg_postinst() {
222     if use tcpd ; then
223     ewarn
224     ewarn "Important: Since ProFTPD 1.3.4rc2 the module mod_wrap for TCP Wrapper"
225     ewarn "support has been replaced by mod_wrap2 which is more configurable and"
226     ewarn "portable. But you have to adjust your configuration before restaring"
227     ewarn "ProFTPD. On the following website you can find more information:"
228     ewarn " http://proftpd.org/docs/contrib/mod_wrap2.html"
229     ewarn
230     fi
231     }

  ViewVC Help
Powered by ViewVC 1.1.20