blob: a9163f8492111450e19860d8555cdd2324eef5ea [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001SUMMARY = "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://index.html.lighttpd \
18 file://lighttpd.conf \
19 file://lighttpd \
Patrick Williams864cc432023-02-09 14:54:44 -060020 file://fix-missing-test.patch \
Patrick Williams92b42cb2022-09-03 06:53:57 -050021 "
22
Patrick Williams864cc432023-02-09 14:54:44 -060023SRC_URI[sha256sum] = "e56f37ae52b63e1ada4d76ce78005affb6e56eea2f6bdb0ce17d6d36e9583384"
Patrick Williams92b42cb2022-09-03 06:53:57 -050024
25DEPENDS = "virtual/crypt"
26
27PACKAGECONFIG ??= "openssl pcre zlib \
28 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
29"
30
Patrick Williams864cc432023-02-09 14:54:44 -060031PACKAGECONFIG[libev] = "-Dwith_libev=enabled,-Dwith_libev=disabled,libev"
32PACKAGECONFIG[mysql] = "-Dwith_mysql=enabled,-Dwith_mysql=disabled,mariadb"
33PACKAGECONFIG[ldap] = "-Dwith_ldap=enabled,-Dwith_ldap=disabled,openldap"
Patrick Williams92b42cb2022-09-03 06:53:57 -050034PACKAGECONFIG[attr] = "-Dwith_xattr=true,-Dwith_xattr=false,attr"
35PACKAGECONFIG[openssl] = "-Dwith_openssl=true,-Dwith_openssl=false,openssl"
Patrick Williams864cc432023-02-09 14:54:44 -060036PACKAGECONFIG[krb5] = "-Dwith_krb5=enabled,-Dwith_krb5=disabled,krb5"
37PACKAGECONFIG[pcre] = "-Dwith_pcre=pcre2,-Dwith_pcre=disabled,libpcre2"
38PACKAGECONFIG[zlib] = "-Dwith_zlib=enabled,-Dwith_zlib=disabled,zlib"
39PACKAGECONFIG[bzip2] = "-Dwith_bzip=enabled,-Dwith_bzip=disabled,bzip2"
40PACKAGECONFIG[webdav-props] = "-Dwith_webdav_props=enabled,-Dwith_webdav_props=disabled,libxml2 sqlite3"
41PACKAGECONFIG[webdav-locks] = "-Dwith_webdav_locks=enabled,-Dwith_webdav_locks=disabled,util-linux"
Patrick Williams92b42cb2022-09-03 06:53:57 -050042PACKAGECONFIG[lua] = "-Dwith_lua=true,-Dwith_lua=false,lua"
Patrick Williams864cc432023-02-09 14:54:44 -060043PACKAGECONFIG[zstd] = "-Dwith_zstd=enabled,-Dwith_zstd=disabled,zstd"
Patrick Williams92b42cb2022-09-03 06:53:57 -050044
45inherit meson pkgconfig update-rc.d gettext systemd
46
47INITSCRIPT_NAME = "lighttpd"
48INITSCRIPT_PARAMS = "defaults 70"
49
50SYSTEMD_SERVICE:${PN} = "lighttpd.service"
51
52do_install:append() {
53 install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
54 install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
55 install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd
56 install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
57
58 install -d ${D}${systemd_system_unitdir}
59 install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_system_unitdir}
60 sed -i -e 's,@SBINDIR@,${sbindir},g' \
61 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
62 -e 's,@BASE_BINDIR@,${base_bindir},g' \
63 ${D}${systemd_system_unitdir}/lighttpd.service
64 #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
65 ln -sf ${localstatedir}/log ${D}/www/logs
66 ln -sf ${localstatedir}/tmp ${D}/www/var
67}
68
69# bitbake.conf sets ${libdir}/${BPN}/* in FILES, which messes up the module split.
70# So we re-do the variable.
71FILES:${PN} = "${sysconfdir} /www ${sbindir}"
72
73CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
74
75PACKAGES_DYNAMIC += "^lighttpd-module-.*"
76
77python populate_packages:prepend () {
78 lighttpd_libdir = d.expand('${prefix}/lib/lighttpd')
79 do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
80}