checklicenses: Fix a FIXME
[metze/wireshark/wip.git] / tools / install_rpms_for_devel.sh
1 #!/bin/bash
2
3 # A little shell script to install all the packages necesary to do Wireshark
4 # development.  Both the development and runtime packages are installed
5 # although the latter aren't strictly necessary.
6 #
7 # Ideally this could automatically pull the packages out of
8 # packaging/rpm/SPECS/wireshark.spec.in but given the variance in package names
9 # between distributions, this seems painful...
10 #
11 # Copyright 2013 Jeff Morriss <jeff.morriss.ws [AT] gmail.com>
12 #
13 # Wireshark - Network traffic analyzer
14 # By Gerald Combs <gerald@wireshark.org>
15 # Copyright 1998 Gerald Combs
16 #
17 # This program is free software; you can redistribute it and/or
18 # modify it under the terms of the GNU General Public License
19 # as published by the Free Software Foundation; either version 2
20 # of the License, or (at your option) any later version.
21 #
22 # This program is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25 # GNU General Public License for more details.
26 #
27 # You should have received a copy of the GNU General Public License
28 # along with this program; if not, write to the Free Software
29 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30
31 if [ -r /etc/SuSE-release ]
32 then
33         INSTALL_CMD=zypper
34         GTK2="gtk2-devel libgtk-2_0-0"
35         GTK3="gtk3-devel libgtk-3-0"
36         QT="libqt4-devel gcc-c++"
37         GLIB2="glib2-devel libglib-2_0-0"
38         PCAP="libpcap-devel libpcap1"
39         ZLIB="zlib-devel libz1"
40         CARES="libcares-devel libcares2"
41 else
42         if [ ! -r /etc/redhat-release ]
43         then
44                 echo "* * Unknown distro! Assuming Redhat-like. * *"
45                 echo
46         fi
47
48         if type -p dnf > /dev/null
49         then
50                 INSTALL_CMD=dnf
51         else
52                 INSTALL_CMD=yum
53         fi
54         GTK2="gtk2-devel gtk2"
55         GTK3="gtk3-devel gtk3"
56         QT="qt-devel gcc-c++ qt5-qtbase-devel qt5-qtmultimedia-devel"
57         GLIB2="glib2-devel glib2"
58         PCAP="libpcap-devel libpcap"
59         ZLIB="zlib-devel zlib"
60         CARES="c-ares-devel c-ares"
61 fi
62
63 PKGS="autoconf automake libtool gcc flex bison python perl $GLIB2
64 $PCAP $ZLIB lua-devel lua $CARES $GTK3 $GTK2 desktop-file-utils $QT fop
65 asciidoc git git-review perl-podlators"
66
67 echo "Run this command (as root):"
68 echo
69 echo $INSTALL_CMD install $PKGS
70