Contents of /smage/trunk/extras/logrotate/logrotate-3.12.3-r1.smage2
Parent Directory | Revision Log
Revision 10615 -
(show annotations)
(download)
Fri Aug 25 12:40:56 2017 UTC (6 years, 8 months ago) by niro
File size: 1591 byte(s)
Fri Aug 25 12:40:56 2017 UTC (6 years, 8 months ago) by niro
File size: 1591 byte(s)
auto added: ver bump to 3.12.3-r1
1 | # $Id$ |
2 | |
3 | PNAME="logrotate" |
4 | PVER="3.12.3" |
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 | >= dev-libs/popt-1.16" |
14 | |
15 | SDEPEND=">= virtual/sed |
16 | >= dev-libs/popt-dev-1.16" |
17 | |
18 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
20 | |
21 | ALX_PKG_KEEP="etc usr/sbin/logrotate" |
22 | sminclude mtools alx-split |
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 | mirror://${PNAME}/logrotate.cron-3.7.1 |
29 | ) |
30 | |
31 | UP2DATE="updatecmd https://github.com/logrotate/logrotate/releases | highesttarball xz" |
32 | |
33 | src_prepare() |
34 | { |
35 | munpack ${SRCFILE} || die |
36 | cd ${SRCDIR} |
37 | |
38 | # fix a small glitch in the man pages |
39 | sed -i "s:logrotate/status:logrotate.status:" logrotate.8 || die |
40 | } |
41 | |
42 | src_compile() |
43 | { |
44 | cd ${SRCDIR} |
45 | mmake RPM_OPT_FLAGS="${CFLAGS}" || die |
46 | } |
47 | |
48 | alx_generic_src_install() |
49 | { |
50 | cd ${SRCDIR} |
51 | |
52 | # needed directories |
53 | minstalldir /usr/sbin || die |
54 | |
55 | # bins |
56 | minstallexec logrotate /usr/sbin || die |
57 | |
58 | # conf |
59 | minstalletc logrotate.conf-3.7.1 logrotate.conf || die |
60 | |
61 | # cron |
62 | minstallcron daily logrotate.cron-3.7.1 logrotate || die |
63 | |
64 | # man |
65 | minstallman logrotate.8 || die |
66 | |
67 | # mark it undeletable |
68 | mkeepdir /etc/logrotate.d || die |
69 | |
70 | # doc |
71 | minstalldocs CHANGES COPYING README* examples/* || die |
72 | } |
73 | |
74 | postinstall() |
75 | { |
76 | # needed directory |
77 | if [ ! -d ${MROOT}/etc/logrotate.d ] |
78 | then |
79 | install -d ${MROOT}/etc/logrotate.d |
80 | fi |
81 | |
82 | # mark it undeletable |
83 | touch ${MROOT}/etc/logrotate.d/.keep |
84 | } |