# Get it
cd
test -f installed/libnfnetlink-1.0.0.tar.bz2 &&
mv installed/libnfnetlink-1.0.0.tar.bz2 .
test ! -f libnfnetlink-1.0.0.tar.bz2 &&
wget http://www.netfilter.org/projects/libnfnetlink/files/\
libnfnetlink-1.0.0.tar.bz2
# Extract it
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "libnetfilter_conntrack-*" -exec rm -r {} \;
tar xjvf ~/libnetfilter_conntrack-1.0.0.tar.bz2
cd libnetfilter_conntrack-1.0.0
test $UID = 0 && chown -R root:root .
# Configure and build it
./configure
make
# Become root to install it
su
# Install it
make install
ldconfig
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/libnetfilter_conntrack-*.tar.*
mv libnetfilter_conntrack-1.0.0.tar.bz2 installed/
# Get it
cd
test -f installed/libnetfilter_log-1.0.1.tar.bz2 &&
mv installed/libnetfilter_log-1.0.1.tar.bz2 .
test ! -f libnetfilter_log-1.0.1.tar.bz2 &&
wget ftp://ftp.netfilter.org/pub/libnetfilter_log/\
libnetfilter_log-1.0.1.tar.bz2
# Extract the tarball
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "libnetfilter_queue-*" -exec rm -r {} \;
tar xjvf ~/libnetfilter_queue-1.0.1.tar.bz2
cd libnetfilter_queue-1.0.1
test $UID = 0 && chown -R root:root .
# Configure and build it
./configure
make
# Become root to install it
su
# Install it
make install
ldconfig
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Keep the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/libnetfilter_queue-*.tar.*
mv libnetfilter_queue-1.0.1.tar.bz2 installed/
# You can just run 'make uninstall' (as root) in any of the source
# directories, the rest is to make extra sure that it's all gone
# If you ever want to uninstall libnfnetlink, this should do it:
cd
su
test -d src/libnfnetlink-* && ( cd src/libnfnetlink-* ; make uninstall )
test -d /usr/local/include/libnfnetlink &&
rm -r /usr/local/include/libnfnetlink
rm -f /usr/local/lib/libnfnetlink.*
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libnfnetlink-*" -exec rm -r {} \;
rm -f ~/installed/libnfnetlink-*.tar.*
# If you ever want to uninstall libnetfilter_conntrack, this should do it:
cd
su
test -d src/libnetfilter_conntrack-* &&
( cd src/libnetfilter_conntrack-* ; make uninstall )
rm -f /usr/local/bin/ctnl_test /usr/local/lib/libnetfilter_conntrack.*
test -d /usr/local/include/libnetfilter_conntrack &&
rm -r /usr/local/include/libnetfilter_conntrack
test -d /usr/local/lib/libnetfilter_conntrack &&
rm -r /usr/local/lib/libnetfilter_conntrack
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libnetfilter_conntrack-*" -exec rm -r {} \;
rm -f ~/installed/libnetfilter_conntrack-*.tar.*
# If you ever want to uninstall libnetfilter_log, this should do it:
cd
su
test -d src/libnetfilter_log-* &&
( cd src/libnetfilter_log-* ; make uninstall )
test -d /usr/local/include/libnetfilter_log &&
rm -r /usr/local/include/libnetfilter_log
( cd /usr/local/lib ; rm -f libnetfilter_log.* libnetfilter_log_libipulog.* )
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libnetfilter_log-*" -exec rm -r {} \;
rm -f ~/installed/libnetfilter_log-*.tar.*
# If you ever want to uninstall libnetfilter_queue, this should do it:
cd
su
test -d src/libnetfilter_queue-* &&
( cd src/libnetfilter_queue-* ; make uninstall )
test -d /usr/local/include/libnetfilter_queue &&
rm -r /usr/local/include/libnetfilter_queue
( cd /usr/local/lib
rm -f libnetfilter_queue.* libnetfilter_queue_libipq.* )
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libnetfilter_queue-*" -exec rm -r {} \;
rm -f ~/installed/libnetfilter_queue-*.tar.*