~ubuntu-branches/ubuntu/quantal/mupen64plus/quantal

« back to all changes in this revision

Viewing changes to .pc/dont-install-unneeded.patch/install.sh

  • Committer: Bazaar Package Importer
  • Author(s): Sven Eckelmann, Sven Eckelmann, Piotr Ożarowski
  • Date: 2010-05-06 11:34:46 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100506113446-jfcd6uk7waudel82
Tags: 1.5+dfsg1-10
[ Sven Eckelmann ]
* debian/patches:
  - Add rsp_ucode2_reset.patch, Reset status of specific ucode2 hacks after
    starting again
  - Add rsp_hle_bigendian.patch, Fix wrong high level emulation of rsp on big
    endian systems
  - Add rice-crash-vendorstring.patch, Don't crash on long OpenGL vendor
    string (Closes: #580480, LP: #575968)

[ Piotr Ożarowski ]
* DMUA flag set to yes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# mupen64plus install script
 
4
#
 
5
# Copyright 2007, 2008 The Mupen64Plus Development Team
 
6
# Modifications Copyright 2008 Guido Berhoerster
 
7
#
 
8
# This program is free software; you can redistribute it and/or
 
9
# modify it under the terms of the GNU General Public License
 
10
# as published by the Free Software Foundation; either version 2
 
11
# of the License, or (at your option) any later version.
 
12
#
 
13
# This program is distributed in the hope that it will be useful,
 
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
# GNU General Public License for more details.
 
17
#
 
18
# You should have received a copy of the GNU General Public License
 
19
# along with this program; if not, write to the Free Software
 
20
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
21
# 02110-1301, USA.
 
22
#
 
23
 
 
24
set -e
 
25
 
 
26
export PATH=/bin:/usr/bin
 
27
 
 
28
GINSTALLFLAG=-D
 
29
 
 
30
if command -v ginstall >/dev/null 2>&1; then
 
31
    INSTALL=ginstall
 
32
elif install --help >/dev/null 2>&1; then
 
33
    INSTALL=install
 
34
elif [ -e "`which install 2>/dev/null`" ]; then 
 
35
    printf "warning: GNU install not found, assuming BSD install\n" >&2
 
36
    INSTALL=install
 
37
    GINSTALLFLAG=
 
38
else
 
39
    printf "error: install tool not found\n" >&2
 
40
    exit 1
 
41
fi
 
42
 
 
43
usage()
 
44
{
 
45
printf "usage: $(basename $0) [PREFIX] [SHAREDIR] [BINDIR] [LIBDIR] [MANDIR] [APPLICATIONSDIR]
 
46
\tPREFIX   - installation directories prefix (default: /usr/local)
 
47
\tSHAREDIR - path to Mupen64Plus shared data files (default: \$PREFIX/share/mupen64plus)
 
48
\tBINDIR   - path to Mupen64Plus binary program files (default: \$PREFIX/bin)
 
49
\tLIBDIR   - path to Mupen64Plus plugins (default: \$SHAREDIR/plugins)
 
50
\tMANDIR   - path to manual files (default: \$PREFIX/man/man1)
 
51
\tAPPLICATIONSDIR - path to place .desktop file in (default: \$PREFIX/share/applications)
 
52
"
 
53
}
 
54
 
 
55
if [ $# -gt 6 ]; then
 
56
        usage
 
57
        exit 1
 
58
fi
 
59
 
 
60
PREFIX="${1:-/usr/local}"
 
61
SHAREDIR="${2:-${PREFIX}/share/mupen64plus}"
 
62
BINDIR="${3:-${PREFIX}/bin}"
 
63
LIBDIR="${4:-${SHAREDIR}/plugins}"
 
64
MANDIR="${5:-${PREFIX}/man/man1}"
 
65
APPLICATIONSDIR="${6:-${PREFIX}/share/applications}"
 
66
 
 
67
printf "Installing Mupen64Plus to ${PREFIX}\n"
 
68
$INSTALL -d -v "${SHAREDIR}"
 
69
$INSTALL -d -v "${SHAREDIR}/config"
 
70
$INSTALL -m 0644 config/* "${SHAREDIR}/config"
 
71
$INSTALL -m 0644 mupen64plus.ini "${SHAREDIR}/"
 
72
$INSTALL -d -v "${SHAREDIR}/doc"
 
73
$INSTALL -m 0644 doc/* "${SHAREDIR}/doc"
 
74
$INSTALL -d -v "${SHAREDIR}/fonts"
 
75
$INSTALL -m 0644 fonts/* "${SHAREDIR}/fonts"
 
76
$INSTALL -d -v "${SHAREDIR}/icons"
 
77
$INSTALL -m 0644 icons/*.png "${SHAREDIR}/icons"
 
78
$INSTALL -d -v "${SHAREDIR}/icons/32x32"
 
79
$INSTALL -m 0644 icons/32x32/* "${SHAREDIR}/icons/32x32"
 
80
$INSTALL -d -v "${SHAREDIR}/icons/22x22"
 
81
$INSTALL -m 0644 icons/22x22/* "${SHAREDIR}/icons/22x22"
 
82
$INSTALL -d -v "${SHAREDIR}/icons/16x16"
 
83
$INSTALL -m 0644 icons/16x16/* "${SHAREDIR}/icons/16x16"
 
84
$INSTALL -d -v "${SHAREDIR}/lang"
 
85
$INSTALL -m 0644 lang/* "${SHAREDIR}/lang"
 
86
$INSTALL $GINSTALLFLAG -m 0755 mupen64plus "${BINDIR}/mupen64plus"
 
87
$INSTALL -d -v "${MANDIR}"
 
88
$INSTALL -m 0644 doc/mupen64plus.1.gz "${MANDIR}"
 
89
$INSTALL -d -v "${LIBDIR}"
 
90
if [ -f mupen64plus.desktop ]
 
91
then
 
92
    $INSTALL -d -v "${APPLICATIONSDIR}"
 
93
    $INSTALL -m 0644 mupen64plus.desktop "${APPLICATIONSDIR}"
 
94
fi
 
95
if [ "x$(ls plugins/)" != "x" ]
 
96
then
 
97
    $INSTALL -m 0644 plugins/* "${LIBDIR}"
 
98
fi
 
99
if [ "x$(ls translations/*.qm 2>/dev/null)" != "x" ]
 
100
then
 
101
    $INSTALL -d -v "${SHAREDIR}/translations"
 
102
    $INSTALL -m 0644 translations/*.qm "${SHAREDIR}/translations"
 
103
fi
 
104
 
 
105
printf "Done.\n"
 
106