b32164d5770401dbe82a3a696b4f3d872484182c
[pti/rtp.git] / meta-starlingx / meta-stx-distro / recipes-httpd / lighttpd / lighttpd_%.bbappend
1 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3 SRCREV_FORMAT = "opendev"
4 SRCREV_opendev = "d778e862571957ece3c404c0c37d325769772fde"
5 SUBPATH0 = "lighttpd-config"
6 DSTSUFX0 = "stx-configfiles"
7
8 LICENSE_append = "& Apache-2.0"
9 LIC_FILES_CHKSUM += "\
10         file://stx-configfiles-LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
11         "
12 SRC_URI += " \
13         git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH0};name=opendev \
14         file://lighttpd-init-script-chroot.patch;striplevel=3 \
15         "
16
17 do_unpack_append() {
18     bb.build.exec_func('do_copy_config_files', d)
19 }
20
21 do_copy_config_files () {
22     cp -pf ${WORKDIR}/${DSTSUFX0}/files/LICENSE ${S}/stx-configfiles-LICENSE
23     cp -pf ${WORKDIR}/${DSTSUFX0}/files/lighttpd.init ${S}/lighttpd.init
24 }
25
26 do_install_append () {
27     # remove the symlinks
28     rm ${D}/www/logs
29     rm ${D}/www/var
30
31     # use tmpfile to create dirs
32     install -d ${D}${sysconfdir}/tmpfiles.d/
33     echo "d /www/var 0755 www root -" > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
34     echo "d /www/var/log 0755 www root -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
35
36
37     install -d -m 1777 ${D}/www/tmp
38     install -d ${D}/${sysconfdir}/lighttpd/ssl
39     install -d ${D}/www/pages/dav
40
41     install -d -m755 ${D}/${sysconfdir}/logrotate.d
42
43     install -m755 ${S}/lighttpd.init ${D}/${sysconfdir}/init.d/lighttpd
44
45     install -m640 ${WORKDIR}/${DSTSUFX0}/files/lighttpd.conf          ${D}/${sysconfdir}/lighttpd/lighttpd.conf
46     install -m644 ${WORKDIR}/${DSTSUFX0}/files/lighttpd-inc.conf      ${D}/${sysconfdir}/lighttpd/lighttpd-inc.conf
47     install -m644 ${WORKDIR}/${DSTSUFX0}/files/index.html.lighttpd    ${D}/www/pages/index.html
48     install -m644 ${WORKDIR}/${DSTSUFX0}/files/lighttpd.logrotate    ${D}/${sysconfdir}/logrotate.d/lighttpd
49
50 }
51
52 DISTRO_FEATURES_BACKFILL_CONSIDERED_remove = "sysvinit"