# If you are going to generate HTML documentation (see below), install/update
# Sphinx:
su -c "pip install -U Sphinx"
# Get the source tarball
cd
test -f installed/nghttp2-1.61.0.tar.xz &&
mv -f installed/nghttp2-1.61.0.tar.xz .
test ! -f nghttp2-1.61.0.tar.xz &&
wget https://github.com/nghttp2/nghttp2/releases/download/v1.61.0/\
nghttp2-1.61.0.tar.xz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "nghttp2-*" -exec rm -r {} \;
tar xJvf ~/nghttp2-1.61.0.tar.xz
cd nghttp2-1.61.0
test $UID = 0 && chown -R root:root .
# If you will be configuring the library and application programs, read
# through ./README.rst for more about other requirements
# Slackware 15.0 includes a package, you may want
# to use --prefix=/usr --docdir=/usr/doc --mandir=/usr/man to match the
# paths. If you upgrade and want to relocate it, build it with
# prefix /usr/local, then 'make uninstall' as root, then build it with
# prefix /usr.
# As long as you use --enable-lib-only, you only need
# pkg-config, CUnit, and Sphinx
# Configure the library only build - 64-bit
test $(uname -m) = 'x86_64' &&
./configure --enable-lib-only --libdir=/usr/local/lib64 \
--mandir=/usr/local/man --docdir=/usr/local/doc/nghttp2
# Configure the library only build - anything else
test $(uname -m) != 'x86_64' &&
./configure --enable-lib-only --mandir=/usr/local/man \
--docdir=/usr/local/doc/nghttp2
# Build it
make
# Build documentation with Sphinx (doc/manual/html/index.html)
# This will fail if you have a recent version of Sphinx like I do
make html
# Become root to install it
su
# Remove Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg nghttp2
# Install it
make install
ldconfig
# You may find, if upgrading, that you have old shared library files
# in /usr/lib*/ or /usr/local/lib*/ (whichever prefix you used).
# Run lsof to see if anything currently running is using one of
# them - may be important things such as Apache httpd, Cyrus IMAP's
# daemons: master, imapd, lmtpd, httpd, smmapd, etc.
# If you care and are _sure_they're_not_in_use_, zap them and re-run
# ldconfig.
# Become your non-root user again
exit
# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/nghttp2-*.tar.*
mv nghttp2-1.61.0.tar.xz installed/
# If you ever want to uninstall Nghttp2, this should do it:
# (use /usr if you used --prefix=/usr, rather than /usr/local)
cd
su
test -d src/nghttp2-* && ( cd src/nghttp2-* ; make uninstall )
test -d /usr/local/doc/nghttp2 && rm -r /usr/local/doc/nghttp2
test -d /usr/local/include/nghttp2 && rm -r /usr/local/include/nghttp2
( cd /usr/local/man/man1
rm -f h2load.1 nghttp.1 nghttpd.1 nghttpx.1 )
test -d /usr/local/share/nghttp2 && rm -r /usr/local/share/nghttp2
rm -f /usr/local/lib64/libnghttp2.* /usr/local/lib64/pkgconfig/libnghttp2.pc
ldconfig
suexit
find ~/src -maxdepth 1 -type d -name "nghttp2-*" -exec rm -r {} \;
rm -f ~/installed/nghttp2-*.tar.*