blob: 97d3a2aabf4f5e018e05dde4e4415b6b17cc20ae [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Lightweight high-performance web server"
2HOMEPAGE = "http://www.lighttpd.net/"
3BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
4
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
7
8SECTION = "net"
9RDEPENDS_${PN} = "lighttpd-module-dirlisting \
10 lighttpd-module-indexfile \
11 lighttpd-module-staticfile"
12RRECOMMENDS_${PN} = "lighttpd-module-access \
13 lighttpd-module-accesslog"
14
15SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
16 file://index.html.lighttpd \
17 file://lighttpd.conf \
18 file://lighttpd \
19 file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
20 "
21
Andrew Geissler706d5aa2021-02-12 15:55:30 -060022SRC_URI[md5sum] = "9d94f68c8106bfcdfe7aafa0a13f45a8"
23SRC_URI[sha256sum] = "e4ce84cd79e8ae8ba193c7a7cc79c4afba9a076b443ef9f8d4bcd13a3354df77"
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
55SYSTEMD_SERVICE_${PN} = "lighttpd.service"
56
57do_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
74FILES_${PN} += "${sysconfdir} /www"
75
76CONFFILES_${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
77
78PACKAGES_DYNAMIC += "^lighttpd-module-.*"
79
80python 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}