Linux HOWTOs

About | Home | Search

HOWTO: unrtf
Description: Converts from Rich Text Format to HTML, LaTeX, troff, and RTF
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything

# GNU UnRTF 0.21.5
# ================
# Get it
test -f installed/unrtf-0.21.5.tar.gz && mv installed/unrtf-0.21.5.tar.gz .
test ! -f unrtf-0.21.5.tar.gz &&

# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "83a43433530e988174098750b0c344ef  unrtf-0.21.5.tar.gz" | md5sum -c

# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "73d22805eb7a83edf5c3c27fe036e3c33248902d  unrtf-0.21.5.tar.gz" | \
 sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 3EC83090 > /dev/null 2>&1 || gpg --recv-keys 3EC83090 ) &&
 wget -nc &&
  gpg --verify unrtf-0.21.5.tar.gz.sig && rm unrtf-0.21.5.tar.gz.sig

# Extract the source
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "unrtf-*" -exec rm -r {} \;
find -maxdepth 1 -type d -name "unrtf_*" -exec rm -r {} \;
tar xzvf ~/unrtf-0.21.5.tar.gz
cd unrtf-0.21.5
test $UID = 0 && chown -R root:root .

# Configure the build
./configure --mandir=/usr/local/man

# Build it

# Note: the default configuration file directory is now
# /usr/local/share/unrtf
# (if upgrading, look for an old /usr/local/lib/unrtf)

# Install it, stripping the binary
su -c "make install-strip"

# Save the source for later
mkdir -p -m 0700 installed
rm -f installed/unrtf-*.tar.* installed/unrtf_*.tar.*
mv unrtf-0.21.5.tar.gz installed/

# If you ever want to uninstall UnRTF, this should do it:
test -d src/unrtf-* && ( cd src/unrtf-* ; make uninstall )
test -d src/unrtf_* && ( cd src/unrtf_* ; make uninstall )
test -d /usr/local/lib/unrtf && rm -r /usr/local/lib/unrtf
test -d /usr/local/share/unrtf && rm -r /usr/local/share/unrtf
rm -f /usr/local/bin/unrtf /usr/local/man/man1/unrtf.1 \
find ~/src -maxdepth 1 -type d -name "unrtf-*" -exec rm -r {} \;
find ~/src -maxdepth 1 -type d -name "unrtf_*" -exec rm -r {} \;
rm -f ~/installed/unrtf-*.tar.* ~/installed/unrtf_*.tar.*

Back to the list

Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>