# libev 4.33
# ==========
# Get it
cd
test -f installed/libev-4.33.tar.gz && mv -f installed/libev-4.33.tar.gz .
test ! -f libev-4.33.tar.gz &&
wget http://dist.schmorp.de/libev/libev-4.33.tar.gz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "libev-*" -exec rm -r {} \;
tar xzvf ~/libev-4.33.tar.gz
cd libev-4.33
test $UID = 0 && chown -R root:root .
# Configure the build - 64-bit
test $(uname -m) = 'x86_64' &&
./configure --libdir=/usr/local/lib64 --mandir=/usr/local/man
# Configure the build - anything else
test $(uname -m) != 'x86_64' &&
./configure --mandir=/usr/local/man
# Build it
make
# Become root to install it
su
# Install it
make install
ldconfig
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/libev-*.tar.*
mv libev-4.33.tar.gz installed/
# If you ever want to uninstall libev, this should do it:
cd
su
test -d src/libev-* && ( cd src/libev-* ; make uninstall )
( cd /usr/local/include
rm -f ev.h ev++.h event.h )
rm -f /usr/local/lib*/libev.* /usr/local/man/man3/ev.3
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libev-*" -exec rm -r {} \;
rm -f ~/installed/libev-*.tar.*