Magellan Linux

Contents of /trunk/core/logrotate/logrotate-3.7.7-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 847 - (show annotations) (download)
Fri Dec 26 11:25:15 2008 UTC (15 years, 5 months ago) by niro
File size: 1976 byte(s)
-enabled fedorahosted SRC_URI and more variable UP2DATE uri
1 # $Header: /magellan-cvs/smage/logrotate/logrotate-3.7.1-r8.smage2,v 1.1 2008/02/10 11:46:08 niro Exp $
2
3 PNAME="logrotate"
4 PVER="3.7.7"
5 PBUILD="r1"
6
7 PCATEGORIE="app-admin"
8 STATE="unstable"
9
10 DESCRIPTION="Rotates, compresses, removes and mails system log files."
11 HOMEPAGE="http://download.fedora.redhat.com/pub/fedora/linux/core/3/SRPMS/"
12
13 DEPEND=">= virtual/glibc
14 >= dev-libs/popt-1.14"
15
16 SDEPEND=">= sys-apps/sed-4"
17
18 SRCFILE="${PNAME}-${PVER}.tar.gz"
19 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
20
21 sminclude mtools
22
23 SRC_URI=(
24 https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/${SRCFILE}
25 mirror://${PNAME}/${SRCFILE}
26 mirror://${PNAME}/logrotate.conf-3.7.1
27 mirror://${PNAME}/logrotate.cron-3.7.1
28 mirror://${PNAME}/${PNAME}-${PVER}-datehack.patch
29 mirror://${PNAME}/${PNAME}-${PVER}-manpage-fixes.patch
30 mirror://${PNAME}/${PNAME}-${PVER}-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}-${PVER}-datehack.patch || die
41 mpatch ${PNAME}-${PVER}-manpage-fixes.patch || die
42 mpatch ${PNAME}-${PVER}-weekly.patch || die
43
44 # fix a small glitch in the man pages
45 sed -i "s:logrotate/status:logrotate.status:" logrotate.8 || die
46 }
47
48 src_compile()
49 {
50 cd ${SRCDIR}
51 mmake RPM_OPT_FLAGS="${CFLAGS}" || die
52 }
53
54 src_install()
55 {
56 cd ${SRCDIR}
57
58 # needed directories
59 minstalldir /usr/sbin || die
60
61 # bins
62 minstallexec logrotate /usr/sbin || die
63
64 # conf
65 minstalletc logrotate.conf-3.7.1 logrotate.conf || die
66
67 # cron
68 minstallcron daily logrotate.cron-3.7.1 logrotate || die
69
70 # man
71 minstallman logrotate.8 || die
72
73 # mark it undeletable
74 mkeepdir /etc/logrotate.d || die
75
76 # doc
77 minstalldocs CHANGES COPYING README* examples/* || die
78 }
79
80 postinstall()
81 {
82 # needed directory
83 if [ ! -d ${MROOT}/etc/logrotate.d ]
84 then
85 install -d ${MROOT}/etc/logrotate.d
86 fi
87
88 # mark it undeletable
89 touch ${MROOT}/etc/logrotate.d/.keep
90 }

Properties

Name Value
svn:keywords Id