Annotation of /smage/trunk/extras/logrotate/logrotate-3.17.0-r1.smage2
Parent Directory | Revision Log
Revision 14847 -
(hide annotations)
(download)
Tue Aug 4 14:41:36 2020 UTC (4 years, 1 month ago) by niro
File size: 1841 byte(s)
Tue Aug 4 14:41:36 2020 UTC (4 years, 1 month ago) by niro
File size: 1841 byte(s)
auto added: ver bump to 3.17.0-r1
1 | niro | 14847 | # $Id$ |
2 | |||
3 | PNAME="logrotate" | ||
4 | PVER="3.17.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 | >= dev-libs/popt-1.16" | ||
15 | |||
16 | SDEPEND=">= virtual/sed | ||
17 | >= dev-libs/popt-dev-1.16" | ||
18 | |||
19 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
20 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
21 | |||
22 | ALX_PKG_KEEP="etc usr/sbin/logrotate usr/lib/systemd/system" | ||
23 | msetfeature "!check" # some tests will fail due missing deps on alx | ||
24 | sminclude mbuild mtools systemd alx-split | ||
25 | |||
26 | SRC_URI=( | ||
27 | https://github.com/logrotate/${PNAME}/releases/download/${PVER}/${SRCFILE} | ||
28 | mirror://${PNAME}/${SRCFILE} | ||
29 | mirror://${PNAME}/logrotate.conf-3.7.1 | ||
30 | ) | ||
31 | |||
32 | UP2DATE="updatecmd https://github.com/logrotate/logrotate/releases | highesttarball xz" | ||
33 | |||
34 | src_compile() | ||
35 | { | ||
36 | cd ${SRCDIR} | ||
37 | |||
38 | mconfigure \ | ||
39 | --with-compress-command=/usr/bin/gzip \ | ||
40 | --with-uncompress-command=/usr/bin/gunzip \ | ||
41 | --with-default-mail-command=/usr/bin/mail \ | ||
42 | --without-acl \ | ||
43 | || die | ||
44 | |||
45 | mmake || die | ||
46 | } | ||
47 | |||
48 | alx_generic_src_install() | ||
49 | { | ||
50 | cd ${SRCDIR} | ||
51 | |||
52 | mmake DESTDIR=${BINDIR} install || die | ||
53 | |||
54 | # conf | ||
55 | minstalletc logrotate.conf-3.7.1 logrotate.conf || die | ||
56 | |||
57 | # systemd timer | ||
58 | minstalldir $(mget-systemd-unit-dir) || die | ||
59 | minstallfile examples/logrotate.timer $(mget-systemd-unit-dir) || die | ||
60 | minstallfile examples/logrotate.service $(mget-systemd-unit-dir) || die | ||
61 | minstalldir $(mget-systemd-unit-dir)/timers.target.wants || die | ||
62 | mlink ../logrotate.timer $(mget-systemd-unit-dir)/timers.target.wants/ || die | ||
63 | |||
64 | # mark it undeletable | ||
65 | mkeepdir /etc/logrotate.d || die | ||
66 | |||
67 | # doc | ||
68 | minstalldocs CHANGES COPYING README* examples/* || die | ||
69 | } | ||
70 | |||
71 | postinstall() | ||
72 | { | ||
73 | # needed directory | ||
74 | if [ ! -d ${MROOT}/etc/logrotate.d ] | ||
75 | then | ||
76 | install -d ${MROOT}/etc/logrotate.d | ||
77 | fi | ||
78 | |||
79 | # mark it undeletable | ||
80 | touch ${MROOT}/etc/logrotate.d/.keep | ||
81 | } |