summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild2
-rwxr-xr-xncurses-bin.pkg/postinst8
-rwxr-xr-xncurses-bin.pkg/prerm6
3 files changed, 16 insertions, 0 deletions
diff --git a/build b/build
index 94e7fa1..ccf775f 100755
--- a/build
+++ b/build
@@ -47,4 +47,6 @@ build: build-ncurses build-ncursesw
install: build
(cd obj-ncurses && make install)
(cd obj-ncursesw && make install.libs)
+ mv dest/usr/bin/clear dest/usr/bin/clear.ncurses
+ mv dest/usr/bin/reset dest/usr/bin/reset.ncurses
oh-installfiles
diff --git a/ncurses-bin.pkg/postinst b/ncurses-bin.pkg/postinst
new file mode 100755
index 0000000..d68ce3f
--- /dev/null
+++ b/ncurses-bin.pkg/postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xconfigure' ]; then
+ update-alternatives --install /usr/bin/clear clear \
+ /usr/bin/clear.ncurses 10
+ update-alternatives --install /usr/bin/reset reset \
+ /usr/bin/reset.ncurses 10
+fi
diff --git a/ncurses-bin.pkg/prerm b/ncurses-bin.pkg/prerm
new file mode 100755
index 0000000..d066d16
--- /dev/null
+++ b/ncurses-bin.pkg/prerm
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xremove' ]; then
+ update-alternatives --remove clear /usr/bin/clear.ncurses
+ update-alternatives --remove reset /usr/bin/reset.ncurses
+fi