fix included modules.
[vuplus_openembedded] / recipes / vsftpd / vsftpd_2.0.5.bb
1 DESCRIPTION = "Secure ftp daemon"
2 SECTION = "console/network"
3 LICENSE = "GPL"
4 PR = "r5"
5
6 SRC_URI = "ftp://vsftpd.beasts.org/users/cevans/vsftpd-${PV}.tar.gz \
7            file://makefile.patch;patch=1 \
8            file://nopam.patch;patch=1 \
9            file://syscall.patch;patch=1 \
10            file://init \
11            file://vsftpd.conf"
12
13 inherit update-rc.d
14
15 do_configure() {
16         # Fix hardcoded /usr, /etc, /var mess.
17         cat tunables.c|sed s:\"/usr:\"${prefix}:g|sed s:\"/var:\"${localstatedir}:g \
18         |sed s:\"${prefix}/share/empty:\"${localstatedir}/share/empty:g |sed s:\"/etc:\"${sysconfdir}:g > tunables.c.new
19         mv tunables.c.new tunables.c
20 }
21
22 do_configure_append_opendreambox() {
23         # do not link against libcap
24         sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c
25         sed -i '/libcap/ d' vsf_findlibs.sh
26 }
27
28 do_configure_append_vuplus() {
29         # do not link against libcap
30         sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c
31         sed -i '/libcap/ d' vsf_findlibs.sh
32 }
33
34 do_compile() {
35         oe_runmake "LIBS=-lcrypt -L${STAGING_LIBDIR}"
36 }
37
38 do_install() {
39         install -d ${D}${sbindir}
40         install -d ${D}${mandir}/man8
41         install -d ${D}${mandir}/man5
42         oe_runmake 'DESTDIR=${D}' install
43         install -d ${D}${sysconfdir}
44         install -m 0755 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf
45         install -d ${D}${sysconfdir}/init.d/
46         install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd
47 }
48
49 pkg_postinst() {
50         if [ "x$D" != "x" ]; then
51                 exit 1
52         fi
53         addgroup ftp
54         adduser --system --home /var/lib/ftp --no-create-home --ingroup ftp --disabled-password -s /bin/false ftp
55         mkdir -p ${localstatedir}/share/empty
56 }
57
58 INITSCRIPT_NAME = "vsftpd"
59
60 INITSCRIPT_PARAMS = "defaults"