summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-05-02 13:51:15 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2012-05-02 14:04:02 +0100
commit5243b19fdec709f52928c821230bbc0ed1e88d63 (patch)
tree6ea524f5841fde56a1b311ec165a69a8218ac42c
parent956cdb4280fc167fadb8a7706d0fde6f41f23117 (diff)
downloadncurses-5243b19fdec709f52928c821230bbc0ed1e88d63.tar.gz
ncurses: remove clear and reset executables
The clear and reset executables are also provided by busybox. ncurses is not part of foundation, but clear and reset will be useful in foundation, so the busybox versions are preferable. It is difficult to prevent ncurses from building clear and reset so they have to be removed after installing. This should be ok, as while ncurses will execute a program, reset's program name is only tracked so reset can be a symlink to tset
-rwxr-xr-xncurses-morph-postinstall.sh27
1 files changed, 15 insertions, 12 deletions
diff --git a/ncurses-morph-postinstall.sh b/ncurses-morph-postinstall.sh
index 6500503..39d7061 100755
--- a/ncurses-morph-postinstall.sh
+++ b/ncurses-morph-postinstall.sh
@@ -7,28 +7,31 @@ set -e
# some software expects to find libcurses in /lib
mkdir -p "$DESTDIR/lib"
-mv "$DESTDIR"/usr/lib/libncursesw.so.5* "$DESTDIR"/lib
-ln -sf ../../lib/libncursesw.so.5 "$DESTDIR"/usr/lib/libncursesw.so
+mv "$DESTDIR"/"$PREFIX"lib/libncursesw.so.5* "$DESTDIR"/lib
+ln -sf ../../lib/libncursesw.so.5 "$DESTDIR"/"$PREFIX"lib/libncursesw.so
# some linker tricks for libraries that look for non-wide character
# versions of ncurses
for lib in ncurses form panel menu; do
# remove non-wide shared object
- rm -f "$DESTDIR/usr/lib/lib${lib}.so"
+ rm -f "$DESTDIR/${PREFIX}lib/lib${lib}.so"
# use a linker script to find the wide character variant
- echo "INPUT(-l${lib}w)" >"$DESTDIR/usr/lib/lib${lib}.so"
+ echo "INPUT(-l${lib}w)" >"$DESTDIR/${PREFIX}lib/lib${lib}.so"
# symlink the non-shared library
- ln -sf "lib${lib}w.a" "$DESTDIR/usr/lib/lib${lib}.a"
+ ln -sf "lib${lib}w.a" "$DESTDIR/${PREFIX}lib/lib${lib}.a"
done
ln -sf libncurses++w.a "$DESTDIR/usr/lib/libncurses++.a"
# redirect software that looks for libcurses
-rm -f "$DESTDIR/usr/lib/libcursesw.so"
-echo "INPUT(-lncursesw)" >"$DESTDIR/usr/lib/libcursesw.so"
-ln -sf libncurses.so "$DESTDIR/usr/lib/libcurses.so"
-ln -sf libncursesw.a "$DESTDIR/usr/lib/libcursesw.a"
-ln -sf libncurses.a "$DESTDIR/usr/lib/libcurses.a"
+rm -f "$DESTDIR/${PREFIX}lib/libcursesw.so"
+echo "INPUT(-lncursesw)" >"$DESTDIR/${PREFIX}lib/libcursesw.so"
+ln -sf libncurses.so "$DESTDIR/${PREFIX}lib/libcurses.so"
+ln -sf libncursesw.a "$DESTDIR/${PREFIX}lib/libcursesw.a"
+ln -sf libncurses.a "$DESTDIR/${PREFIX}lib/libcurses.a"
# install documentation
-mkdir -p "$DESTDIR/usr/share/doc/ncurses"
-cp -R doc/* "$DESTDIR/usr/share/doc/ncurses"
+mkdir -p "$DESTDIR/${PREFIX}share/doc/ncurses"
+cp -R doc/* "$DESTDIR/${PREFIX}share/doc/ncurses"
+
+# remove 'clear' and 'reset' executables, busybox provides them
+rm -f "$DESTDIR/${PREFIX}bin/clear" "$DESTDIR/${PREFIX}bin/reset"