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" |
| 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 | 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 | |
| 55 | SYSTEMD_SERVICE_${PN} = "lighttpd.service" |
| 56 | |
| 57 | do_install_append() { |
| 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 | |
| 74 | FILES_${PN} += "${sysconfdir} /www" |
| 75 | |
| 76 | CONFFILES_${PN} = "${sysconfdir}/lighttpd/lighttpd.conf" |
| 77 | |
| 78 | PACKAGES_DYNAMIC += "^lighttpd-module-.*" |
| 79 | |
| 80 | python populate_packages_prepend () { |
| 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 | } |