diff options
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.bb | 102 |
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 @@ | |||
| 1 | SUMMARY = "Secure and configurable FTP server" | ||
| 2 | SECTION = "console/network" | ||
| 3 | HOMEPAGE = "http://www.proftpd.org" | ||
| 4 | LICENSE = "GPLv2+" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184" | ||
| 6 | |||
| 7 | SRC_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 | |||
| 16 | SRC_URI[md5sum] = "aff1bff40e675244d72c4667f203e5bb" | ||
| 17 | SRC_URI[sha256sum] = "c10316fb003bd25eccbc08c77dd9057e053693e6527ffa2ea2cc4e08ccb87715" | ||
| 18 | |||
| 19 | inherit autotools-brokensep useradd update-rc.d | ||
| 20 | |||
| 21 | PACKAGECONFIG ??= "sia shadow" | ||
| 22 | PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}" | ||
| 23 | PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
| 24 | |||
| 25 | PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses" | ||
| 26 | PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl" | ||
| 27 | PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam" | ||
| 28 | PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6" | ||
| 29 | PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow" | ||
| 30 | PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre " | ||
| 31 | |||
| 32 | # enable POSIX.1e capabilities | ||
| 33 | PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap" | ||
| 34 | |||
| 35 | #enable support for POSIX ACLs | ||
| 36 | PACKAGECONFIG[acl] = "--enable-facl, --disable-facl" | ||
| 37 | |||
| 38 | #enable proftpd controls via ftpdct | ||
| 39 | PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls" | ||
| 40 | |||
| 41 | #prevent proftpd from using its bundled getopt implementation. | ||
| 42 | PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt" | ||
| 43 | |||
| 44 | #do not strip debugging symbols from installed code | ||
| 45 | PACKAGECONFIG[strip] = "--enable-strip, --disable-strip" | ||
| 46 | |||
| 47 | #enable SIA authentication support (Tru64) | ||
| 48 | PACKAGECONFIG[sia] = "--enable-sia, --disable-sia" | ||
| 49 | PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile" | ||
| 50 | |||
| 51 | #enable Native Language Support (NLS) | ||
| 52 | PACKAGECONFIG[nls] = "--enable-nls, --disable-nls" | ||
| 53 | |||
| 54 | #add mod_dso to core modules | ||
| 55 | PACKAGECONFIG[dso] = "--enable-dso, --disable-dso" | ||
| 56 | PACKAGECONFIG[largefile] = "--enable-largefile, --disable-largefile" | ||
| 57 | |||
| 58 | #omit mod_auth_file from core modules | ||
| 59 | PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file" | ||
| 60 | |||
| 61 | |||
| 62 | # proftpd uses libltdl which currently makes configuring using | ||
| 63 | # autotools.bbclass a pain... | ||
| 64 | do_configure () { | ||
| 65 | oe_runconf | ||
| 66 | } | ||
| 67 | |||
| 68 | FTPUSER = "ftp" | ||
| 69 | FTPGROUP = "ftp" | ||
| 70 | |||
| 71 | do_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 | |||
| 92 | INITSCRIPT_NAME = "proftpd" | ||
| 93 | INITSCRIPT_PARAM = "defaults 85 15" | ||
| 94 | |||
| 95 | USERADD_PACKAGES = "${PN}" | ||
| 96 | GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}" | ||
| 97 | USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \ | ||
| 98 | --shell /bin/false ${FTPUSER}" | ||
| 99 | |||
| 100 | FILES_${PN} += "/home/${FTPUSER}" | ||
| 101 | |||
| 102 | RDEPENDS_${PN} += "perl" | ||
