1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id:$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name logrotate |
---|
7 | version 3.7.9 |
---|
8 | categories sysutils |
---|
9 | maintainers markd pixilla.com:brad |
---|
10 | platforms darwin |
---|
11 | |
---|
12 | description Rotates, compresses, and mails system logs |
---|
13 | |
---|
14 | long_description The logrotate utility is designed to simplify the administration of log files \ |
---|
15 | on a system which generates a lot of log files. Logrotate allows for the \ |
---|
16 | automatic rotation compression, removal and mailing of log files. Logrotate \ |
---|
17 | can be set to handle a log file \daily, weekly, monthly or when the log file \ |
---|
18 | gets to a certain size. |
---|
19 | |
---|
20 | homepage https://fedorahosted.org/logrotate/ |
---|
21 | master_sites https://fedorahosted.org/releases/l/o/logrotate |
---|
22 | checksums sha1 b920f9664a2c930f1ccdabc0db4f31f67cf95661 \ |
---|
23 | rmd160 e3fb77e37c454a52566f7d5b017d70c9dddf9b66 |
---|
24 | |
---|
25 | livecheck.type regex |
---|
26 | livecheck.url ${master_sites} |
---|
27 | livecheck.regex ${name}-(\\d+\\.\\d+(\\.\\d+)?)${extract.suffix} |
---|
28 | |
---|
29 | patchfiles patch-Makefile.diff \ |
---|
30 | patch-examples-logrotate-default.diff \ |
---|
31 | patch-config.c.diff \ |
---|
32 | patch-logrotate.c.diff |
---|
33 | |
---|
34 | depends_run port:popt port:gettext port:gzip |
---|
35 | |
---|
36 | use_configure no |
---|
37 | |
---|
38 | set prefix_hack [string trimleft ${destroot}${prefix} /] |
---|
39 | |
---|
40 | destroot.env-append BASEDIR="${prefix_hack}" |
---|
41 | |
---|
42 | build.env BASEDIR="${prefix}" \ |
---|
43 | POPT_DIR="{$prefix}/include" \ |
---|
44 | STATEFILE="${prefix}/var/run/logrotate/logrotate.status" \ |
---|
45 | DEFAULT_MAIL_COMMAND="/usr/sbin/mail" \ |
---|
46 | USEINSTALL="install" |
---|
47 | |
---|
48 | #build.args-append LDFLAGS="-L${prefix}/lib" |
---|
49 | |
---|
50 | post-patch { |
---|
51 | reinplace "s|@@PREFIX@@|${prefix}|g" \ |
---|
52 | ${worksrcpath}/examples/logrotate-default |
---|
53 | } |
---|
54 | |
---|
55 | destroot.keepdirs ${destroot}${prefix}/etc/logrotate.d \ |
---|
56 | ${destroot}${prefix}/var/run/logrotate |
---|
57 | |
---|
58 | post-destroot { |
---|
59 | xinstall -m 755 ${worksrcpath}/examples/logrotate-default \ |
---|
60 | ${destroot}${prefix}/etc/logrotate.conf.sample |
---|
61 | xinstall -d ${destroot}${prefix}/etc/logrotate.d |
---|
62 | xinstall -d ${destroot}${prefix}/var/run/logrotate |
---|
63 | } |
---|
64 | |
---|
65 | post-activate { |
---|
66 | delete ${prefix}/etc/logrotate.d/.turd_${name} \ |
---|
67 | ${prefix}/var/run/logrotate/.turd_${name} |
---|
68 | } |
---|
69 | |
---|
70 | variant bzip2 description {change default compression to bzip} { |
---|
71 | build.env-append COMPRESS_COMMAND="${prefix}/bin/bzip2" \ |
---|
72 | COMPRESS_EXT=".bz2" \ |
---|
73 | UNCOMPRESS_COMMAND="${prefix}/bin/bunzip2" |
---|
74 | depends_run-delete port:gzip |
---|
75 | depends_run-append port:bzip2 |
---|
76 | } |
---|
77 | |
---|
78 | notes \ |
---|
79 | "Copy ${prefix}/etc/logrotate.conf.sample to ${prefix}/etc/logrotate.conf for a start. |
---|
80 | Afterwards putting logrotate scripts in ${prefix}/etc/logrotate.d will cause them to |
---|
81 | be executed with the following command: |
---|
82 | \$ ${prefix}/bin/${name} ${prefix}/etc/logrotate.conf" |
---|