WFDB Software Package 10.6.2

File: <base>/install-wave32 (2,896 bytes)
#! /bin/sh
# file: install-wave32		G. Moody	7 October 2008
#				Last revised:	15 December 2015
# Build and install WAVE on 64-bit GNU/Linux platforms

# *****************************************************************************
# This script builds and installs 'wave' as a 32-bit application on x86_64
# (AMD/Intel 64-bit) Fedora GNU/Linux.  It has been tested on Fedora 12, 14, 16,
# and 18; it will probably require modification on other platforms.
# Part 1 of this script automates installation of prerequisite 32-bit libraries
# and *.h files on Fedora GNU/Linux and compatible platforms such as Red Hat,
# Scientific Linux, and Centos.  It is harmless to rerun this script if some or
# all of these prerequisites have been installed already.
# If you use another GNU/Linux platform such as Debian, Ubuntu, or Mint:
# You will need to install these prerequisites in some other way before running
# part 2 of this script using the -q option; see
# for details.
# *****************************************************************************

set -e

echo "If this script fails, read it for troubleshooting hints."

# Part 1: install prerequisites (unless skipped using -q option)
if [ "x$1" != "x-q" ]; then
  if [ $UID != 0 ]; then
    echo "You do not have root (superuser) permissions, so this script may fail"
    echo "if it needs to install missing libraries.  If this happens, rerun it"
    echo "as root (e.g., using su or sudo)."

  # Install fonts and 32-bit libraries available from Fedora repositories
  yum -y install make gcc glibc-devel \
        libgcc.i686 glibc-devel.i686 libX11-devel.i686 \
	libXpm-devel.i686 libcurl.i686 libcurl-devel.i686 \
	xorg-x11-fonts-100dpi xorg-x11-fonts-ISO8859-1-100dpi \
	xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-75dpi \

  # Install XView libraries and development toolkit available from PhysioNet
  for pkg in $PACKAGES; do
    wget -O $pkg$pkg
  if ! sha256sum -c - <<EOF
0af569dbef5fc244159e20728e43ad693be49c828595a12baebb6b0d6ec42e24  xview-3.2p1.4-21.1.fc8.i386.rpm
ae7cd665be7ffa4557df4bdcf44e381da391c8e7996512d8d718437b09e09d07  xview-clients-3.2p1.4-21.1.fc8.i386.rpm
b0900d75a8a75223f2ab3aeaa7fa9c14f814c59a576557892298a6fdc257e96a  xview-devel-3.2p1.4-21.1.fc8.i386.rpm
    echo "Unable to download/verify XView package(s)."
    exit 1
  rpm -Uvh --replacepkgs $PACKAGES

# Part 2: compile and install 32-bit WFDB library and WAVE
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
make clean
./configure -m32 $*
cd lib;
 make install
cd ../wave;
 make install
cd ../waverc;
 make install
cd ..;
 make clean