Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Lightweight high-performance web server" |
| 2 | HOMEPAGE = "http://www.lighttpd.net/" |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 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)" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 10 | RDEPENDS:${PN} = "lighttpd-module-dirlisting \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | lighttpd-module-indexfile \ |
| 12 | lighttpd-module-staticfile" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 13 | RRECOMMENDS:${PN} = "lighttpd-module-access \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | lighttpd-module-accesslog" |
| 15 | |
| 16 | SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \ |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 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://0001-meson-add-with_zstd-to-meson_options.txt.patch \ |
| 22 | " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 23 | |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 24 | SRC_URI[sha256sum] = "fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 26 | DEPENDS = "virtual/crypt" |
| 27 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 28 | PACKAGECONFIG ??= "openssl pcre zlib \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ |
| 30 | " |
| 31 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 32 | PACKAGECONFIG[libev] = "-Dwith_libev=true,-Dwith_libev=false,libev" |
| 33 | PACKAGECONFIG[mysql] = "-Dwith_mysql=true,-Dwith_mysql=false,mariadb" |
| 34 | PACKAGECONFIG[ldap] = "-Dwith_ldap=true,-Dwith_ldap=false,openldap" |
| 35 | PACKAGECONFIG[attr] = "-Dwith_xattr=true,-Dwith_xattr=false,attr" |
| 36 | PACKAGECONFIG[openssl] = "-Dwith_openssl=true,-Dwith_openssl=false,openssl" |
| 37 | PACKAGECONFIG[krb5] = "-Dwith_krb5=true,-Dwith_krb5=false,krb5" |
| 38 | PACKAGECONFIG[pcre] = "-Dwith_pcre=true,-Dwith_pcre=false,libpcre" |
| 39 | PACKAGECONFIG[zlib] = "-Dwith_zlib=true,-Dwith_zlib=false,zlib" |
| 40 | PACKAGECONFIG[bzip2] = "-Dwith_bzip=true,-Dwith_bzip=false,bzip2" |
| 41 | PACKAGECONFIG[webdav-props] = "-Dwith_webdav_props=true,-Dwith_webdav_props=false,libxml2 sqlite3" |
| 42 | PACKAGECONFIG[webdav-locks] = "-Dwith_webdav_locks=true,-Dwith_webdav_locks=false,util-linux" |
| 43 | PACKAGECONFIG[gdbm] = "-Dwith_gdbm=true,-Dwith_gdbm=false,gdbm" |
| 44 | PACKAGECONFIG[memcache] = "-Dwith_memcached=true,-Dwith_memcached=false,libmemcached" |
| 45 | PACKAGECONFIG[lua] = "-Dwith_lua=true,-Dwith_lua=false,lua" |
| 46 | PACKAGECONFIG[zstd] = "-Dwith_zstd=true,-Dwith_zstd=false,zstd" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 47 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 48 | inherit meson pkgconfig update-rc.d gettext systemd |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 49 | |
| 50 | INITSCRIPT_NAME = "lighttpd" |
| 51 | INITSCRIPT_PARAMS = "defaults 70" |
| 52 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | SYSTEMD_SERVICE:${PN} = "lighttpd.service" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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_unitdir}/system |
| 62 | install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_unitdir}/system |
| 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_unitdir}/system/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 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 72 | # bitbake.conf sets ${libdir}/${BPN}/* in FILES, which messes up the module split. |
| 73 | # So we re-do the variable. |
| 74 | FILES:${PN} = "${sysconfdir} /www ${sbindir}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 75 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 76 | CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 77 | |
| 78 | PACKAGES_DYNAMIC += "^lighttpd-module-.*" |
| 79 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 80 | python populate_packages:prepend () { |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 81 | lighttpd_libdir = d.expand('${prefix}/lib/lighttpd') |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 82 | do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') |
| 83 | } |