summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-26 01:05:03 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-26 01:05:03 (EDT)
commitbd7ab6b818eb68e288a08081043ae4e23ada8a10 (patch)
tree39a7c81e53fd8e5fd4113562a904a29817ba1edd
parent63abf2df52f6707a1576932dd4110c7aa54e5748 (diff)
gettext-tiny: Manage utilities with u-a
-rwxr-xr-xbuild4
-rw-r--r--gettext-tiny.pkg/postinst8
-rw-r--r--gettext-tiny.pkg/prerm7
3 files changed, 19 insertions, 0 deletions
diff --git a/build b/build
index affc641..e4aec59 100755
--- a/build
+++ b/build
@@ -10,6 +10,10 @@ build:
install: build
oh-autoinstall -- prefix=/usr
+ # u-a them utils
+ set -e; for util in autopoint msgfmt msgmerge xgettext; do \
+ mv dest/usr/bin/$${util} dest/usr/bin/$${util}.tiny; \
+ done
# Current and planned standard C libraries provide libintl.
rm -fv dest/usr/include/libintl.h
rm -fv dest/usr/lib/libintl.a
diff --git a/gettext-tiny.pkg/postinst b/gettext-tiny.pkg/postinst
new file mode 100644
index 0000000..b13ccb1
--- /dev/null
+++ b/gettext-tiny.pkg/postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ x"${1}" = x'configure' ]; then
+ for link in autopoint msgfmt msgmerge xgettext; do
+ update-alternatives --install "/usr/bin/${link}" "${link}" \
+ "/usr/bin/${link}.tiny" 10
+ done
+fi
diff --git a/gettext-tiny.pkg/prerm b/gettext-tiny.pkg/prerm
new file mode 100644
index 0000000..f3213c2
--- /dev/null
+++ b/gettext-tiny.pkg/prerm
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ x"${1}" = x'remove' ]; then
+ for link in autopoint msgfmt msgmerge xgettext; do
+ update-alternatives --remove "${link}" "/usr/bin/${link}.tiny"
+ done
+fi