This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
forked from bemoody/wfdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-wave32
executable file
·74 lines (67 loc) · 2.83 KB
/
install-wave32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#! /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
# http://physionet.org/physiotools/wave-installation.shtml
# for details.
# *****************************************************************************
set -e
echo
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)."
fi
# 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 \
xorg-x11-fonts-misc
# Install XView libraries and development toolkit available from PhysioNet
PACKAGES='xview-3.2p1.4-21.1.fc8.i386.rpm
xview-clients-3.2p1.4-21.1.fc8.i386.rpm
xview-devel-3.2p1.4-21.1.fc8.i386.rpm'
for pkg in $PACKAGES; do
wget -O $pkg http://physionet.org/physiotools/xview/i386-Fedora/$pkg
done
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
EOF
then
echo "Unable to download/verify XView package(s)."
exit 1
fi
rpm -Uvh --replacepkgs $PACKAGES
fi
# 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