VirtualBox

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

Last change on this file since 72132 was 72123, checked in by vboxsync, 7 years ago

tools: add a script to install build dependencies on (initially) an EL5 host.
bugref:9165: webtools: create scripts for (re-)creating chroot build jails

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

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