~ubuntu-branches/ubuntu/trusty/modem-manager-gui/trusty-backports

« back to all changes in this revision

Viewing changes to configure

  • Committer: Package Import Robot
  • Author(s): Graham Inggs
  • Date: 2013-07-30 12:51:59 UTC
  • Revision ID: package-import@ubuntu.com-20130730125159-flzv882fhuzhmfmi
Tags: upstream-0.0.16
Import upstream version 0.0.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
#      configure
 
4
#      
 
5
#      Copyright 2012-2013 Alex <alex@linuxonly.ru>
 
6
#                     2013 Graham Inggs <graham@nerve.org.za>
 
7
#      
 
8
#      This program is free software: you can redistribute it and/or modify
 
9
#      it under the terms of the GNU General Public License as published by
 
10
#      the Free Software Foundation; either version 3 of the License, or
 
11
#      (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, see <http://www.gnu.org/licenses/>.
 
20
 
 
21
 
 
22
prefix=/usr
 
23
libpath=/usr/lib
 
24
prefixchanged=false
 
25
libpathchanged=false
 
26
 
 
27
cflags=$CFLAGS
 
28
if [ "x$cflags" = x ] ; then
 
29
    cflags='-mtune=native -O3'
 
30
fi
 
31
 
 
32
for arg_iter in "$@"; do
 
33
    arg=${arg_iter%%=*}
 
34
    arg_value=${arg_iter#*=}
 
35
    case $arg in
 
36
        --help)
 
37
echo "This script generates Modem Manager GUI configuration and build files. It also
 
38
checks if all dependencies are fulfilled.
 
39
Used without arguments, default settings are applied. Arguments are :
 
40
    --help : Display this message and exit.
 
41
    --prefix=PATH : Set PATH as file-system root for installation.
 
42
    --libdir=PATH : Set PATH as a directory for libraries.
 
43
    --cflags=PARAMETERS : Pass PARAMETERS to the compiler."
 
44
            exit 0;;
 
45
 
 
46
        --prefix)
 
47
            prefixchanged=true
 
48
            prefix=$(eval echo $arg_value);;
 
49
 
 
50
        --libdir)
 
51
            libpathchanged=true
 
52
            libpath=$(eval echo $arg_value);;
 
53
 
 
54
        --cflags)
 
55
            echo "Using : \"$arg_value\" as compilation options."
 
56
            cflags="$arg_value ";;
 
57
 
 
58
        
 
59
    esac
 
60
done
 
61
 
 
62
if $prefixchanged ; then
 
63
    if ! $libpathchanged ; then 
 
64
            libpath="$prefix/lib"
 
65
    fi
 
66
fi
 
67
 
 
68
echo -n "Checking depencies... "
 
69
 
 
70
if ! pkg-config  --print-errors --exists 'gtk+-3.0 >= 3.4.0'; then
 
71
  echo 'ERROR: Please install GTK+ version 3.4.0 or later'
 
72
  exit 1
 
73
fi
 
74
 
 
75
if ! test -e "/usr/include/gdbm/gdbm.h"; then
 
76
        if ! test -e "/usr/include/gdbm.h"; then
 
77
                echo 'ERROR: Please install GDBM library with development headers'
 
78
                exit 1
 
79
        fi
 
80
fi
 
81
echo done
 
82
 
 
83
 
 
84
echo -n "Generating Makefile_h... "
 
85
echo "#WARNING: Auto-generated file, edit with care.
 
86
CFLAGS := $cflags
 
87
LIBPATH := $libpath
 
88
PREFIX := $prefix" > Makefile_h
 
89
echo done
 
90
 
 
91
echo -n "Generating resources.h... "
 
92
echo "/*
 
93
 *      resources.h
 
94
 *      
 
95
 *      Copyright 2012 Alex <alex@linuxonly.ru>
 
96
 *      
 
97
 *      This program is free software: you can redistribute it and/or modify
 
98
 *      it under the terms of the GNU General Public License as published by
 
99
 *      the Free Software Foundation; either version 3 of the License, or
 
100
 *      (at your option) any later version.
 
101
 *      
 
102
 *      This program is distributed in the hope that it will be useful,
 
103
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 
104
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
105
 *      GNU General Public License for more details.
 
106
 *      
 
107
 *      You should have received a copy of the GNU General Public License
 
108
 *      along with this program. If not, see <http://www.gnu.org/licenses/>.
 
109
 */
 
110
 
 
111
/* WARNING: Auto-generated file, edit with care. */
 
112
 
 
113
#ifndef __RESOURCES_H__
 
114
#define __RESOURCES_H__
 
115
 
 
116
#define RESOURCE_MAINWINDOW_ICON         \"$prefix/share/pixmaps/modem-manager-gui.png\"
 
117
#define RESOURCE_MAINWINDOW_UI           \"$prefix/share/modem-manager-gui/ui/modem-manager-gui.ui\"
 
118
 
 
119
#define RESOURCE_TOOLBAR_DEV             \"$prefix/share/modem-manager-gui/pixmaps/dev-tb.png\"
 
120
#define RESOURCE_TOOLBAR_SMS             \"$prefix/share/modem-manager-gui/pixmaps/sms-tb.png\"
 
121
#define RESOURCE_TOOLBAR_USSD            \"$prefix/share/modem-manager-gui/pixmaps/ussd-tb.png\"
 
122
#define RESOURCE_TOOLBAR_INFO            \"$prefix/share/modem-manager-gui/pixmaps/info-tb.png\"
 
123
#define RESOURCE_TOOLBAR_SCAN            \"$prefix/share/modem-manager-gui/pixmaps/scan-tb.png\"
 
124
#define RESOURCE_TOOLBAR_CONT            \"$prefix/share/modem-manager-gui/pixmaps/cont-tb.png\"
 
125
#define RESOURCE_TOOLBAR_TRAFFIC         \"$prefix/share/modem-manager-gui/pixmaps/traffic-tb.png\"
 
126
#define RESOURCE_SMS_READ                \"$prefix/share/modem-manager-gui/pixmaps/sms-read.png\"
 
127
#define RESOURCE_SMS_UNREAD              \"$prefix/share/modem-manager-gui/pixmaps/sms-unread.png\"
 
128
#define RESOURCE_MESSAGE_RECIEVED        \"$prefix/share/modem-manager-gui/pixmaps/message-received.png\"
 
129
#define RESOURCE_MESSAGE_SENT            \"$prefix/share/modem-manager-gui/pixmaps/message-sent.png\"
 
130
#define RESOURCE_MESSAGE_DRAFTS          \"$prefix/share/modem-manager-gui/pixmaps/message-drafts.png\"
 
131
#define RESOURCE_INFO_EQUIPMENT          \"$prefix/share/modem-manager-gui/pixmaps/info-equipment.png\"
 
132
#define RESOURCE_INFO_NETWORK            \"$prefix/share/modem-manager-gui/pixmaps/info-network.png\"
 
133
#define RESOURCE_INFO_LOCATION           \"$prefix/share/modem-manager-gui/pixmaps/info-location.png\"
 
134
 
 
135
#define RESOURCE_SOUND_MESSAGE           \"$prefix/share/modem-manager-gui/sounds/message.ogg\"
 
136
 
 
137
#define RESOURCE_DESKTOP_FILE            \"/usr/share/applications/modem-manager-gui.desktop\"
 
138
 
 
139
#define RESOURCE_MODULES_DIR             \"$libpath/modem-manager-gui/modules/\"
 
140
 
 
141
#define RESOURCE_LOCALE_DIR              \"$prefix/share/locale/\"
 
142
#define RESOURCE_LOCALE_DOMAIN           \"modem-manager-gui\"
 
143
 
 
144
#endif // __RESOURCES_H__" > src/resources.h
 
145
echo done
 
146
 
 
147
echo -n "Generating launcher... "
 
148
echo "
 
149
[Desktop Entry]
 
150
Name=Modem Manager GUI
 
151
GenericName=Modem Manager GUI
 
152
Comment=Graphical interface for Modem manager daemon control
 
153
Comment[ru]=Программа для управления специфическими функциями EDGE/3G/4G модемов
 
154
Comment[uz]=EDGE/3G/4G modemning o'ziga xos vazifalarini boshqarish vositasi
 
155
Comment[uk]=Інструмент для керування специфічними функціями EDGE/3G/4G модемів
 
156
Comment[pt_BR]=Ferramenta para controle de funções específicas de modem EDGE/3G/4G
 
157
Comment[tr]=EDGE/3G/4G modemler için özel işlev kontrol aracı
 
158
Comment[id]=Perangkat lunak untuk mengendalikan fungsi spesifik modem EDGE/3G/4G
 
159
Exec=$prefix/bin/modem-manager-gui
 
160
Icon=$prefix/share/pixmaps/modem-manager-gui.png
 
161
Terminal=false
 
162
Type=Application
 
163
Categories=System;" > resources/modem-manager-gui.desktop
 
164
echo done
 
165