Contents of /smage/branches/alx07x-unstable/extras/logrotate/logrotate-3.9.1-r1.smage2
Parent Directory | Revision Log
Revision 9901 -
(show annotations)
(download)
Thu Aug 3 13:58:28 2017 UTC (6 years, 8 months ago) by niro
File size: 1824 byte(s)
Thu Aug 3 13:58:28 2017 UTC (6 years, 8 months ago) by niro
File size: 1824 byte(s)
-release branches/alx07x-unstable
1 | # $Id$ |
2 | |
3 | PNAME="logrotate" |
4 | PVER="3.9.1" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="app-admin" |
8 | |
9 | DESCRIPTION="Rotates, compresses, removes and mails system log files." |
10 | HOMEPAGE="http://download.fedora.redhat.com/pub/fedora/linux/core/3/SRPMS/" |
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://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/${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-datehack.patch |
30 | mirror://${PNAME}/${PNAME}-3.7.7-weekly.patch |
31 | ) |
32 | |
33 | UP2DATE="updatecmd https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/ | lasttarball gz" |
34 | |
35 | src_prepare() |
36 | { |
37 | munpack ${SRCFILE} || die |
38 | cd ${SRCDIR} |
39 | |
40 | mpatch ${PNAME}-3.7.7-datehack.patch || die |
41 | mpatch ${PNAME}-3.7.7-weekly.patch || die |
42 | |
43 | # fix a small glitch in the man pages |
44 | sed -i "s:logrotate/status:logrotate.status:" logrotate.8 || die |
45 | } |
46 | |
47 | src_compile() |
48 | { |
49 | cd ${SRCDIR} |
50 | mmake RPM_OPT_FLAGS="${CFLAGS}" || die |
51 | } |
52 | |
53 | alx_generic_src_install() |
54 | { |
55 | cd ${SRCDIR} |
56 | |
57 | # needed directories |
58 | minstalldir /usr/sbin || die |
59 | |
60 | # bins |
61 | minstallexec logrotate /usr/sbin || die |
62 | |
63 | # conf |
64 | minstalletc logrotate.conf-3.7.1 logrotate.conf || die |
65 | |
66 | # cron |
67 | minstallcron daily logrotate.cron-3.7.1 logrotate || die |
68 | |
69 | # man |
70 | minstallman logrotate.8 || die |
71 | |
72 | # mark it undeletable |
73 | mkeepdir /etc/logrotate.d || die |
74 | |
75 | # doc |
76 | minstalldocs CHANGES COPYING README* examples/* || die |
77 | } |
78 | |
79 | postinstall() |
80 | { |
81 | # needed directory |
82 | if [ ! -d ${MROOT}/etc/logrotate.d ] |
83 | then |
84 | install -d ${MROOT}/etc/logrotate.d |
85 | fi |
86 | |
87 | # mark it undeletable |
88 | touch ${MROOT}/etc/logrotate.d/.keep |
89 | } |