2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-09 16:08:32 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Logrotate < Formula
|
2009-09-24 17:49:32 +00:00
|
|
|
homepage 'http://packages.debian.org/testing/admin/logrotate'
|
2012-12-14 20:41:56 +00:00
|
|
|
url 'https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.8.3.tar.gz'
|
|
|
|
sha1 '19d70e2cfb97c1cee32e0d709da990856311022a'
|
2009-09-09 16:08:32 +00:00
|
|
|
|
2009-09-21 18:00:13 +00:00
|
|
|
depends_on 'popt'
|
2009-09-09 16:08:32 +00:00
|
|
|
|
2012-12-14 20:41:06 +00:00
|
|
|
# Per MacPorts, let these variables be overridden by ENV vars.
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2009-09-09 16:08:32 +00:00
|
|
|
def install
|
2012-12-14 20:41:06 +00:00
|
|
|
# Otherwise defaults to /bin/gz
|
|
|
|
ENV["COMPRESS_COMMAND"] = "/usr/bin/gzip"
|
|
|
|
ENV["COMPRESS_EXT"] = ".gz"
|
|
|
|
ENV["UNCOMPRESS_COMMAND"] = "/usr/bin/gunzip"
|
|
|
|
|
2009-09-09 16:08:32 +00:00
|
|
|
system "make"
|
2012-02-16 02:52:06 +00:00
|
|
|
sbin.install 'logrotate'
|
|
|
|
man8.install 'logrotate.8'
|
|
|
|
man5.install 'logrotate.conf.5'
|
|
|
|
(prefix+'etc/logrotate/examples').install Dir['examples/*']
|
2009-09-09 16:08:32 +00:00
|
|
|
end
|
|
|
|
end
|
2012-12-14 20:41:06 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
|
|
index d65a3f3..14d1f3f 100644
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -76,6 +76,22 @@ ifneq ($(POPT_DIR),)
|
|
|
|
LOADLIBES += -L$(POPT_DIR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
+ifneq ($(COMPRESS_COMMAND),)
|
|
|
|
+ CFLAGS += -DCOMPRESS_COMMAND=\"$(COMPRESS_COMMAND)\"
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
+ifneq ($(COMPRESS_EXT),)
|
|
|
|
+ CFLAGS += -DCOMPRESS_EXT=\"$(COMPRESS_EXT)\"
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
+ifneq ($(UNCOMPRESS_COMMAND),)
|
|
|
|
+ CFLAGS += -DUNCOMPRESS_COMMAND=\"$(UNCOMPRESS_COMMAND)\"
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
+ifneq ($(DEFAULT_MAIL_COMMAND),)
|
|
|
|
+ CFLAGS += -DDEFAULT_MAIL_COMMAND=\"$(DEFAULT_MAIL_COMMAND)\"
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
ifneq ($(STATEFILE),)
|
|
|
|
CFLAGS += -DSTATEFILE=\"$(STATEFILE)\"
|
|
|
|
endif
|