blob: 705ece8e19e5099c4808ef69311bd139bb6452c9 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Lightweight high-performance web server"
2HOMEPAGE = "http://www.lighttpd.net/"
3BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
4
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
7
8SECTION = "net"
9RDEPENDS_${PN} = "lighttpd-module-dirlisting \
10 lighttpd-module-indexfile \
11 lighttpd-module-staticfile"
12RRECOMMENDS_${PN} = "lighttpd-module-access \
13 lighttpd-module-accesslog"
14
15SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
16 file://index.html.lighttpd \
17 file://lighttpd.conf \
18 file://lighttpd \
19 file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
20 "
21
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060022SRC_URI[sha256sum] = "fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5"
Andrew Geissler82c905d2020-04-13 13:39:40 -050023
24PACKAGECONFIG ??= "openssl pcre zlib \
25 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
27"
28
29PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
30PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
31PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
32PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
33PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
34PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
35PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
36PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
37PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
38PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
39PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
40PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
41PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
42PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux"
43PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
44PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
45PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua"
46
47EXTRA_OECONF += "--enable-lfs --without-fam"
48
49inherit autotools pkgconfig update-rc.d gettext systemd
50
51INITSCRIPT_NAME = "lighttpd"
52INITSCRIPT_PARAMS = "defaults 70"
53
54SYSTEMD_SERVICE_${PN} = "lighttpd.service"
55
56do_install_append() {
57 install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
58 install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
59 install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd
60 install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
61
62 install -d ${D}${systemd_unitdir}/system
63 install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_unitdir}/system
64 sed -i -e 's,@SBINDIR@,${sbindir},g' \
65 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
66 -e 's,@BASE_BINDIR@,${base_bindir},g' \
67 ${D}${systemd_unitdir}/system/lighttpd.service
68 #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
69 ln -sf ${localstatedir}/log ${D}/www/logs
70 ln -sf ${localstatedir}/tmp ${D}/www/var
71}
72
73FILES_${PN} += "${sysconfdir} /www"
74
75CONFFILES_${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
76
77PACKAGES_DYNAMIC += "^lighttpd-module-.*"
78
79python populate_packages_prepend () {
80 lighttpd_libdir = d.expand('${libdir}')
81 do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
82}