summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/logrotate/logrotate_3.8.9.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/logrotate/logrotate_3.8.9.bb')
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.8.9.bb62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.9.bb b/meta/recipes-extended/logrotate/logrotate_3.8.9.bb
new file mode 100644
index 0000000000..8611a3e8a5
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.9.bb
@@ -0,0 +1,62 @@
1SUMMARY = "Rotates, compresses, removes and mails system log files"
2SECTION = "console/utils"
3HOMEPAGE = "https://fedorahosted.org/logrotate/"
4LICENSE = "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
9DEPENDS="coreutils popt"
10
11LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
12
13SRC_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
19SRC_URI[md5sum] = "2660f30742da79870d15d042b07829f6"
20SRC_URI[sha256sum] = "700ed7ce9072a1cca324779a74797dfaefdae37ac50a817134b947c4ded1dfa7"
21
22PACKAGECONFIG ?= "\
23 ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
24 ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
25"
26
27PACKAGECONFIG[acl] = ",,acl"
28PACKAGECONFIG[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.
32EXTRA_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.
47OS_NAME = "Linux"
48
49do_compile_prepend() {
50 # Make sure the recompile is OK
51 rm -f ${B}/.depend
52}
53
54do_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}