Begin cleanup of make-dissector-reg.py
[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         SNAPPY="snappy-devel libsnappy1"
41         # The runtime package name changes with the version.  Just pull it
42         # in through the -devel package.
43         LZ4="liblz4-devel"
44         CARES="libcares-devel libcares2"
45         NGHTTP2="nghttp2"
46         # SUSE doesn't split the pod2* commands into a separate package like RH
47         PERLPODS=""
48         GEOIP="libGeoIP-devel"
49         GNUTLS="libgnutls-devel"
50         GETTEXT="gettext-tools"
51         QT5="libqt5-linguist-devel libqt5-qtsvg-devel libqt5-qtmultimedia-devel
52                 libQt5PrintSupport-devel"
53         CAP_PROGS="libcap-progs"
54 else
55         if [ ! -r /etc/redhat-release ]
56         then
57                 echo "* * Unknown distro! Assuming Redhat-like. * *"
58                 echo
59         fi
60
61         if type -p dnf > /dev/null
62         then
63                 INSTALL_CMD=dnf
64                 POD2HTML="perl-Pod-Html"
65         else
66                 INSTALL_CMD=yum
67         fi
68         GTK2="gtk2-devel gtk2"
69         GTK3="gtk3-devel gtk3"
70         QT="qt-devel gcc-c++ qt5-qtbase-devel qt5-qtmultimedia-devel"
71         GLIB2="glib2-devel glib2"
72         PCAP="libpcap-devel libpcap"
73         ZLIB="zlib-devel zlib"
74         SNAPPY="snappy-devel snappy"
75         LZ4="lz4 lz4-devel" # May need to enable EPEL
76         CARES="c-ares-devel c-ares"
77         NGHTTP2="libnghttp2"
78         PERLPODS="perl-podlators"
79         GEOIP="GeoIP-devel"
80         GNUTLS="gnutls-devel"
81         GETTEXT="gettext-devel"
82         QT5="qt5-linguist qt5-qtsvg-devel"
83 fi
84
85 PKGS="autoconf automake libtool gcc flex bison python perl $GLIB2
86 $PCAP $ZLIB lua-devel lua $CARES $GTK3 $GTK2 desktop-file-utils $QT fop
87 asciidoc git git-review $PERLPODS"
88
89 PKGS_OPT="libnl3-devel libnghttp2-devel $NGHTTP2 $SNAPPY $LZ4 libcap $CAP_PROGS
90 libcap-devel lynx $GEOIP libgcrypt-devel $GNUTLS $GETTEXT libssh-devel
91 krb5-devel perl-Parse-Yapp sbc-devel libsmi-devel $POD2HTML $QT5"
92
93 echo "Run this command (as root):"
94 echo
95 echo $INSTALL_CMD install $PKGS
96 echo
97 echo "To install optional packages:"
98 echo
99 echo $INSTALL_CMD install $PKGS_OPT
100 echo
101 echo "This tool has been obsoleted by tools/rpm-setup.sh"