summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb')
-rw-r--r--meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb102
1 files changed, 102 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb
new file mode 100644
index 0000000000..cba39e8e24
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb
@@ -0,0 +1,102 @@
1SUMMARY = "Secure and configurable FTP server"
2SECTION = "console/network"
3HOMEPAGE = "http://www.proftpd.org"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184"
6
7SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \
8 file://basic.conf.patch \
9 file://proftpd-basic.init \
10 file://default \
11 file://close-RequireValidShell-check.patch \
12 file://contrib.patch \
13 file://build_fixup.patch \
14 "
15
16SRC_URI[md5sum] = "aff1bff40e675244d72c4667f203e5bb"
17SRC_URI[sha256sum] = "c10316fb003bd25eccbc08c77dd9057e053693e6527ffa2ea2cc4e08ccb87715"
18
19inherit autotools-brokensep useradd update-rc.d
20
21PACKAGECONFIG ??= "sia shadow"
22PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
23PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
24
25PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses"
26PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl"
27PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam"
28PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6"
29PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow"
30PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre "
31
32# enable POSIX.1e capabilities
33PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap"
34
35#enable support for POSIX ACLs
36PACKAGECONFIG[acl] = "--enable-facl, --disable-facl"
37
38#enable proftpd controls via ftpdct
39PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls"
40
41#prevent proftpd from using its bundled getopt implementation.
42PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt"
43
44#do not strip debugging symbols from installed code
45PACKAGECONFIG[strip] = "--enable-strip, --disable-strip"
46
47#enable SIA authentication support (Tru64)
48PACKAGECONFIG[sia] = "--enable-sia, --disable-sia"
49PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile"
50
51#enable Native Language Support (NLS)
52PACKAGECONFIG[nls] = "--enable-nls, --disable-nls"
53
54#add mod_dso to core modules
55PACKAGECONFIG[dso] = "--enable-dso, --disable-dso"
56PACKAGECONFIG[largefile] = "--enable-largefile, --disable-largefile"
57
58#omit mod_auth_file from core modules
59PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file"
60
61
62# proftpd uses libltdl which currently makes configuring using
63# autotools.bbclass a pain...
64do_configure () {
65 oe_runconf
66}
67
68FTPUSER = "ftp"
69FTPGROUP = "ftp"
70
71do_install () {
72 oe_runmake DESTDIR=${D} install
73 rmdir ${D}${libdir}/proftpd ${D}${datadir}/locale
74 [ -d ${D}${libexecdir} ] && rmdir ${D}${libexecdir}
75 sed -i '/ *User[ \t]*/s/ftp/${FTPUSER}/' ${D}${sysconfdir}/proftpd.conf
76 sed -i '/ *Group[ \t]*/s/ftp/${FTPGROUP}/' ${D}${sysconfdir}/proftpd.conf
77 install -d ${D}${sysconfdir}/init.d
78 install -m 0755 ${WORKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd
79 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/proftpd
80 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/proftpd
81 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/proftpd
82 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/proftpd
83
84 install -d ${D}${sysconfdir}/default
85 install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/proftpd
86
87 # create the pub directory
88 mkdir -p ${D}/home/${FTPUSER}/pub/
89 chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub
90}
91
92INITSCRIPT_NAME = "proftpd"
93INITSCRIPT_PARAM = "defaults 85 15"
94
95USERADD_PACKAGES = "${PN}"
96GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
97USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \
98 --shell /bin/false ${FTPUSER}"
99
100FILES_${PN} += "/home/${FTPUSER}"
101
102RDEPENDS_${PN} += "perl"