summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5b.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-daemons/proftpd/proftpd_1.3.5b.bb')
-rw-r--r--meta-networking/recipes-daemons/proftpd/proftpd_1.3.5b.bb129
1 files changed, 129 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5b.bb b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5b.bb
new file mode 100644
index 000000000..5a53d0df6
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5b.bb
@@ -0,0 +1,129 @@
1SUMMARY = "Secure and configurable FTP server"
2SECTION = "net"
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 file://proftpd.service \
15 "
16
17SRC_URI[md5sum] = "f7b8e3a383b34a894c2502db74ccccde"
18SRC_URI[sha256sum] = "afc1789f2478acf88dfdc7d70da90a4fa2786d628218e9574273295d044b4fc8"
19
20inherit autotools-brokensep useradd update-rc.d systemd
21
22PACKAGECONFIG ??= "shadow \
23 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
24 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
25 "
26
27PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses"
28PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl"
29PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam"
30PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6"
31PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow"
32PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre "
33
34# enable POSIX.1e capabilities
35PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap"
36
37#enable support for POSIX ACLs
38PACKAGECONFIG[acl] = "--enable-facl, --disable-facl"
39
40#enable proftpd controls via ftpdct
41PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls"
42
43#prevent proftpd from using its bundled getopt implementation.
44PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt"
45
46#do not strip debugging symbols from installed code
47PACKAGECONFIG[strip] = "--enable-strip, --disable-strip"
48
49#enable SIA authentication support (Tru64)
50PACKAGECONFIG[sia] = "--enable-sia, --disable-sia"
51PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile"
52
53#enable Native Language Support (NLS)
54PACKAGECONFIG[nls] = "--enable-nls, --disable-nls"
55
56#add mod_dso to core modules
57PACKAGECONFIG[dso] = "--enable-dso, --disable-dso"
58PACKAGECONFIG[largefile] = "--enable-largefile, --disable-largefile"
59
60#omit mod_auth_file from core modules
61PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file"
62
63
64# proftpd uses libltdl which currently makes configuring using
65# autotools.bbclass a pain...
66do_configure () {
67 oe_runconf
68 cp ${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool ${S}/libtool
69}
70
71FTPUSER = "ftp"
72FTPGROUP = "ftp"
73
74do_install () {
75 oe_runmake DESTDIR=${D} install
76 rmdir ${D}${libdir}/proftpd ${D}${datadir}/locale
77 [ -d ${D}${libexecdir} ] && rmdir ${D}${libexecdir}
78 sed -i '/ *User[ \t]*/s/ftp/${FTPUSER}/' ${D}${sysconfdir}/proftpd.conf
79 sed -i '/ *Group[ \t]*/s/ftp/${FTPGROUP}/' ${D}${sysconfdir}/proftpd.conf
80 install -d ${D}${sysconfdir}/init.d
81 install -m 0755 ${WORKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd
82 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/proftpd
83 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/proftpd
84 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/proftpd
85 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/proftpd
86
87 install -d ${D}${sysconfdir}/default
88 install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/proftpd
89
90 # create the pub directory
91 mkdir -p ${D}/home/${FTPUSER}/pub/
92 chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub
93 if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
94 # install proftpd pam configuration
95 install -d ${D}${sysconfdir}/pam.d
96 install -m 644 ${S}/contrib/dist/rpm/ftp.pamd ${D}${sysconfdir}/pam.d/proftpd
97 sed -i '/ftpusers/d' ${D}${sysconfdir}/pam.d/proftpd
98 # specify the user Authentication config
99 sed -i '/^MaxInstances/a\AuthPAM on\nAuthPAMConfig proftpd' \
100 ${D}${sysconfdir}/proftpd.conf
101 fi
102
103 install -d ${D}/${systemd_unitdir}/system
104 install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system
105 sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
106 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
107 -e 's,@SBINDIR@,${sbindir},g' \
108 -i ${D}${systemd_unitdir}/system/*.service
109
110 sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \
111 -e 's|${STAGING_DIR_NATIVE}||g' \
112 -e 's|-fdebug-prefix-map=[^ ]*||g' \
113 -i ${D}/${bindir}/prxs
114}
115
116INITSCRIPT_NAME = "proftpd"
117INITSCRIPT_PARAM = "defaults 85 15"
118
119SYSTEMD_PACKAGES = "${PN}"
120SYSTEMD_SERVICE_${PN} = "proftpd.service"
121
122USERADD_PACKAGES = "${PN}"
123GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
124USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \
125 --shell /bin/false ${FTPUSER}"
126
127FILES_${PN} += "/home/${FTPUSER}"
128
129RDEPENDS_${PN} += "perl"