aboutsummaryrefslogtreecommitdiffstats
path: root/chapter8/readline.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chapter8/readline.sh')
-rw-r--r--chapter8/readline.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/chapter8/readline.sh b/chapter8/readline.sh
new file mode 100644
index 0000000..be3dcc0
--- /dev/null
+++ b/chapter8/readline.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+sed -i '/MV.*old/d' Makefile.in
+sed -i '/{OLDSUFF}/c:' support/shlib-install
+
+./configure --prefix=/usr \
+ --disable-static \
+ --with-curses \
+ --docdir=/usr/share/doc/readline-"${VERSION}"
+
+make SHLIB_LIBS="-lncursesw"
+make SHLIB_LIBS="-lncursesw" -j1 install
+
+mv -v /usr/lib/lib{readline,history}.so.* /lib
+ln -sfv ../../lib/"$(readlink /usr/lib/libreadline.so)" /usr/lib/libreadline.so
+ln -sfv ../../lib/"$(readlink /usr/lib/libhistory.so )" /usr/lib/libhistory.so
+
+install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-"${VERSION}"