aboutsummaryrefslogtreecommitdiffstats
path: root/main/logrotate
diff options
context:
space:
mode:
Diffstat (limited to 'main/logrotate')
-rw-r--r--main/logrotate/APKBUILD26
-rw-r--r--main/logrotate/logrotate.conf20
2 files changed, 46 insertions, 0 deletions
diff --git a/main/logrotate/APKBUILD b/main/logrotate/APKBUILD
new file mode 100644
index 0000000000..6881d4c224
--- /dev/null
+++ b/main/logrotate/APKBUILD
@@ -0,0 +1,26 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=logrotate
+pkgver=3.7.8
+pkgrel=1
+pkgdesc="Tool to rotate logfiles"
+url="https://fedorahosted.org/logrotate/"
+license="GPL"
+depends=
+makedepends="popt-dev wget"
+subpackages="$pkgname-doc"
+source="https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.7.8.tar.gz
+ logrotate.conf"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make || return 1
+ install -Dm755 logrotate "$pkgdir"/usr/sbin/logrotate
+ install -Dm644 logrotate.8 "$pkgdir"/usr/share/man/man8/logrotate.8
+ install -Dm644 ../logrotate.conf "$pkgdir"/etc/logrotate.conf
+ install -Dm755 examples/logrotate.cron "$pkgdir"/etc/periodic/daily/logrotate
+}
+
+md5sums="b3589bea6d8d5afc8a84134fddaae973 logrotate-3.7.8.tar.gz
+fef6415a79a6fede8cf9b9b6b8410090 logrotate.conf"
diff --git a/main/logrotate/logrotate.conf b/main/logrotate/logrotate.conf
new file mode 100644
index 0000000000..125268ae80
--- /dev/null
+++ b/main/logrotate/logrotate.conf
@@ -0,0 +1,20 @@
+# see "man logrotate" for details
+# rotate log files weekly
+weekly
+
+# keep 4 weeks worth of backlogs
+rotate 4
+
+# create new (empty) log files after rotating old ones
+create
+
+# use date as a suffix of the rotated file
+dateext
+
+# uncomment this if you want your log files compressed
+compress
+
+# apk packages drop log rotation information into this directory
+include /etc/logrotate.d
+
+# system-specific logs may be also be configured here.