1*4882a593SmuzhiyunSUMMARY = "Lightweight high-performance web server" 2*4882a593SmuzhiyunHOMEPAGE = "http://www.lighttpd.net/" 3*4882a593SmuzhiyunDESCRIPTION = "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)" 4*4882a593SmuzhiyunBUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues" 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunLICENSE = "BSD-3-Clause" 7*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579" 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunSECTION = "net" 10*4882a593SmuzhiyunRDEPENDS:${PN} = "lighttpd-module-dirlisting \ 11*4882a593Smuzhiyun lighttpd-module-indexfile \ 12*4882a593Smuzhiyun lighttpd-module-staticfile" 13*4882a593SmuzhiyunRRECOMMENDS:${PN} = "lighttpd-module-access \ 14*4882a593Smuzhiyun lighttpd-module-accesslog" 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunSRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \ 17*4882a593Smuzhiyun file://index.html.lighttpd \ 18*4882a593Smuzhiyun file://lighttpd.conf \ 19*4882a593Smuzhiyun file://lighttpd \ 20*4882a593Smuzhiyun " 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunSRC_URI[sha256sum] = "7e04d767f51a8d824b32e2483ef2950982920d427d1272ef4667f49d6f89f358" 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunDEPENDS = "virtual/crypt" 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunPACKAGECONFIG ??= "openssl pcre zlib \ 27*4882a593Smuzhiyun ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ 28*4882a593Smuzhiyun" 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunPACKAGECONFIG[libev] = "-Dwith_libev=true,-Dwith_libev=false,libev" 31*4882a593SmuzhiyunPACKAGECONFIG[mysql] = "-Dwith_mysql=true,-Dwith_mysql=false,mariadb" 32*4882a593SmuzhiyunPACKAGECONFIG[ldap] = "-Dwith_ldap=true,-Dwith_ldap=false,openldap" 33*4882a593SmuzhiyunPACKAGECONFIG[attr] = "-Dwith_xattr=true,-Dwith_xattr=false,attr" 34*4882a593SmuzhiyunPACKAGECONFIG[openssl] = "-Dwith_openssl=true,-Dwith_openssl=false,openssl" 35*4882a593SmuzhiyunPACKAGECONFIG[krb5] = "-Dwith_krb5=true,-Dwith_krb5=false,krb5" 36*4882a593SmuzhiyunPACKAGECONFIG[pcre] = "-Dwith_pcre=true,-Dwith_pcre=false,libpcre" 37*4882a593SmuzhiyunPACKAGECONFIG[zlib] = "-Dwith_zlib=true,-Dwith_zlib=false,zlib" 38*4882a593SmuzhiyunPACKAGECONFIG[bzip2] = "-Dwith_bzip=true,-Dwith_bzip=false,bzip2" 39*4882a593SmuzhiyunPACKAGECONFIG[webdav-props] = "-Dwith_webdav_props=true,-Dwith_webdav_props=false,libxml2 sqlite3" 40*4882a593SmuzhiyunPACKAGECONFIG[webdav-locks] = "-Dwith_webdav_locks=true,-Dwith_webdav_locks=false,util-linux" 41*4882a593SmuzhiyunPACKAGECONFIG[lua] = "-Dwith_lua=true,-Dwith_lua=false,lua" 42*4882a593SmuzhiyunPACKAGECONFIG[zstd] = "-Dwith_zstd=true,-Dwith_zstd=false,zstd" 43*4882a593Smuzhiyun 44*4882a593Smuzhiyuninherit meson pkgconfig update-rc.d gettext systemd 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunINITSCRIPT_NAME = "lighttpd" 47*4882a593SmuzhiyunINITSCRIPT_PARAMS = "defaults 70" 48*4882a593Smuzhiyun 49*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "lighttpd.service" 50*4882a593Smuzhiyun 51*4882a593Smuzhiyundo_install:append() { 52*4882a593Smuzhiyun install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav 53*4882a593Smuzhiyun install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d 54*4882a593Smuzhiyun install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd 55*4882a593Smuzhiyun install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun install -d ${D}${systemd_system_unitdir} 58*4882a593Smuzhiyun install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_system_unitdir} 59*4882a593Smuzhiyun sed -i -e 's,@SBINDIR@,${sbindir},g' \ 60*4882a593Smuzhiyun -e 's,@SYSCONFDIR@,${sysconfdir},g' \ 61*4882a593Smuzhiyun -e 's,@BASE_BINDIR@,${base_bindir},g' \ 62*4882a593Smuzhiyun ${D}${systemd_system_unitdir}/lighttpd.service 63*4882a593Smuzhiyun #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data 64*4882a593Smuzhiyun ln -sf ${localstatedir}/log ${D}/www/logs 65*4882a593Smuzhiyun ln -sf ${localstatedir}/tmp ${D}/www/var 66*4882a593Smuzhiyun} 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun# bitbake.conf sets ${libdir}/${BPN}/* in FILES, which messes up the module split. 69*4882a593Smuzhiyun# So we re-do the variable. 70*4882a593SmuzhiyunFILES:${PN} = "${sysconfdir} /www ${sbindir}" 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunCONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf" 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunPACKAGES_DYNAMIC += "^lighttpd-module-.*" 75*4882a593Smuzhiyun 76*4882a593Smuzhiyunpython populate_packages:prepend () { 77*4882a593Smuzhiyun lighttpd_libdir = d.expand('${prefix}/lib/lighttpd') 78*4882a593Smuzhiyun do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') 79*4882a593Smuzhiyun} 80