diff options
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.bb | 129 |
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 @@ | |||
1 | SUMMARY = "Secure and configurable FTP server" | ||
2 | SECTION = "net" | ||
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 | file://proftpd.service \ | ||
15 | " | ||
16 | |||
17 | SRC_URI[md5sum] = "f7b8e3a383b34a894c2502db74ccccde" | ||
18 | SRC_URI[sha256sum] = "afc1789f2478acf88dfdc7d70da90a4fa2786d628218e9574273295d044b4fc8" | ||
19 | |||
20 | inherit autotools-brokensep useradd update-rc.d systemd | ||
21 | |||
22 | PACKAGECONFIG ??= "shadow \ | ||
23 | ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ | ||
24 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ | ||
25 | " | ||
26 | |||
27 | PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses" | ||
28 | PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl" | ||
29 | PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam" | ||
30 | PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6" | ||
31 | PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow" | ||
32 | PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre " | ||
33 | |||
34 | # enable POSIX.1e capabilities | ||
35 | PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap" | ||
36 | |||
37 | #enable support for POSIX ACLs | ||
38 | PACKAGECONFIG[acl] = "--enable-facl, --disable-facl" | ||
39 | |||
40 | #enable proftpd controls via ftpdct | ||
41 | PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls" | ||
42 | |||
43 | #prevent proftpd from using its bundled getopt implementation. | ||
44 | PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt" | ||
45 | |||
46 | #do not strip debugging symbols from installed code | ||
47 | PACKAGECONFIG[strip] = "--enable-strip, --disable-strip" | ||
48 | |||
49 | #enable SIA authentication support (Tru64) | ||
50 | PACKAGECONFIG[sia] = "--enable-sia, --disable-sia" | ||
51 | PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile" | ||
52 | |||
53 | #enable Native Language Support (NLS) | ||
54 | PACKAGECONFIG[nls] = "--enable-nls, --disable-nls" | ||
55 | |||
56 | #add mod_dso to core modules | ||
57 | PACKAGECONFIG[dso] = "--enable-dso, --disable-dso" | ||
58 | PACKAGECONFIG[largefile] = "--enable-largefile, --disable-largefile" | ||
59 | |||
60 | #omit mod_auth_file from core modules | ||
61 | PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file" | ||
62 | |||
63 | |||
64 | # proftpd uses libltdl which currently makes configuring using | ||
65 | # autotools.bbclass a pain... | ||
66 | do_configure () { | ||
67 | oe_runconf | ||
68 | cp ${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool ${S}/libtool | ||
69 | } | ||
70 | |||
71 | FTPUSER = "ftp" | ||
72 | FTPGROUP = "ftp" | ||
73 | |||
74 | do_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 | |||
116 | INITSCRIPT_NAME = "proftpd" | ||
117 | INITSCRIPT_PARAM = "defaults 85 15" | ||
118 | |||
119 | SYSTEMD_PACKAGES = "${PN}" | ||
120 | SYSTEMD_SERVICE_${PN} = "proftpd.service" | ||
121 | |||
122 | USERADD_PACKAGES = "${PN}" | ||
123 | GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}" | ||
124 | USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \ | ||
125 | --shell /bin/false ${FTPUSER}" | ||
126 | |||
127 | FILES_${PN} += "/home/${FTPUSER}" | ||
128 | |||
129 | RDEPENDS_${PN} += "perl" | ||