VirtualBox

source: vbox/trunk/tools/bin/prerequisites-rpm.sh@ 72914

Last change on this file since 72914 was 72912, checked in by vboxsync, 7 years ago

prerequisites-rpm.sh: add support for openSUSE.
bugref:9200: Infrastructure/Linux: need an openSUSE 15 chroot
Used for installing VirtualBox build requirements on an openSUSE system,
tested with openSUSE 15.0.

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