Mail archive
alpine-aports

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

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
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
_at_@ -1,13 +1,13 @@
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 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
_at_@ -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:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Jul 27 2015 - 22:59:39 GMT