Magellan Linux

Contents of /branches/R11-stable/core/logrotate/logrotate-3.8.8-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22698 - (show annotations) (download)
Tue Oct 28 08:27:39 2014 UTC (9 years, 6 months ago) by niro
File size: 1737 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="logrotate"
4 PVER="3.8.8"
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
17 SRCFILE="${PNAME}-${PVER}.tar.gz"
18 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
19
20 sminclude mtools
21
22 SRC_URI=(
23 https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/${SRCFILE}
24 mirror://${PNAME}/${SRCFILE}
25 mirror://${PNAME}/logrotate.conf-3.7.1
26 mirror://${PNAME}/logrotate.cron-3.7.1
27 mirror://${PNAME}/${PNAME}-3.7.7-datehack.patch
28 mirror://${PNAME}/${PNAME}-3.7.7-weekly.patch
29 )
30
31 UP2DATE="updatecmd https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/ | lasttarball gz"
32
33 src_prepare()
34 {
35 munpack ${SRCFILE} || die
36 cd ${SRCDIR}
37
38 mpatch ${PNAME}-3.7.7-datehack.patch || die
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 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 }