Annotation of /trunk/core/logrotate/logrotate-3.14.0-r1.smage2
Parent Directory | Revision Log
Revision 30726 -
(hide annotations)
(download)
Thu Mar 22 13:00:42 2018 UTC (6 years, 6 months ago) by niro
File size: 1679 byte(s)
Thu Mar 22 13:00:42 2018 UTC (6 years, 6 months ago) by niro
File size: 1679 byte(s)
auto added: ver bump to 3.14.0-r1
1 | niro | 30726 | # $Id$ |
2 | |||
3 | PNAME="logrotate" | ||
4 | PVER="3.14.0" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="app-admin" | ||
8 | |||
9 | DESCRIPTION="Rotates, compresses, removes and mails system log files." | ||
10 | HOMEPAGE="https://github.com/logrotate/logrotate/" | ||
11 | |||
12 | DEPEND=">= virtual/glibc | ||
13 | >= virtual/gzip | ||
14 | >= sys-apps/acl-2 | ||
15 | >= dev-libs/popt-1.16" | ||
16 | |||
17 | SDEPEND=">= virtual/sed" | ||
18 | |||
19 | SRCFILE="${PNAME}-${PVER}.tar.xz" | ||
20 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
21 | |||
22 | sminclude mbuild mtools systemd | ||
23 | |||
24 | SRC_URI=( | ||
25 | https://github.com/logrotate/${PNAME}/releases/download/${PVER}/${SRCFILE} | ||
26 | mirror://${PNAME}/${SRCFILE} | ||
27 | mirror://${PNAME}/logrotate.conf-3.7.1 | ||
28 | ) | ||
29 | |||
30 | UP2DATE="updatecmd https://github.com/logrotate/logrotate/releases | highesttarball xz" | ||
31 | |||
32 | src_compile() | ||
33 | { | ||
34 | cd ${SRCDIR} | ||
35 | |||
36 | mconfigure \ | ||
37 | --with-compress-command=/usr/bin/gzip \ | ||
38 | --with-uncompress-command=/usr/bin/gunzip \ | ||
39 | --with-default-mail-command=/usr/bin/mail \ | ||
40 | --with-acl \ | ||
41 | || die | ||
42 | |||
43 | mmake || die | ||
44 | } | ||
45 | |||
46 | src_install() | ||
47 | { | ||
48 | cd ${SRCDIR} | ||
49 | |||
50 | mmake DESTDIR=${BINDIR} install || die | ||
51 | |||
52 | # conf | ||
53 | minstalletc logrotate.conf-3.7.1 logrotate.conf || die | ||
54 | |||
55 | # systemd timer | ||
56 | minstalldir $(mget-systemd-unit-dir) || die | ||
57 | minstallfile examples/logrotate.timer $(mget-systemd-unit-dir) || die | ||
58 | minstallfile examples/logrotate.service $(mget-systemd-unit-dir) || die | ||
59 | minstalldir $(mget-systemd-unit-dir)/timers.target.wants || die | ||
60 | mlink ../logrotate.timer $(mget-systemd-unit-dir)/timers.target.wants/ || die | ||
61 | |||
62 | # mark it undeletable | ||
63 | mkeepdir /etc/logrotate.d || die | ||
64 | |||
65 | # doc | ||
66 | minstalldocs CHANGES COPYING README* examples/* || die | ||
67 | } | ||
68 | |||
69 | postinstall() | ||
70 | { | ||
71 | # needed directory | ||
72 | if [ ! -d ${MROOT}/etc/logrotate.d ] | ||
73 | then | ||
74 | install -d ${MROOT}/etc/logrotate.d | ||
75 | fi | ||
76 | |||
77 | # mark it undeletable | ||
78 | touch ${MROOT}/etc/logrotate.d/.keep | ||
79 | } |