faf2b7f99dfd5b2f756d1cd07988c28e43af6bd1
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-extended / logrotate / logrotate_%.bbappend
1 SRCREV_FORMAT = "opendev"
2 SRCREV_opendev = "d778e862571957ece3c404c0c37d325769772fde"
3 SUBPATH0 = "logrotate-config"
4 DSTSUFX0 = "stx-configfiles"
5
6 LICENSE_append = "& Apache-2.0"
7 LIC_FILES_CHKSUM += "\
8         file://stx-configfiles-LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
9         "
10
11 SRC_URI += " \
12         git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH0};name=opendev \
13 "
14
15 RDEPENDS_${PN}_append = " cronie"
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 }
24
25 do_install_append() {
26     install -d -m0755 ${D}/${sysconfdir}/cron.d/
27     install -m 644 ${WORKDIR}/${DSTSUFX0}/files/logrotate-cron.d ${D}/${sysconfdir}/cron.d/logrotate
28     install -m 644 ${WORKDIR}/${DSTSUFX0}/files/logrotate.conf ${D}/${sysconfdir}/logrotate.conf
29     #mv ${D}/${sysconfdir}/cron.daily/logrotate ${D}/${sysconfdir}/logrotate.cron
30     #chmod 700 ${D}/${sysconfdir}/logrotate.cron
31 }
32