For discussion of Alpine Linux development and developer support

1

[alpine-devel] [PATCH] abuild: Add default split OpenRC function

A. Wilcox
Details
Message ID
<20170725121623.9834-1-awilfox@adelielinux.org>
Sender timestamp
1500984983
DKIM signature
missing
Download raw message
Patch: +19 -0
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>

---
 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
---
William Pitcock
Details
Message ID
<CA+T2pCFt8MPAT8HKmNkb+YicrOkt65_vo0SpgiRoDnWdvBqY7A@mail.gmail.com>
In-Reply-To
<20170725121623.9834-1-awilfox@adelielinux.org> (view parent)
Sender timestamp
1501085017
DKIM signature
missing
Download raw message
Hi,

I applied this.  Thanks.

William

On Tue, Jul 25, 2017 at 7:16 AM, A. Wilcox <awilfox@adelielinux.org> wrote:
> From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
>
> ---
>  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
> ---
>


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---