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