Magellan Linux

Contents of /smage/trunk/extras/logrotate/logrotate-3.21.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17058 - (show annotations) (download)
Fri Oct 20 11:27:43 2023 UTC (7 months, 2 weeks ago) by niro
File size: 1855 byte(s)
-fixed up2date
1 # $Id$
2
3 PNAME="logrotate"
4 PVER="3.21.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.19"
15
16 SDEPEND=">= virtual/sed
17 >= dev-libs/popt-dev-1.19"
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 UP2SEPERATOR="\/"
33 UP2DATE="updatecmd https://github.com/logrotate/logrotate/tags | highesttarball gz"
34
35 src_compile()
36 {
37 cd ${SRCDIR}
38
39 mconfigure \
40 --with-compress-command=/usr/bin/gzip \
41 --with-uncompress-command=/usr/bin/gunzip \
42 --with-default-mail-command=/usr/bin/mail \
43 --without-acl \
44 || die
45
46 mmake || die
47 }
48
49 alx_generic_src_install()
50 {
51 cd ${SRCDIR}
52
53 mmake DESTDIR=${BINDIR} install || die
54
55 # conf
56 minstalletc logrotate.conf-3.7.1 logrotate.conf || die
57
58 # systemd timer
59 minstalldir $(mget-systemd-unit-dir) || die
60 minstallfile examples/logrotate.timer $(mget-systemd-unit-dir) || die
61 minstallfile examples/logrotate.service $(mget-systemd-unit-dir) || die
62 minstalldir $(mget-systemd-unit-dir)/timers.target.wants || die
63 mlink ../logrotate.timer $(mget-systemd-unit-dir)/timers.target.wants/ || die
64
65 # mark it undeletable
66 mkeepdir /etc/logrotate.d || die
67
68 # doc
69 minstalldocs CHANGES COPYING README* examples/* || die
70 }
71
72 postinstall()
73 {
74 # needed directory
75 if [ ! -d ${MROOT}/etc/logrotate.d ]
76 then
77 install -d ${MROOT}/etc/logrotate.d
78 fi
79
80 # mark it undeletable
81 touch ${MROOT}/etc/logrotate.d/.keep
82 }