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 \ |
| 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 | " |
| 22 | |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 23 | SRC_URI[sha256sum] = "fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 24 | |
| 25 | PACKAGECONFIG ??= "openssl pcre zlib \ |
| 26 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ |
| 27 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ |
| 28 | " |
| 29 | |
| 30 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" |
| 31 | PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap" |
| 32 | PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev" |
| 33 | PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb" |
| 34 | PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" |
| 35 | PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" |
| 36 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" |
| 37 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" |
| 38 | PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5" |
| 39 | PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre" |
| 40 | PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" |
| 41 | PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2" |
| 42 | PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3" |
| 43 | PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux" |
| 44 | PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm" |
| 45 | PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached" |
| 46 | PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua" |
| 47 | |
| 48 | EXTRA_OECONF += "--enable-lfs --without-fam" |
| 49 | |
| 50 | inherit autotools pkgconfig update-rc.d gettext systemd |
| 51 | |
| 52 | INITSCRIPT_NAME = "lighttpd" |
| 53 | INITSCRIPT_PARAMS = "defaults 70" |
| 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | SYSTEMD_SERVICE:${PN} = "lighttpd.service" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 56 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 57 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 58 | install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav |
| 59 | install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d |
| 60 | install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd |
| 61 | install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html |
| 62 | |
| 63 | install -d ${D}${systemd_unitdir}/system |
| 64 | install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_unitdir}/system |
| 65 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ |
| 66 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ |
| 67 | -e 's,@BASE_BINDIR@,${base_bindir},g' \ |
| 68 | ${D}${systemd_unitdir}/system/lighttpd.service |
| 69 | #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data |
| 70 | ln -sf ${localstatedir}/log ${D}/www/logs |
| 71 | ln -sf ${localstatedir}/tmp ${D}/www/var |
| 72 | } |
| 73 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 74 | FILES:${PN} += "${sysconfdir} /www" |
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 | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 81 | lighttpd_libdir = d.expand('${libdir}') |
| 82 | do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') |
| 83 | } |