2024-10-04 17:51:59 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source versions.sh
|
|
|
|
|
|
|
|
GLSOURCES="/sources"
|
|
|
|
|
2024-10-09 02:37:48 +08:00
|
|
|
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
2024-10-04 17:51:59 +08:00
|
|
|
|
|
|
|
[ -d flex-${flex_version} ] && rm -rf flex-${flex_version}
|
|
|
|
|
|
|
|
tar -zxf ${flex_tarball}
|
|
|
|
|
|
|
|
cd flex-${flex_version}
|
|
|
|
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--docdir=/usr/share/doc/flex-${flex-version} \
|
|
|
|
--disable-static
|
|
|
|
|
|
|
|
make
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
myfail "Failed building flex"
|
|
|
|
fi
|
|
|
|
|
2024-10-09 02:37:48 +08:00
|
|
|
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
|
|
|
|
echo "running flex make check"
|
|
|
|
make check > ${GLSOURCES}/flex.check.log 2>&1
|
|
|
|
fi
|
2024-10-04 17:51:59 +08:00
|
|
|
|
|
|
|
make install
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
myfail "Failed installing flex"
|
|
|
|
fi
|
|
|
|
|
|
|
|
ln -sv flex /usr/bin/lex
|
|
|
|
ln -sv flex.1 /usr/share/man/man1/lex.1
|
|
|
|
|
2024-10-08 12:28:55 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
# cleanup
|
|
|
|
|
|
|
|
pushd $GLSOURCES
|
|
|
|
|
|
|
|
rm -rf flex-${flex_version}
|
|
|
|
|
|
|
|
popd
|