VirtualBox

source: vbox/trunk/pubtools/setup-linux.sh@ 72136

Last change on this file since 72136 was 72134, checked in by vboxsync, 7 years ago

Make scm happier.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1#!/bin/sh -e
2
3#
4# Copyright (C) 2018 Oracle Corporation
5#
6# This file is part of VirtualBox Open Source Edition (OSE), as
7# available from http://www.virtualbox.org. This file is free software;
8# you can redistribute it and/or modify it under the terms of the GNU
9# General Public License (GPL) as published by the Free Software
10# Foundation, in version 2 as it comes in the "COPYING" file of the
11# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
12# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
13#
14
15# What this script does:
16usage_msg="\
17Usage: `basename ${0}` [--no-docs]
18
19Install the dependencies needed for building VirtualBox on a Linux
20system. Initial support for Enterprise Linux derivatives, additional
21distributions will be added as needed. There are no plans to add
22support for or to accept patches for distributions we do not package.
23The \`--no-docs\' parameter is used to prevent installation of TeX
24packages. Installing TeX is not supported on EL5, so the flag is
25ignored there."
26
27# To repeat: there are no plans to add support for or to accept patches
28# for distributions we do bot package.
29
30unset NODOCS
31
32usage()
33{
34 echo "${usage_msg}"
35 exit "${1}"
36}
37
38while test -n "${1}"; do
39 case "${1}" in
40 --no-docs)
41 NODOCS=1
42 shift ;;
43 -h|--help)
44 usage 0 ;;
45 *)
46 echo "Unknown parameter ${1}" >&2
47 usage 1 ;;
48 esac
49done
50
51LC_ALL=C
52export LC_ALL
53PATH=/sbin:/usr/sbin:$PATH
54
55if test -f /etc/redhat-release; then
56 yum install -y bzip2 gcc-c++ glibc-devel gzip libcap-devel \
57 libIDL-devel libxslt-devel libXmu-devel \
58 make mkisofs openssl-devel pam-devel \
59 python-devel qt-devel rpm-build \
60 wget kernel kernel-devel \
61 tar libpng-devel | grep "No package"
62 # Not EL5
63 if ! grep -q "release 5" /etc/redhat-release; then
64 yum install libcurl-devel libstdc++-static libvpx-devel \
65 pulseaudio-libs-devel SDL-static texlive-latex texlive-latex-bin \
66 texlive-ec texlive-collection-fontsrecommended
67 texlive-pdftex-def texlive-fancybox device-mapper-devel \
68 glibc-static zlib-static glibc-devel.i686 libstdc++.i686 \
69 qt5-qttools-devel qt5-qtx11extras-devel | grep "No package"
70 if test -z "$NODOCS"; then
71 yum install texlive-latex texlive-latex-bin texlive-ec \
72 texlive-pdftex-def texlive-fancybox device-mapper-devel |
73 grep "No package"
74 if test ! -f /usr/share/texmf/tex/latex/bera/beramono.sty; then
75 mkdir -p /usr/share/texmf/tex/latex/bera
76 pushd /usr/share/texmf/tex/latex/bera
77 wget http://www.tug.org/texlive/devsrc/Master/texmf-dist/tex/latex/bera/beramono.sty
78 texhash
79 popd
80 fi
81 fi
82 fi
83 # EL5
84 if grep -q "release 5" /etc/redhat-release; then
85 yum install -y curl-devel SDL-devel libstdc++-devel.i386 \
86 openssh-clients which gcc44-c++ | grep "No package"
87 ln -sf /usr/bin/gcc44 /usr/local/bin/gcc
88 ln -sf /usr/bin/g++44 /usr/local/bin/g++
89 if ! rpm -q python26 > /dev/null; then
90 pythonpkgs="\
91http://archives.fedoraproject.org/pub/archive/epel/5/x86_64/python26-2.6.8-2.el5.x86_64.rpm \
92http://archives.fedoraproject.org/pub/archive/epel/5/x86_64/python26-libs-2.6.8-2.el5.x86_64.rpm \
93http://archives.fedoraproject.org/pub/archive/epel/5/x86_64/python26-devel-2.6.8-2.el5.x86_64.rpm
94http://archives.fedoraproject.org/pub/archive/epel/5/x86_64/libffi-3.0.5-1.el5.x86_64.rpm"
95 tmpdir=`mktemp -d`
96 pushd ${tmpdir}
97 wget ${pythonpkgs}
98 rpm -i *.rpm
99 popd
100 rm -r ${tmpdir}
101 ln -sf /usr/bin/python2.6 /usr/local/bin/python
102 fi
103 if ! rpm -q SDL_ttf-devel > /dev/null; then
104 sdlpkgs="\
105http://archives.fedoraproject.org/pub/archive/epel/5/x86_64/SDL_ttf-2.0.8-3.el5.x86_64.rpm \
106http://archives.fedoraproject.org/pub/archive/epel/5/x86_64/SDL_ttf-devel-2.0.8-3.el5.x86_64.rpm"
107 tmpdir=`mktemp -d`
108 pushd ${tmpdir}
109 wget ${sdlpkgs}
110 rpm -i *.rpm
111 popd
112 rm -r ${tmpdir}
113 fi
114 if test ! -f /usr/local/include/pulse/pulseaudio.h; then
115 tmpdir=`mktemp -d`
116 pushd ${tmpdir}
117 wget --no-check-certificate https://freedesktop.org/software/pulseaudio/releases/pulseaudio-11.1.tar.gz
118 tar -x -z -f pulseaudio-11.1.tar.gz pulseaudio-11.1/src/pulse
119 mkdir -p /usr/local/include/pulse
120 cp pulseaudio-11.1/src/pulse/*.h /usr/local/include/pulse
121 popd
122 rm -r ${tmpdir}
123 fi
124 fi
125fi
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette