Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | SUMMARY = "Lightweight high-performance web server" |
| 2 | HOMEPAGE = "http://www.lighttpd.net/" |
| 3 | DESCRIPTION = "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)" |
| 4 | BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues" |
| 5 | |
| 6 | LICENSE = "BSD-3-Clause" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579" |
| 8 | |
| 9 | SECTION = "net" |
| 10 | RDEPENDS:${PN} = "lighttpd-module-dirlisting \ |
| 11 | lighttpd-module-indexfile \ |
| 12 | lighttpd-module-staticfile" |
| 13 | RRECOMMENDS:${PN} = "lighttpd-module-access \ |
| 14 | lighttpd-module-accesslog" |
| 15 | |
| 16 | SRC_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 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 22 | SRC_URI[sha256sum] = "16ac8db95e719629ba61949b99f8a26feba946a81d185215b28379bb4116b0b4" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 23 | |
| 24 | DEPENDS = "virtual/crypt" |
| 25 | |
| 26 | PACKAGECONFIG ??= "openssl pcre zlib \ |
| 27 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ |
| 28 | " |
| 29 | |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 30 | PACKAGECONFIG[libev] = "-Dwith_libev=enabled,-Dwith_libev=disabled,libev" |
| 31 | PACKAGECONFIG[mysql] = "-Dwith_mysql=enabled,-Dwith_mysql=disabled,mariadb" |
| 32 | PACKAGECONFIG[ldap] = "-Dwith_ldap=enabled,-Dwith_ldap=disabled,openldap" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 33 | PACKAGECONFIG[attr] = "-Dwith_xattr=true,-Dwith_xattr=false,attr" |
| 34 | PACKAGECONFIG[openssl] = "-Dwith_openssl=true,-Dwith_openssl=false,openssl" |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 35 | PACKAGECONFIG[krb5] = "-Dwith_krb5=enabled,-Dwith_krb5=disabled,krb5" |
| 36 | PACKAGECONFIG[pcre] = "-Dwith_pcre=pcre2,-Dwith_pcre=disabled,libpcre2" |
| 37 | PACKAGECONFIG[zlib] = "-Dwith_zlib=enabled,-Dwith_zlib=disabled,zlib" |
| 38 | PACKAGECONFIG[bzip2] = "-Dwith_bzip=enabled,-Dwith_bzip=disabled,bzip2" |
| 39 | PACKAGECONFIG[webdav-props] = "-Dwith_webdav_props=enabled,-Dwith_webdav_props=disabled,libxml2 sqlite3" |
| 40 | PACKAGECONFIG[webdav-locks] = "-Dwith_webdav_locks=enabled,-Dwith_webdav_locks=disabled,util-linux" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 41 | PACKAGECONFIG[lua] = "-Dwith_lua=true,-Dwith_lua=false,lua" |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 42 | PACKAGECONFIG[zstd] = "-Dwith_zstd=enabled,-Dwith_zstd=disabled,zstd" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 43 | |
| 44 | inherit meson pkgconfig update-rc.d gettext systemd |
| 45 | |
| 46 | INITSCRIPT_NAME = "lighttpd" |
| 47 | INITSCRIPT_PARAMS = "defaults 70" |
| 48 | |
| 49 | SYSTEMD_SERVICE:${PN} = "lighttpd.service" |
| 50 | |
| 51 | do_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. |
| 70 | FILES:${PN} = "${sysconfdir} /www ${sbindir}" |
| 71 | |
| 72 | CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf" |
| 73 | |
| 74 | PACKAGES_DYNAMIC += "^lighttpd-module-.*" |
| 75 | |
| 76 | python 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 | } |