Contents of /smage/trunk/extras/logrotate/logrotate-3.12.3-r1.smage2
Parent Directory | Revision Log
Revision 10614 -
(show annotations)
(download)
Fri Aug 25 12:40:37 2017 UTC (7 years, 1 month ago) by niro
File size: 1682 byte(s)
Fri Aug 25 12:40:37 2017 UTC (7 years, 1 month ago) by niro
File size: 1682 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 | mirror://${PNAME}/${PNAME}-3.7.7-weekly.patch |
30 | ) |
31 | |
32 | UP2DATE="updatecmd https://github.com/logrotate/logrotate/releases | highesttarball xz" |
33 | |
34 | src_prepare() |
35 | { |
36 | munpack ${SRCFILE} || die |
37 | cd ${SRCDIR} |
38 | |
39 | mpatch ${PNAME}-3.7.7-weekly.patch || die |
40 | |
41 | # fix a small glitch in the man pages |
42 | sed -i "s:logrotate/status:logrotate.status:" logrotate.8 || die |
43 | } |
44 | |
45 | src_compile() |
46 | { |
47 | cd ${SRCDIR} |
48 | mmake RPM_OPT_FLAGS="${CFLAGS}" || die |
49 | } |
50 | |
51 | alx_generic_src_install() |
52 | { |
53 | cd ${SRCDIR} |
54 | |
55 | # needed directories |
56 | minstalldir /usr/sbin || die |
57 | |
58 | # bins |
59 | minstallexec logrotate /usr/sbin || die |
60 | |
61 | # conf |
62 | minstalletc logrotate.conf-3.7.1 logrotate.conf || die |
63 | |
64 | # cron |
65 | minstallcron daily logrotate.cron-3.7.1 logrotate || die |
66 | |
67 | # man |
68 | minstallman logrotate.8 || die |
69 | |
70 | # mark it undeletable |
71 | mkeepdir /etc/logrotate.d || die |
72 | |
73 | # doc |
74 | minstalldocs CHANGES COPYING README* examples/* || die |
75 | } |
76 | |
77 | postinstall() |
78 | { |
79 | # needed directory |
80 | if [ ! -d ${MROOT}/etc/logrotate.d ] |
81 | then |
82 | install -d ${MROOT}/etc/logrotate.d |
83 | fi |
84 | |
85 | # mark it undeletable |
86 | touch ${MROOT}/etc/logrotate.d/.keep |
87 | } |