Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13211 - (show annotations) (download)
Thu Jul 4 13:33:39 2019 UTC (4 years, 9 months ago) by niro
File size: 1773 byte(s)
auto added: ver bump to 3.15.0-r1
1 # $Id$
2
3 PNAME="logrotate"
4 PVER="3.15.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 sminclude mbuild mtools systemd alx-split
24
25 SRC_URI=(
26 https://github.com/logrotate/${PNAME}/releases/download/${PVER}/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 mirror://${PNAME}/logrotate.conf-3.7.1
29 )
30
31 UP2DATE="updatecmd https://github.com/logrotate/logrotate/releases | highesttarball xz"
32
33 src_compile()
34 {
35 cd ${SRCDIR}
36
37 mconfigure \
38 --with-compress-command=/usr/bin/gzip \
39 --with-uncompress-command=/usr/bin/gunzip \
40 --with-default-mail-command=/usr/bin/mail \
41 --without-acl \
42 || die
43
44 mmake || die
45 }
46
47 alx_generic_src_install()
48 {
49 cd ${SRCDIR}
50
51 mmake DESTDIR=${BINDIR} install || die
52
53 # conf
54 minstalletc logrotate.conf-3.7.1 logrotate.conf || die
55
56 # systemd timer
57 minstalldir $(mget-systemd-unit-dir) || die
58 minstallfile examples/logrotate.timer $(mget-systemd-unit-dir) || die
59 minstallfile examples/logrotate.service $(mget-systemd-unit-dir) || die
60 minstalldir $(mget-systemd-unit-dir)/timers.target.wants || die
61 mlink ../logrotate.timer $(mget-systemd-unit-dir)/timers.target.wants/ || die
62
63 # mark it undeletable
64 mkeepdir /etc/logrotate.d || die
65
66 # doc
67 minstalldocs CHANGES COPYING README* examples/* || die
68 }
69
70 postinstall()
71 {
72 # needed directory
73 if [ ! -d ${MROOT}/etc/logrotate.d ]
74 then
75 install -d ${MROOT}/etc/logrotate.d
76 fi
77
78 # mark it undeletable
79 touch ${MROOT}/etc/logrotate.d/.keep
80 }