Mail archive
alpine-aports

[alpine-aports] [PATCH 2/2] testing/apk-post-messages: new aport

From: Stuart Cardall <developer_at_it-offshore.co.uk>
Date: Thu, 16 Jul 2015 12:37:16 +0000

Changes v1 -> v2:

- with a trigger only for README.alpine
---
 testing/apk-post-messages/APKBUILD                 | 25 ++++++++++++++++++++++
 .../apk-post-messages/apk-post-messages.trigger    | 16 ++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 testing/apk-post-messages/APKBUILD
 create mode 100644 testing/apk-post-messages/apk-post-messages.trigger
diff --git a/testing/apk-post-messages/APKBUILD b/testing/apk-post-messages/APKBUILD
new file mode 100644
index 0000000..dad2aa6
--- /dev/null
+++ b/testing/apk-post-messages/APKBUILD
_at_@ -0,0 +1,25 @@
+# Contributor: Stuart Cardall <developer_at_it-offshore.co.uk>
+# Maintainer: Stuart Cardall <developer_at_it-offshore.co.uk>
+pkgname=apk-post-messages
+pkgver=0.10
+pkgrel=0
+pkgdesc="Print apk post-install messages"
+url="http://alpinelinux.org"
+arch="noarch"
+license="GPL"
+depends="apk-tools"
+triggers="$pkgname.trigger=/usr/share/doc/*"
+source=""
+
+_builddir="$srcdir"
+
+build() {
+	cd "$_builddir"
+	echo "Building $pkgname trigger package"
+}
+
+package() {
+	cd "$_builddir"
+	mkdir -p "$pkgdir"
+}
+
diff --git a/testing/apk-post-messages/apk-post-messages.trigger b/testing/apk-post-messages/apk-post-messages.trigger
new file mode 100644
index 0000000..224d295
--- /dev/null
+++ b/testing/apk-post-messages/apk-post-messages.trigger
_at_@ -0,0 +1,16 @@
+#!/bin/sh
+
+x=README.alpine
+for i; do
+	if [ -f "$i/$x" ]; then
+		msg="| $i: $x |"
+		msg_len=$(( $(echo $msg |wc -m) - 1))
+		printf "%${msg_len}s" | sed 's/ /-/g'
+		echo -e "\n$msg"
+		printf "%${msg_len}s" | sed 's/ /=/g'
+		echo -e "\n"
+		cat $i/$x
+		echo -e; break
+	fi
+done
+
-- 
2.4.5
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Jul 16 2015 - 12:37:16 GMT