# Get the tarball
cd
test -f installed/libuv-v1.50.0.tar.gz &&
mv -f installed/libuv-v1.50.0.tar.gz .
test ! -f libuv-v1.50.0.tar.gz &&
wget https://dist.libuv.org/dist/v1.50.0/libuv-v1.50.0.tar.gz
# Verify tarball w/ sha256sum:
# (this came from my gpg-verified tarball)
echo "6dc2b39aa7fa66c04e2e015bf47738b84e1c6b86b8987d57dd432d149d77ee\
25 libuv-v1.50.0.tar.gz" | sha256sum -c
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -name "libuv-v*" -exec rm -r {} \;
tar xzvf ~/libuv-v1.50.0.tar.gz
cd libuv-v1.50.0
test $UID = 0 && chown -R root:root .
# Read ./README.md and if upgrading, ./ChangeLog
# Here we create configure, etc. but you can also use CMake if you like
# Get the source ready for autoconf/automake/libtool
./autogen.sh
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --libdir=/usr/lib64 --docdir=/usr/doc --disable-static
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --docdir=/usr/doc --disable-static
# Build it
make
# Test the build
make check
# Generate libuv.1 man page (./docs/build/man/libuv.1)
# See 'make help' in ./docs/ for other options
( cd docs && make man )
# Become root to install it
su
# Remove the Slackware package if there is one
test -x /sbin/removepkg && /sbin/removepkg libuv
# Install it
make install
ldconfig
# Install the generated man page, if it's there
test -f docs/build/man/libuv.1 &&
install -m 644 docs/build/man/libuv.1 /usr/man/man1/
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/libuv-*.tar.gz
mv -f libuv-v1.50.0.tar.gz installed/
# If you ever want to uninstall libuv, this should do it:
cd
su
test -d src/libuv-* && ( cd src/libuv-* ; make uninstall )
rm -f /usr/include/uv.h /usr/lib*/libuv.* /usr/lib*/pkgconfig/libuv.pc \
/usr/man/man1/libuv.1
test -d /usr/include/uv && rm -r /usr/include/uv
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libuv-*" -exec rm -r {} \;
rm -f ~/installed/libuv-*.tar.*