diff options
Diffstat (limited to 'meta/recipes-extended/logrotate/logrotate_3.8.8.bb')
| -rw-r--r-- | meta/recipes-extended/logrotate/logrotate_3.8.8.bb | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.8.bb b/meta/recipes-extended/logrotate/logrotate_3.8.8.bb new file mode 100644 index 0000000000..00432dede2 --- /dev/null +++ b/meta/recipes-extended/logrotate/logrotate_3.8.8.bb | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | SUMMARY = "Rotates, compresses, removes and mails system log files" | ||
| 2 | SECTION = "console/utils" | ||
| 3 | HOMEPAGE = "https://fedorahosted.org/logrotate/" | ||
| 4 | LICENSE = "GPLv2" | ||
| 5 | |||
| 6 | # TODO: logrotate 3.8.8 adds autotools/automake support, update recipe to use it. | ||
| 7 | # TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox? | ||
| 8 | |||
| 9 | DEPENDS="coreutils popt" | ||
| 10 | |||
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" | ||
| 12 | |||
| 13 | SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \ | ||
| 14 | file://act-as-mv-when-rotate.patch \ | ||
| 15 | file://update-the-manual.patch \ | ||
| 16 | file://disable-check-different-filesystems.patch \ | ||
| 17 | " | ||
| 18 | |||
| 19 | SRC_URI[md5sum] = "49846e873dddea15964cd0355b9943ca" | ||
| 20 | SRC_URI[sha256sum] = "46a1510ef4a1f4359edd5f361112cfd1523942e85ff28e6cbb0c81bad1829d0f" | ||
| 21 | |||
| 22 | PACKAGECONFIG ?= "\ | ||
| 23 | ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ | ||
| 24 | ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ | ||
| 25 | " | ||
| 26 | |||
| 27 | PACKAGECONFIG[acl] = ",,acl" | ||
| 28 | PACKAGECONFIG[selinux] = ",,libselinux" | ||
| 29 | |||
| 30 | # If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our | ||
| 31 | # optimization variables, so use it rather than EXTRA_CFLAGS. | ||
| 32 | EXTRA_OEMAKE = "\ | ||
| 33 | LFS= \ | ||
| 34 | OS_NAME='${OS_NAME}' \ | ||
| 35 | \ | ||
| 36 | 'CC=${CC}' \ | ||
| 37 | 'RPM_OPT_FLAGS=${CFLAGS}' \ | ||
| 38 | 'EXTRA_LDFLAGS=${LDFLAGS}' \ | ||
| 39 | \ | ||
| 40 | ${@base_contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \ | ||
| 41 | ${@base_contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \ | ||
| 42 | " | ||
| 43 | |||
| 44 | # OS_NAME in the makefile defaults to `uname -s`. The behavior for | ||
| 45 | # freebsd/netbsd is questionable, so leave it as Linux, which only sets | ||
| 46 | # INSTALL=install and BASEDIR=/usr. | ||
| 47 | OS_NAME = "Linux" | ||
| 48 | |||
| 49 | do_compile_prepend() { | ||
| 50 | # Make sure the recompile is OK | ||
| 51 | rm -f ${B}/.depend | ||
| 52 | } | ||
| 53 | |||
| 54 | do_install(){ | ||
| 55 | oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} BINDIR=${bindir} | ||
| 56 | mkdir -p ${D}${sysconfdir}/logrotate.d | ||
| 57 | mkdir -p ${D}${sysconfdir}/cron.daily | ||
| 58 | mkdir -p ${D}${localstatedir}/lib | ||
| 59 | install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf | ||
| 60 | install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate | ||
| 61 | touch ${D}${localstatedir}/lib/logrotate.status | ||
| 62 | } | ||
