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