Contents of /trunk/extras/proftpd/proftpd-1.3.3-r1.smage2
Parent Directory | Revision Log
Revision 5066 -
(show annotations)
(download)
Wed Mar 3 19:11:32 2010 UTC (14 years, 2 months ago) by niro
File size: 4889 byte(s)
Wed Mar 3 19:11:32 2010 UTC (14 years, 2 months ago) by niro
File size: 4889 byte(s)
-optional mysql, ldap, tls and anonymous support
1 | # $Id$ |
2 | |
3 | PNAME="proftpd" |
4 | PVER="1.3.3" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="net-ftp" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="Highly configurable GPL-licensed FTP server software." |
11 | HOMEPAGE="http://proftpd.org/" |
12 | |
13 | DEPEND=">= sys-libs/ncurses-5.7 |
14 | >= sys-libs/pam-1.1 |
15 | >= sys-libs/libcap-2.17 |
16 | >= dev-libs/openssl-0.9.8k |
17 | >= sys-apps/tcp-wrappers-7.6 |
18 | >= sys-apps/acl-2.2 |
19 | >= sys-apps/attr-2.4 |
20 | >= net-nds/openldap-2.4.19 |
21 | >= dev-db/mysql5-5.1.40" |
22 | |
23 | SDEPEND=">= sys-dev/gettext-0.17" |
24 | |
25 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
26 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
27 | |
28 | MODULES_CVS_REV=1.4 |
29 | RC_CVS_REV=1.2 |
30 | |
31 | sminclude mbuild mtools |
32 | |
33 | SRC_URI=( |
34 | ftp://ftp.proftpd.org/distrib/source/${SRCFILE} |
35 | mirror://${PNAME}/${SRCFILE} |
36 | mirror://${PNAME}/${PNAME}-${PVER}-config.patch |
37 | mirror://${PNAME}/${PNAME}-${PVER}-config-pam.patch |
38 | mirror://${PNAME}/${PNAME}-${PVER}-config-tls.patch |
39 | mirror://${PNAME}/${PNAME}-${PVER}-config-tls-cosmetic.patch |
40 | mirror://${PNAME}/${PNAME}-${PVER}-config-ban.patch |
41 | mirror://${PNAME}/${PNAME}-${PVER}-config-ldap.patch |
42 | mirror://${PNAME}/${PNAME}-${PVER}-config-anonymous.patch |
43 | mirror://${PNAME}/${PNAME}-1.3.0a-cracklib.patch |
44 | mirror://${PNAME}/ftpusers |
45 | mirror://${PNAME}/modules.conf-${MODULES_CVS_REV} |
46 | mirror://${PNAME}/proftpd.rc-${RC_CVS_REV} |
47 | mirror://${PNAME}/proftpd.confd |
48 | mirror://${PNAME}/proftpd.pam |
49 | mirror://${PNAME}/proftpd.logrotate |
50 | ) |
51 | |
52 | UP2DATE="updatecmd -listonly ftp://ftp.proftpd.org/distrib/source/ | grep -v 'rc[0-9]' | lasttarball" |
53 | |
54 | src_prepare() |
55 | { |
56 | munpack ${SRCFILE} || die |
57 | cd ${SRCDIR} |
58 | |
59 | # adjust configs to match magellan |
60 | mpatch ${PNAME}-${PVER}-config.patch || die |
61 | |
62 | # enable pam support |
63 | mpatch ${PNAME}-${PVER}-config-pam.patch || die |
64 | |
65 | # enable tls support |
66 | mpatch ${PNAME}-${PVER}-config-tls.patch || die |
67 | |
68 | # fix tls description |
69 | mpatch ${PNAME}-${PVER}-config-tls-cosmetic.patch || die |
70 | |
71 | # enable ban-list support |
72 | mpatch ${PNAME}-${PVER}-config-ban.patch || die |
73 | |
74 | # enable ldap support |
75 | mpatch ${PNAME}-${PVER}-config-ldap.patch || die |
76 | |
77 | # enable anonymous support |
78 | mpatch ${PNAME}-${PVER}-config-anonymous.patch || die |
79 | |
80 | # fix cracklib location in ftpasswd |
81 | mpatch ${PNAME}-1.3.0a-cracklib.patch || die |
82 | } |
83 | |
84 | src_compile() |
85 | { |
86 | cd ${SRCDIR} |
87 | |
88 | # ToDO: postgres |
89 | # the modules.conf must be fixed to |
90 | # LoadModule mod_sql_postgres.c |
91 | |
92 | # new: mod_ban, mod_lang, mod_quotatab_radius, mod_wrap2, mod_wrap2_file, mod_wrap2_sql |
93 | # mod_facl, mod_ldap, mod_sql, mod_sql_passwd, mod_sql_mysql, mod_sftp, mod_sftp_pam, |
94 | # mod_sftp_sql, mod_quotatab_ldap, mod_quotatab_radius, mod_quotatab_sql, mod_tls_shmchache |
95 | |
96 | local dso_modules="mod_ratio:mod_radius:mod_rewrite:mod_tls:mod_wrap:mod_quotatab" |
97 | dso_modules+=":mod_quotatab_file:mod_site_misc:mod_ctrls_admin" |
98 | |
99 | # the new ones |
100 | dso_modules+=":mod_ban:mod_wrap2:mod_wrap2_file" |
101 | dso_modules+=":mod_sftp:mod_sftp_pam:mod_shaper" |
102 | dso_modules+=":mod_quotatab_radius:mod_tls_shmcache" |
103 | |
104 | # mysql |
105 | dso_modules+=":mod_sql:mod_sql_passwd:mod_sql_mysql:mod_sftp_sql:mod_quotatab_sql" |
106 | |
107 | # ldap |
108 | dso_modules+="mod_ldap:mod_quotatab_ldap" |
109 | |
110 | # acl |
111 | dso_modules+=":mod_facl" |
112 | |
113 | # must be the last one, see: http://www16.de.proftpd.org/docs/contrib/mod_ifsession.html#Installation |
114 | dso_modules+=":mod_ifsession" |
115 | |
116 | # non shared modules |
117 | local modules="mod_auth_pam:mod_readme" |
118 | |
119 | mconfigure \ |
120 | --sysconfdir=/etc/proftpd \ |
121 | --localstatedir=/var/run/proftpd \ |
122 | --libexecdir=/usr/$(mlibdir)/proftpd \ |
123 | --enable-shadow \ |
124 | --enable-autoshadow \ |
125 | --enable-auth-pam \ |
126 | --enable-nls \ |
127 | --enable-ncurses \ |
128 | --enable-shadow \ |
129 | --enable-autoshadow \ |
130 | --enable-sendfile \ |
131 | --enable-ctrls \ |
132 | --enable-dso \ |
133 | --enable-ipv6 \ |
134 | --enable-openssl \ |
135 | --with-includes=/usr/include/openssl \ |
136 | --with-includes=/usr/include/mysql \ |
137 | --enable-cap \ |
138 | --enable-facl \ |
139 | --enable-auth-file \ |
140 | --with-modules=${modules} \ |
141 | --with-shared=${dso_modules} \ |
142 | || die |
143 | |
144 | mmake -j1 || die |
145 | } |
146 | |
147 | src_install() |
148 | { |
149 | cd ${SRCDIR} |
150 | mmake DESTDIR=${BINDIR} install || die |
151 | |
152 | # install ftpuser blacklist |
153 | minstalletc ftpusers || die |
154 | |
155 | # install modules.conf |
156 | minstallfile -s modules.conf-${MODULES_CVS_REV} /etc/proftpd/modules.conf || die |
157 | sed -i "s:@@modulepath@@:/usr/$(mlibdir)/proftpd:g" \ |
158 | ${BINDIR}/etc/proftpd/modules.conf || die |
159 | |
160 | # install pam config |
161 | minstallpam proftpd.pam proftpd || die |
162 | |
163 | # install initscript |
164 | minstallrc proftpd.rc-${RC_CVS_REV} proftpd || die |
165 | |
166 | # install rc config |
167 | minstallconf proftpd.conf proftpd || die |
168 | |
169 | # install logrotate config |
170 | minstalllog proftpd.logrotate proftpd || die |
171 | |
172 | mkeepdir /var/run/proftpd || die |
173 | mkeepdir /var/log/proftpd || die |
174 | |
175 | minstalldocs ChangeLog COPYING CREDITS NEWS README* RELEASE_NOTES || die |
176 | minstalldocs doc/license.txt sample-configurations/*.conf || die |
177 | } |
178 | |
179 | preinstall() |
180 | { |
181 | # adding proftpd user |
182 | ${MLIBDIR}/mgroupadd -o "-g 82" proftpd |
183 | ${MLIBDIR}/museradd -o "-u 82 -g proftpd -d /dev/null -s /bin/false" proftpd |
184 | } |
185 | |
186 | postinstall() |
187 | { |
188 | mstartservice proftpd |
189 | } |
190 | |
191 | postremove() |
192 | { |
193 | mstopservice proftpd |
194 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |