blob: f97c5913b8c0e02131cfec135ee4f69b106cf4bc [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Lightweight high-performance web server"
2HOMEPAGE = "http://www.lighttpd.net/"
Andrew Geissler95ac1b82021-03-31 14:34:31 -05003DESCRIPTION = "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 Geissler82c905d2020-04-13 13:39:40 -05004BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
5
6LICENSE = "BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
8
9SECTION = "net"
Patrick Williams213cb262021-08-07 19:21:33 -050010RDEPENDS:${PN} = "lighttpd-module-dirlisting \
Andrew Geissler82c905d2020-04-13 13:39:40 -050011 lighttpd-module-indexfile \
12 lighttpd-module-staticfile"
Patrick Williams213cb262021-08-07 19:21:33 -050013RRECOMMENDS:${PN} = "lighttpd-module-access \
Andrew Geissler82c905d2020-04-13 13:39:40 -050014 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 "
22
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060023SRC_URI[sha256sum] = "fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5"
Andrew Geissler82c905d2020-04-13 13:39:40 -050024
25PACKAGECONFIG ??= "openssl pcre zlib \
26 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
27 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
28"
29
30PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
31PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
32PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
33PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
34PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
35PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
36PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
37PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
38PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
39PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
40PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
41PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
42PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
43PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux"
44PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
45PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
46PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua"
47
48EXTRA_OECONF += "--enable-lfs --without-fam"
49
50inherit autotools pkgconfig update-rc.d gettext systemd
51
52INITSCRIPT_NAME = "lighttpd"
53INITSCRIPT_PARAMS = "defaults 70"
54
Patrick Williams213cb262021-08-07 19:21:33 -050055SYSTEMD_SERVICE:${PN} = "lighttpd.service"
Andrew Geissler82c905d2020-04-13 13:39:40 -050056
Patrick Williams213cb262021-08-07 19:21:33 -050057do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050058 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 Williams213cb262021-08-07 19:21:33 -050074FILES:${PN} += "${sysconfdir} /www"
Andrew Geissler82c905d2020-04-13 13:39:40 -050075
Patrick Williams213cb262021-08-07 19:21:33 -050076CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
Andrew Geissler82c905d2020-04-13 13:39:40 -050077
78PACKAGES_DYNAMIC += "^lighttpd-module-.*"
79
Patrick Williams213cb262021-08-07 19:21:33 -050080python populate_packages:prepend () {
Andrew Geissler82c905d2020-04-13 13:39:40 -050081 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}