# Get the tarball
cd
test -f installed/help2man-1.49.3.tar.xz &&
mv installed/help2man-1.49.3.tar.xz .
test ! -f help2man-1.49.3.tar.xz &&
wget http://ftpmirror.gnu.org/help2man/help2man-1.49.3.tar.xz
# Verify tarball w/ sha256sum:
# (this came from my gpg-verified tarball)
echo "4d7e4fdef2eca6afe07a2682151cea78781e0a4e8f9622142d9f70c083a2fd\
4f help2man-1.49.3.tar.xz" | sha256sum -c
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "help2man-*" -exec rm -r {} \;
tar xJvf ~/help2man-1.49.3.tar.xz
cd help2man-1.49.3
test $UID = 0 && chown -R root:root .
# I use --disable-nls because I only need English, if that is not the case
# for you, leave that off
# If you have /usr/share/info -> /usr/info and /usr/share/man -> /usr/man
# symlinks, you don't need to change those with --infodir and --mandir, but
# it can't hurt
# Configure the build - 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --infodir=/usr/info --libdir=/usr/lib64 \
--mandir=/usr/man --disable-nls
# Configure the build - anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --infodir=/usr/info --mandir=/usr/man \
--disable-nls
# Build it
make
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg help2man
# Install/update the perl module Locale::gettext (used to be just
# 'gettext'):
perl -MCPAN -e shell
install Bundle::CPAN
install Locale::gettext
exit
# Install help2man
make install
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/help2man-*.tar.* installed/help2man_*.tar.*
mv help2man-1.49.3.tar.xz installed/
# If you ever want to uninstall help2man, this should do it:
cd
su
test -d src/help2man-* && ( cd src/help2man-* ; make uninstall )
for pfx in /usr /usr/local;
do
rm -f ${pfx}/bin/help2man ${pfx}/info/help2man.info
test -d ${pfx}/lib/help2man && rm -r ${pfx}/lib/help2man
test -d ${pfx}/lib64/help2man && rm -r ${pfx}/lib64/help2man
done
exit
find ~/src -maxdepth 1 -type d -name "help2man-*" -exec rm -r {} \;
rm -f ~/installed/help2man-*.tar.*