X-Original-To: alpine-devel@lists.alpinelinux.org Received: from mail.wilcox-tech.com (mail.wilcox-tech.com [45.32.83.9]) by lists.alpinelinux.org (Postfix) with ESMTP id BAD745C4C56 for ; Tue, 25 Jul 2017 12:16:52 +0000 (GMT) Received: (qmail 27464 invoked from network); 25 Jul 2017 12:16:35 -0000 Received: from ip68-13-242-69.ok.ok.cox.net (HELO localhost.localdomain) (awilcox@wilcox-tech.com@68.13.242.69) by mail.wilcox-tech.com with ESMTPA; 25 Jul 2017 12:16:35 -0000 From: "A. Wilcox" To: alpine-devel@lists.alpinelinux.org Cc: "A. Wilcox" Subject: [alpine-devel] [PATCH] abuild: Add default split OpenRC function Date: Tue, 25 Jul 2017 07:16:23 -0500 Message-Id: <20170725121623.9834-1-awilfox@adelielinux.org> X-Mailer: git-send-email 2.10.0 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: From: "A. Wilcox" --- abuild.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/abuild.in b/abuild.in index 5b47158..0f6a277 100644 --- a/abuild.in +++ b/abuild.in @@ -1614,6 +1614,25 @@ libs() { default_libs } +# predefined splitfunc openrc +default_openrc() { + pkgdesc="$pkgdesc (OpenRC init scripts)" + install_if="openrc $pkgname=$pkgver-r$pkgrel" + local dir file + for dir in conf.d init.d; do + if [ -d "$pkgdir/etc/$dir" ]; then + mkdir -p "$subpkgdir"/etc + mv "$pkgdir/etc/$dir" "$subpkgdir"/etc/ + fi + done + return 0 +} + +openrc() { + default_openrc +} + + is_function() { type "$1" 2>&1 | head -n 1 | egrep -q "is a (shell )?function" } -- 2.10.0 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---