blob: 6359310772b2901058e1a5dab6173809068a7fc2 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "Lightweight high-performance web server"
2HOMEPAGE = "http://www.lighttpd.net/"
3DESCRIPTION = "Lightweight high-performance web server is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more)"
4BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
5
6LICENSE = "BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
8
9SECTION = "net"
10RDEPENDS:${PN} = "lighttpd-module-dirlisting \
11 lighttpd-module-indexfile \
12 lighttpd-module-staticfile"
13RRECOMMENDS:${PN} = "lighttpd-module-access \
14 lighttpd-module-accesslog"
15
16SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
17 file://0001-mod_extforward-fix-out-of-bounds-OOB-write-fixes-313.patch \
18 file://index.html.lighttpd \
19 file://lighttpd.conf \
20 file://lighttpd \
21 "
22
23SRC_URI[sha256sum] = "2aef7f0102ebf54a1241a1c3ea8976892f8684bfb21697c9fffb8de0e2d6eab9"
24
25DEPENDS = "virtual/crypt"
26
27PACKAGECONFIG ??= "openssl pcre zlib \
28 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
29"
30
31PACKAGECONFIG[libev] = "-Dwith_libev=true,-Dwith_libev=false,libev"
32PACKAGECONFIG[mysql] = "-Dwith_mysql=true,-Dwith_mysql=false,mariadb"
33PACKAGECONFIG[ldap] = "-Dwith_ldap=true,-Dwith_ldap=false,openldap"
34PACKAGECONFIG[attr] = "-Dwith_xattr=true,-Dwith_xattr=false,attr"
35PACKAGECONFIG[openssl] = "-Dwith_openssl=true,-Dwith_openssl=false,openssl"
36PACKAGECONFIG[krb5] = "-Dwith_krb5=true,-Dwith_krb5=false,krb5"
37PACKAGECONFIG[pcre] = "-Dwith_pcre=true,-Dwith_pcre=false,libpcre"
38PACKAGECONFIG[zlib] = "-Dwith_zlib=true,-Dwith_zlib=false,zlib"
39PACKAGECONFIG[bzip2] = "-Dwith_bzip=true,-Dwith_bzip=false,bzip2"
40PACKAGECONFIG[webdav-props] = "-Dwith_webdav_props=true,-Dwith_webdav_props=false,libxml2 sqlite3"
41PACKAGECONFIG[webdav-locks] = "-Dwith_webdav_locks=true,-Dwith_webdav_locks=false,util-linux"
42PACKAGECONFIG[gdbm] = "-Dwith_gdbm=true,-Dwith_gdbm=false,gdbm"
43PACKAGECONFIG[memcache] = "-Dwith_memcached=true,-Dwith_memcached=false,libmemcached"
44PACKAGECONFIG[lua] = "-Dwith_lua=true,-Dwith_lua=false,lua"
45PACKAGECONFIG[zstd] = "-Dwith_zstd=true,-Dwith_zstd=false,zstd"
46
47inherit meson pkgconfig update-rc.d gettext systemd
48
49INITSCRIPT_NAME = "lighttpd"
50INITSCRIPT_PARAMS = "defaults 70"
51
52SYSTEMD_SERVICE:${PN} = "lighttpd.service"
53
54do_install:append() {
55 install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
56 install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
57 install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd
58 install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
59
60 install -d ${D}${systemd_system_unitdir}
61 install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_system_unitdir}
62 sed -i -e 's,@SBINDIR@,${sbindir},g' \
63 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
64 -e 's,@BASE_BINDIR@,${base_bindir},g' \
65 ${D}${systemd_system_unitdir}/lighttpd.service
66 #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
67 ln -sf ${localstatedir}/log ${D}/www/logs
68 ln -sf ${localstatedir}/tmp ${D}/www/var
69}
70
71# bitbake.conf sets ${libdir}/${BPN}/* in FILES, which messes up the module split.
72# So we re-do the variable.
73FILES:${PN} = "${sysconfdir} /www ${sbindir}"
74
75CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
76
77PACKAGES_DYNAMIC += "^lighttpd-module-.*"
78
79python populate_packages:prepend () {
80 lighttpd_libdir = d.expand('${prefix}/lib/lighttpd')
81 do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
82}