blob: 3c4444cf4239131b482e042bbd8b416d53342354 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Lightweight high-performance web server"
2HOMEPAGE = "http://www.lighttpd.net/"
3BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
4
5LICENSE = "BSD"
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://lighttpd.service \
20 file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
21 "
22
23SRC_URI[md5sum] = "1e3a9eb5078f481e3a8a1d0aaac8c3c8"
24SRC_URI[sha256sum] = "0f8ad5aac7529d7b948b9d7e8cd0b4a9e177309d85d6bf6516e28e6e40d74f36"
25
26PACKAGECONFIG ??= "openssl pcre zlib \
27 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
28 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
29"
30
31PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
32PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
33PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
34PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
35PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
36PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
37PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
38PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
39PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
40PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
41PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
42PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
43PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
44PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
45PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux"
46PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
47PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
48PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1"
49
50EXTRA_OECONF += "--enable-lfs"
51
52inherit autotools pkgconfig update-rc.d gettext systemd
53
54INITSCRIPT_NAME = "lighttpd"
55INITSCRIPT_PARAMS = "defaults 70"
56
57SYSTEMD_SERVICE_${PN} = "lighttpd.service"
58
59do_install_append() {
60 install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
61 install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
62 install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
63 install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
64
65 install -d ${D}${systemd_unitdir}/system
66 install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
67 sed -i -e 's,@SBINDIR@,${sbindir},g' \
68 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
69 -e 's,@BASE_BINDIR@,${base_bindir},g' \
70 ${D}${systemd_unitdir}/system/lighttpd.service
71 #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
72 ln -sf ${localstatedir}/log ${D}/www/logs
73 ln -sf ${localstatedir}/tmp ${D}/www/var
74}
75
76FILES_${PN} += "${sysconfdir} /www"
77
78CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
79
80PACKAGES_DYNAMIC += "^lighttpd-module-.*"
81
82python populate_packages_prepend () {
83 lighttpd_libdir = d.expand('${libdir}')
84 do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
85}