Add my pre-commit git script (with checkAPI/hf/encoding args...) Need to copy in...
[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 # $Id$
14 #
15 # Wireshark - Network traffic analyzer
16 # By Gerald Combs <gerald@wireshark.org>
17 # Copyright 1998 Gerald Combs
18 #
19 # This program is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU General Public License
21 # as published by the Free Software Foundation; either version 2
22 # of the License, or (at your option) any later version.
23 #
24 # This program is distributed in the hope that it will be useful,
25 # but WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27 # GNU General Public License for more details.
28 #
29 # You should have received a copy of the GNU General Public License
30 # along with this program; if not, write to the Free Software
31 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32
33 if [ -r /etc/SuSE-release ]
34 then
35         INSTALL_CMD=zypper
36         GTK2="gtk2-devel libgtk-2_0-0"
37         GTK3="gtk3-devel libgtk-3-0"
38         QT="libqt4-devel gcc-c++"
39         GLIB2="glib2-devel libglib-2_0-0"
40         PCAP="libpcap-devel libpcap1"
41         ZLIB="zlib-devel libz1"
42         CARES="libcares-devel libcares2"
43 else
44         if [ ! -r /etc/redhat-release ]
45         then
46                 echo "* * Unknown distro! Assuming Redhat-like. * *"
47                 echo
48         fi
49
50         INSTALL_CMD=yum
51         GTK2="gtk2-devel gtk2"
52         GTK3="gtk3-devel gtk3"
53         QT="qt-devel gcc-c++"
54         GLIB2="glib2-devel glib2"
55         PCAP="libpcap-devel libpcap"
56         ZLIB="zlib-devel zlib"
57         CARES="c-ares-devel c-ares"
58 fi
59
60 # Assume if they've got this script they've got subversion already...
61 PKGS="autoconf automake libtool gcc flex bison python perl $GLIB2
62 $PCAP $ZLIB lua-devel lua $CARES $GTK2 desktop-file-utils $QT fop asciidoc"
63
64 echo "Run this command (as root):"
65 echo
66 echo $INSTALL_CMD install -y $PKGS
67