Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Lightweight high-performance web server" |
| 2 | HOMEPAGE = "http://www.lighttpd.net/" |
| 3 | BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues" |
| 4 | |
| 5 | LICENSE = "BSD" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579" |
| 7 | |
| 8 | SECTION = "net" |
| 9 | RDEPENDS_${PN} = "lighttpd-module-dirlisting \ |
| 10 | lighttpd-module-indexfile \ |
| 11 | lighttpd-module-staticfile" |
| 12 | RRECOMMENDS_${PN} = "lighttpd-module-access \ |
| 13 | lighttpd-module-accesslog" |
| 14 | |
| 15 | SRC_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 | |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 22 | SRC_URI[md5sum] = "7abc776243c811e9872f73ab38b7f8b5" |
| 23 | SRC_URI[sha256sum] = "cf14cce2254a96d8fcb6d3181e1a3c29a8f832531c3e86ff6f2524ecda9a8721" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [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[fam] = "--with-fam,--without-fam,gamin" |
| 43 | PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3" |
| 44 | PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux" |
| 45 | PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm" |
| 46 | PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached" |
| 47 | PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1" |
| 48 | |
| 49 | EXTRA_OECONF += "--enable-lfs" |
| 50 | |
| 51 | inherit autotools pkgconfig update-rc.d gettext systemd |
| 52 | |
| 53 | INITSCRIPT_NAME = "lighttpd" |
| 54 | INITSCRIPT_PARAMS = "defaults 70" |
| 55 | |
| 56 | SYSTEMD_SERVICE_${PN} = "lighttpd.service" |
| 57 | |
| 58 | do_install_append() { |
| 59 | install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav |
| 60 | install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d |
| 61 | install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd |
| 62 | install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html |
| 63 | |
| 64 | install -d ${D}${systemd_unitdir}/system |
| 65 | install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_unitdir}/system |
| 66 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ |
| 67 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ |
| 68 | -e 's,@BASE_BINDIR@,${base_bindir},g' \ |
| 69 | ${D}${systemd_unitdir}/system/lighttpd.service |
| 70 | #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data |
| 71 | ln -sf ${localstatedir}/log ${D}/www/logs |
| 72 | ln -sf ${localstatedir}/tmp ${D}/www/var |
| 73 | } |
| 74 | |
| 75 | FILES_${PN} += "${sysconfdir} /www" |
| 76 | |
| 77 | CONFFILES_${PN} = "${sysconfdir}/lighttpd/lighttpd.conf" |
| 78 | |
| 79 | PACKAGES_DYNAMIC += "^lighttpd-module-.*" |
| 80 | |
| 81 | python populate_packages_prepend () { |
| 82 | lighttpd_libdir = d.expand('${libdir}') |
| 83 | do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') |
| 84 | } |