42 lines
1,007 B
Bash
Executable file
42 lines
1,007 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
. /etc/pkg/pkg.conf
|
|
. /var/lib/pkg/functions
|
|
|
|
name=readline
|
|
version=7.0
|
|
url=http://ftp.gnu.org/gnu/readline/readline-$version.tar.gz
|
|
|
|
fetch $url
|
|
|
|
rm -fr $WORK_DIR/$name-$version
|
|
tar -xvf $SOURCE_DIR/$(basename $url) -C $WORK_DIR
|
|
|
|
cd $WORK_DIR/$name-$version
|
|
{ time \
|
|
{
|
|
sed -i '/MV.*old/d' Makefile.in
|
|
sed -i '/{OLDSUFF}/c:' support/shlib-install
|
|
|
|
./configure --prefix=/usr \
|
|
--disable-static \
|
|
--docdir=/usr/share/doc/readline-$version
|
|
make SHLIB_LIBS="-L/tools/lib -lncursesw"
|
|
make SHLIB_LIBS="-L/tools/lib -lncurses" install
|
|
|
|
mv -v /usr/lib/lib{readline,history}.so.* /lib
|
|
chmod -v u+w /lib/lib{readline,history}.so.*
|
|
ln -sfv ../../lib/$(readlink /usr/lib/libreadline.so) /usr/lib/libreadline.so
|
|
ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so
|
|
}
|
|
} 2>&1 | tee -a $LOG_DIR/$(basename $0).log
|
|
|
|
if [ $PIPESTATUS -ne 0 ]; then exit 1; fi;
|
|
|
|
rm -fr $WORK_DIR/$name-$version
|
|
|
|
registerpkg $(basename $0) $version
|
|
|
|
exit 0
|