checksums.ini: fix writenfi-mipsel-2.6.18-r1 checksum
[vuplus_openembedded] / recipes / vsftpd / vsftpd_2.0.5.bb
1 DESCRIPTION = "Secure ftp daemon"
2 SECTION = "console/network"
3 LICENSE = "GPL"
4 PR = "r3"
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_compile() {
29         oe_runmake "LIBS=-lcrypt -L${STAGING_LIBDIR}"
30 }
31
32 do_install() {
33         install -d ${D}${sbindir}
34         install -d ${D}${mandir}/man8
35         install -d ${D}${mandir}/man5
36         oe_runmake 'DESTDIR=${D}' install
37         install -d ${D}${sysconfdir}
38         install -m 0755 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf
39         install -d ${D}${sysconfdir}/init.d/
40         install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd
41 }
42
43 pkg_postinst() {
44         addgroup ftp
45         adduser --system --home /var/lib/ftp --no-create-home --ingroup ftp --disabled-password -s /bin/false ftp
46         mkdir -p ${D}${localstatedir}/share/empty
47 }
48
49 INITSCRIPT_NAME = "vsftpd"
50
51 INITSCRIPT_PARAMS = "defaults"