5
# Copyright 2012-2013 Alex <alex@linuxonly.ru>
6
# 2013 Graham Inggs <graham@nerve.org.za>
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.
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.
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/>.
28
if [ "x$cflags" = x ] ; then
29
cflags='-mtune=native -O3'
32
for arg_iter in "$@"; do
34
arg_value=${arg_iter#*=}
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."
48
prefix=$(eval echo $arg_value);;
52
libpath=$(eval echo $arg_value);;
55
echo "Using : \"$arg_value\" as compilation options."
56
cflags="$arg_value ";;
62
if $prefixchanged ; then
63
if ! $libpathchanged ; then
68
echo -n "Checking depencies... "
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'
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'
84
echo -n "Generating Makefile_h... "
85
echo "#WARNING: Auto-generated file, edit with care.
88
PREFIX := $prefix" > Makefile_h
91
echo -n "Generating resources.h... "
95
* Copyright 2012 Alex <alex@linuxonly.ru>
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.
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.
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/>.
111
/* WARNING: Auto-generated file, edit with care. */
113
#ifndef __RESOURCES_H__
114
#define __RESOURCES_H__
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\"
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\"
135
#define RESOURCE_SOUND_MESSAGE \"$prefix/share/modem-manager-gui/sounds/message.ogg\"
137
#define RESOURCE_DESKTOP_FILE \"/usr/share/applications/modem-manager-gui.desktop\"
139
#define RESOURCE_MODULES_DIR \"$libpath/modem-manager-gui/modules/\"
141
#define RESOURCE_LOCALE_DIR \"$prefix/share/locale/\"
142
#define RESOURCE_LOCALE_DOMAIN \"modem-manager-gui\"
144
#endif // __RESOURCES_H__" > src/resources.h
147
echo -n "Generating launcher... "
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
163
Categories=System;" > resources/modem-manager-gui.desktop