Subject: [alpine-aports] [PATCH] main/chrony: install existing logrotate file

From: Sören Tempel <[email-masked]>
Date: Mon, 27 Jul 2015 22:59:39 +0200

The chrony package already has a custom logrotate file, but it isn't
installed to /etc/logrotate.d furthermore there is no need to explicitly
depend on logrotate.
---
 main/chrony/APKBUILD | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/main/chrony/APKBUILD b/main/chrony/APKBUILD
index d4e37c9..558a8a8 100644
--- a/main/chrony/APKBUILD
+++ b/main/chrony/APKBUILD
@@ -1,13 +1,13 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=chrony
 pkgver=2.1.1
-pkgrel=0
+pkgrel=1
 _ver=${pkgver/_/-}
 pkgdesc="NTP client and server programs"
 url="http://chrony.tuxfamily.org/"
 arch="all"
 license="GPL2"
-depends="logrotate"
+depends=""
 makedepends="texinfo"
 subpackages="$pkgname-doc"
 source="http://download.tuxfamily.org/chrony/$pkgname-$_ver.tar.gz
@@ -58,14 +58,18 @@ package() {
 	cd "$_builddir"
 	make DESTDIR="$pkgdir" install
 
-	install -D -m644 examples/*.example "$pkgdir"/usr/share/doc/chrony/
+	mkdir -p "$pkgdir"/etc/logrotate.d
+	install -Dm644 "$srcdir"/chrony.logrotate "$pkgdir"/etc/logrotate.d/chrony || return 1
+
+	install -Dm644 examples/*.example "$pkgdir"/usr/share/doc/chrony/
+	install -Dm755 "$srcdir"/chronyd.initd "$pkgdir"/etc/init.d/chronyd
+	install -Dm644 "$srcdir"/chronyd.confd "$pkgdir"/etc/conf.d/chronyd
 
-	install -m755 -D "$srcdir"/chronyd.initd "$pkgdir"/etc/init.d/chronyd
-	install -m644 -D "$srcdir"/chronyd.confd "$pkgdir"/etc/conf.d/chronyd
 	mkdir -p "$pkgdir"/var/lib/chrony \
 		"$pkgdir"/var/log/chrony \
 		"$pkgdir"/etc/chrony
 	touch "$pkgdir"/etc/chrony/chrony.drift
+
 	install -m644 "$srcdir"/chrony.conf "$pkgdir"/etc/chrony/chrony.conf
 }
 md5sums="15e470a51ab6e09e65bc0a2fbc5299af  chrony-2.1.1.tar.gz
-- 
2.4.6

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---