# Prerequisites:
# gettext (if you do not use --disable-nls)
# libc's iconv or libiconv
# Emacs (optional)
# Valgrind (optional)
# pkg-config
# gtk-doc (Slackware includes this in the sgml-tools/linuxdoc-tools)
# Get it
cd
test -f installed/libidn-1.35.tar.gz &&
mv -f installed/libidn-1.35.tar.gz .
test ! -f libidn-1.35.tar.gz &&
wget https://ftpmirror.gnu.org/gnu/libidn/libidn-1.35.tar.gz
# Verify tarball w/ sha1sum:
# (this came from my gpg-verified tarball)
echo "d06a1e04caf5478cfb3ce525a83701a73b564fca libidn-1.35.tar.gz" | \
sha1sum -c
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "libidn-*" -exec rm -r {} \;
tar xzvf ~/libidn-1.35.tar.gz
cd libidn-1.35
test $UID = 0 && chown -R root:root .
# I use --disable-nls because I only read/write English (well)
# Seems kind of odd to use for a library that handles internationalization,
# so you may want to leave that off
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --infodir=/usr/info --libdir=/usr/lib64 \
--mandir=/usr/man --disable-static
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --infodir=/usr/info --mandir=/usr/man \
--disable-static
# Build it
make
# Become root to install it
su
# Remove the Slackware package, if there is one
# You will still have libidn.so.* after this because it is also
# part of the aaa_elflibs package
test -x /sbin/removepkg && /sbin/removepkg libidn
# 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 source for later
cd
mkdir -p -m 0700 src
rm -f installed/libidn-*.tar.*
mv libidn-1.35.tar.gz installed/
# If you ever want to uninstall Libidn, this should do it:
cd
su
test -d src/libidn-* && ( cd src/libidn-* ; make uninstall )
( cd /usr/include
rm -f idn-free.h idn-int.h idna.h pr29.h punycode.h stringprep.h tld.h )
( /usr/info ; rm -f libidn.info libidn-components.png )
( cd /usr/man/man3
rm -f idn_free.3 idna_*.3 pr29_*.3 punycode_decode.3 punycode_encode.3 \
punycode_strerror.3 stringprep.3 stringprep_*.3 tld_*.3 )
( cd /usr/share/emacs/site-lisp ; rm -f idna.el punycode.el )
find /usr/share/locale -type d -name "libidn.mo" -exec rm {} \;
rm -f /usr/bin/idn /usr/lib*/libidn.* /usr/lib64/pkgconfig/libidn.pc \
/usr/man/man1/idn.1
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libidn-*" -exec rm -r {} \;
rm -f ~/installed/libidn-*.tar.*