summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2009-07-29 12:36:47 +0200
committerMichal Čihař <michal@cihar.com>2009-07-29 12:36:47 +0200
commit209b670b227941c3019397194c631717563ebc97 (patch)
treec579087158f9e5b806d96b4dee8f3f1aa9e08765 /admin
Imported Upstream version 1.25.0
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/Lindent2
-rwxr-xr-xadmin/generate-man1032
-rwxr-xr-xadmin/get-se-list61
-rwxr-xr-xadmin/locales-stats19
-rwxr-xr-xadmin/locales-update78
-rwxr-xr-xadmin/make-release177
-rwxr-xr-xadmin/new-lang24
-rwxr-xr-xadmin/po4a19
-rw-r--r--admin/po4a.config15
-rwxr-xr-xadmin/set-version34
10 files changed, 1461 insertions, 0 deletions
diff --git a/admin/Lindent b/admin/Lindent
new file mode 100755
index 0000000..626c17e
--- /dev/null
+++ b/admin/Lindent
@@ -0,0 +1,2 @@
+#!/bin/sh
+indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cli8 -bad "$@"
diff --git a/admin/generate-man b/admin/generate-man
new file mode 100755
index 0000000..675051d
--- /dev/null
+++ b/admin/generate-man
@@ -0,0 +1,1032 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# vim: expandtab sw=4 ts=4 sts=4:
+'''
+Gammu man page generator
+'''
+__author__ = 'Michal Čihař'
+__email__ = 'michal@cihar.com'
+__license__ = '''
+Copyright © 2003 - 2009 Michal Čihař
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 as published by
+the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+'''
+
+# Configuration
+
+'''
+Path to gammu binary.
+'''
+BIN_PATH = 'build/gammu/gammu'
+
+'''
+Output path where man page will be stored.
+'''
+OUT_PATH = 'docs/user/gammu.1'
+
+
+# Man page data
+
+HEADER = '.TH "GAMMU" "1" "%(date)s" "Gammu %(version)s" "Gammu Documentation"\n'
+SECTION = '\n.SH "%s"\n'
+SUBSECTION = '\n.SS "%s"\n'
+PARAGRAPH = '.P\n%s\n'
+COMMAND = '.TP\n.BI "%s" " %s"\n%s\n'
+COMMAND_NOPARAM = '.TP\n.BI "%s"\n%s\n'
+
+# Fixed parts
+
+SEE_ALSO = '''
+.P
+gammu\\-smsd(1), gammu\\-smsd\\-inject(1), gammurc(5), jadmaker(1)
+
+Some more hints can be found in README file or on wiki <http://www.gammu.org/>.
+
+Related programs which can be used with GSM modem:
+
+cu(1), gnokii(1), minicom(1)
+
+Graphical interfaces for Gammu:
+
+wammu(1), gmobilemedia(1)
+
+'''
+
+AUTHOR = '''
+.P
+You can contact authors on <gammu-users@lists.sourceforge.net>.
+
+.P
+\\fIMichal Cihar\\fR
+<michal@cihar.com>
+is current project maintainer and contributor of most of AT and OBEX
+code.
+
+.P
+\\fIMarcin Wiacek\\fR
+<marcin@mwiacek.com>
+is project iniciator and contributor of most Nokia code.
+
+.P
+As this project grew from Gnokii, we would like to thanks all Gnokii
+developers, especially \\fIPavel Janik\\fR, \\fIPawel Kot\\fR
+and \\fIManfred Jonsson\\fR (see CREDITS from Gnokii for all their
+contributor).
+
+.P
+Many other people have helped with various features, check ChangeLog for
+more details.
+'''
+
+FILES = '''
+.P
+\\fI~/.gammurc\\fP
+.br
+\\fI/usr/share/doc/gammu/*\\fP
+.br
+\\fI/dev/ircomm?\\fP
+.br
+\\fI/dev/ttyS?\\fP
+.br
+\\fI/dev/ttyACM?\\fP
+'''
+
+EXAMPLE = '''
+.P
+To check it out, you need to have configuration file for gammu, see gammurc(5)
+for more details about it.
+
+.TP
+Save text message up to standard 160 chars:
+
+echo "All your base are belong to us" | gammu savesms TEXT
+
+or
+
+gammu savesms TEXT \\-text "All your base are belong to us"
+
+.TP
+Save long text message:
+
+echo "All your base are belong to us" | gammu savesms TEXT \\-len 400
+
+or
+
+gammu savesms TEXT \\-len 400 \\-text "All your base are belong to us"
+
+or
+
+gammu savesms EMS \\-text "All your base are belong to us"
+
+.TP
+Save some funky message with predefined sound and animation from 2 bitmaps:
+
+gammu savesms EMS \\-text "Greetings" \\-defsound 1 \\-text "from Gammu"
+\\-tone10 axelf.txt \\-animation 2 file1.bmp file2.bmp
+
+.TP
+Save protected message with ringtone:
+
+gammu savesms EMS \\-protected 2 \\-variablebitmaplong ala.bmp
+\\-toneSElong axelf.txt \\-toneSE ring.txt
+'''
+
+NAME = '''
+.P
+Gammu - Does some neat things with your cellular phone or modem.
+'''
+
+DESCRIPTION = '''
+.P
+This program is a tool for mobile phones. Many vendors and phones
+are supported, for actual listing see <http://cihar.com/gammu/phonedb/>.
+'''
+
+COPYRIGHT = '''
+Copyright \(co 2003-2009 Marcin Wiacek, Michal Cihar and other authors.
+License GPLv2: GNU GPL version 2 <http://www.gnu.org/licenses/old\\-licenses/gpl\\-2.0.html>
+.br
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+'''
+
+BUGS = '''
+There are definitely many bugs, reporting to author is welcome. Please include
+some useful information when sending bug reports (especially debug logs,
+operating system, it's version and phone information are needed).
+
+.P
+To generate debug log, enable it in gammurc (alternatively you can
+do it on command line using \\-d textall \\-f /tmp/gammu.log):
+
+ [gammu]
+ ...your connection settings...
+ logfile = /tmp/gammu.log
+ logformat = textall
+
+With this settings, Gammu generates /tmp/gammu.log on each connection to
+phone and stores dump of communication there. You can also find some
+hints for improving support for your phone in this log.
+
+Please report bugs to <http://bugs.cihar.com>.
+'''
+
+# Commands help, initially generated from original gammu man page
+
+HELP = {}
+HELP['help'] = '''Output help information and exit.
+'''
+HELP['version'] = '''Output version information and exit.
+'''
+HELP['checkversion'] = '''Checks whether there is newer Gammu version available online
+(if Gammu has been compiled with CURL). If you pass additional parameter stable, only
+stable versions will be checked.
+'''
+HELP['checkfirmware'] = '''
+Gammu connects to www.gammu.org and checks for latest firmware versions
+available for the device. The file
+<http://www.gammu.org/support/phones/phonedbxml.php?model=x> will be
+downloaded, all phone details will be read from it and (if any higher firmware
+exist) displayed info to user on each application startup. No private data are
+sent to server. Internet connection to www.gammu.org on port 80 required.
+'''
+HELP['identify'] = '''Show the most important phone data.
+'''
+HELP['monitor'] = '''Get phone status and writes continuously to standard output. Press Ctrl+C
+to break this state.
+'''
+HELP['reset'] = '''Make phone reset: soft (without asking for PIN) or hard (with PIN).
+
+\\fINote:\\fR some phones will make hard reset even with \\fBSOFT\\fR option.
+'''
+HELP['resetphonesettings'] = '''Reset phone settings. \\fIBE CAREFULL !!!!\\fR
+
+\\fBPHONE:\\fR
+.br
+
+\\fBDEV:\\fR
+.br
+
+\\fBALL:\\fR
+
+Clear user settings
+.br
+* removes or set logos to default
+.br
+* set default phonebook and other menu settings
+.br
+* clear T9 words,
+.br
+* clear call register info
+.br
+* set default profiles settings
+.br
+* clear user ringtones
+
+\\fBUIF:\\fR
+.br
+* changes like after \\fBALL\\fR
+.br
+* disables netmon and PPS (all "hidden" menus)
+
+\\fBFACTORY:\\fR
+.br
+* changes like after \\fBUIF\\fR
+.br
+* clear date/time
+'''
+HELP['presskeysequence'] = '''Press specified key sequence on phone keyboard
+
+\\fBmM\\fR - Menu
+.br
+\\fBnN\\fR - Names key
+.br
+\\fBpP\\fR - Power
+.br
+\\fBuU\\fR - Up
+.br
+\\fBdD\\fR - Down
+.br
+\\fB+\\-\\fR - +\\-
+.br
+\\fBgG\\fR - Green
+.br
+\\fBrR\\fR - Red
+.br
+\\fB123456789*0#\\fR is numeric keyboard
+'''
+HELP['getdisplaystatus'] = ''''''
+HELP['getprofile'] = ''''''
+HELP['setautonetworklogin'] = ''''''
+HELP['getsecuritystatus'] = '''Show, if phone wait for security code (like PIN, PUK, etc.) or not
+'''
+HELP['entersecuritycode'] = '''Allow to enter security code from PC. When code is \\-, it is read from stdin.
+'''
+HELP['listnetworks'] = '''Show names/codes of GSM networks known for Gammu
+'''
+HELP['getfmstation'] = '''Show info about FM stations in phone
+'''
+HELP['getgprspoint'] = ''''''
+HELP['getfiles'] = ''''''
+HELP['getfilesystem'] = '''Display info about all folders and files in phone memory/memory card. By default there is tree displayed, you can change it:
+
+.B \\-flatall
+there are displayed full file/folder details like ID (first parameter in line)
+
+.B \\-flat
+
+Please note, that in some phones (like N6230) content of some folders (with more files) can be cut (only part of files will be displayed) for example on infrared connection. This is not Gammu issue, but phone firmware problem.
+'''
+HELP['getfolderlisting'] = '''
+Display files and folders available in folder with given folder ID. You can get ID's using getfilesystem \\-flatall.
+
+Please note, that in some phones (like N6230) content of some folders (with more files) can be cut (only part of files will be displayed) for example on infrared connection. This is not Gammu issue, but phone firmware problem.
+'''
+HELP['getrootfolders'] = '''
+Display info about drives available in phone/memory card.
+'''
+HELP['deletefiles'] = ''''''
+HELP['addfolder'] = ''''''
+HELP['addfile'] = '''Add file with specified name to folder with specified folder ID.
+
+.B \\-type
+- file type was required for filesystem 1 in Nokia phones (current filesystem 2 doesn't need this)
+
+.B \\-readonly, \\-protected, \\-system, \\-hidden
+- you can set readonly, protected (file can't be for example forwarded from phone menu), system and hidden (file is hidden from phone menu) file attributes
+
+.B \\-newtime
+- after using it date/time of file modification will be set to moment of uploading
+
+'''
+HELP['nokiaaddfile'] = '''Install the *.jar/*.jad file pair of a midlet in the application or game menu of the phone. You have to give the name without the jar/jad suffix, otherwise you will get the slightly confusing error message Can't open specified file. Read only ?
+
+The option
+.I \-overwrite
+deletes the application's .jad and .jar files bevor installing, but doesn't delete the application data. Option
+.I \-overwriteall
+will also delete all data. Both these options work only for Application or Game upload.
+
+\\fIExample:\\fR gammu nokiaaddfile Application Alien will read Alien.JAD and Alien.JAR and add to Applications
+
+\\fIExample:\\fR gammu nokiaaddfile Tones file.mid will read file.mid and add to Tones folder
+
+You can use jadmaker(1) to generate a .jad file from a .jar file.
+'''
+HELP['getdatetime'] = '''Get date and time from phone
+'''
+HELP['setdatetime'] = '''Set date and time in phone to date and time set in computer. Please
+note, that this option doesn't show clock on phone screen. It only set
+date and time.
+
+\\fITIP:\\fR you can make such synchronization each time, when will connect
+your phone and use Gammu. See gammurc(5) for details.
+'''
+HELP['getalarm'] = '''Get alarm from phone, if no location is specified,
+1 is used.
+'''
+HELP['setalarm'] = '''Sets repeating alarm in phone on selected time.'''
+HELP['getmemory'] = '''Get memory location from phone.
+
+Locations are numerated from 1.
+
+\\fBDC\\fR = Dialled calls
+.br
+\\fBMC\\fR = Missed calls
+.br
+\\fBRC\\fR = Received calls
+.br
+\\fBON\\fR = Own numbers
+.br
+\\fBVM\\fR = voice mailbox
+.br
+\\fBSM\\fR = SIM phonebook
+.br
+\\fBME\\fR = phone internal phonebook
+.br
+\\fBFD\\fR = fixed dialling
+.br
+\\fBSL\\fR = sent SMS log
+'''
+HELP['searchmemory'] = ''''''
+HELP['deleteallmemory'] = '''Deletes all entries from specified memory type.'''
+HELP['deletememory'] = '''Deletes entries in specified range from specified memory type.'''
+HELP['listmemorycategory'] = ''''''
+HELP['senddtmf'] = '''Plays DTMF sequence. In some phones available only during calls
+'''
+HELP['getspeeddial'] = ''''''
+HELP['getsms'] = '''Get SMS.
+
+Locations are numerated from 1.
+
+When give folder 0, sms is given from "flat" memory (all sms from all
+folders have unique numbers). It's sometimes emulated by Gammu.
+You can use it with all phones.
+
+When give folder 1, 2, etc. sms are taken from Inbox, Outbox, etc.
+and each sms has unique number in his folder. Name of folders can
+depend on your phone (the most often 1="Inbox", 2="Outbox", etc.).
+This method is not supported by all phones (for example, not supported
+by Nokia 3310, 5110, 6110). If work with your phone, use
+\\fBgetsmsfolders\\fR to get folders list.
+'''
+HELP['deletesms'] = '''Delete SMS from phone. See description for \\fBgetsms\\fR for info about
+sms folders naming convention.
+
+Locations are numerated from 1.
+'''
+HELP['deleteallsms'] = '''Delete all SMS from specified SMS folder.
+'''
+HELP['getallsms'] = '''Get all SMS from phone. In some phones you will have also SMS templates
+and info about locations used to save Picture Images. With each sms you
+will see location. If you want to get such sms from phone alone, use
+\\fBgammu getsms 0 location\\fR
+'''
+HELP['geteachsms'] = '''Similiary to \\fBgetallsms\\fR. Difference is, that links all contacenated sms
+'''
+HELP['getsmsc'] = '''Get SMSC settings from SIM card.
+
+Locations are numerated from 1.
+'''
+HELP['getsmsfolders'] = '''Get names for SMS folders in phone
+'''
+HELP['getphoneringtone'] = '''
+Get one of "default" ringtones and saves into file
+'''
+HELP['playsavedringtone'] = '''
+Play one of "built" ringtones. This option is available for DCT4 phones. For getting ringtones list use getringtoneslist.
+'''
+HELP['getringtoneslist'] = '''
+Get list of sounds
+'''
+HELP['getringtone'] = '''Get ringtone from phone in RTTL or BINARY format.
+
+Locations are numerated from 1.
+'''
+HELP['setringtone'] = '''Set ringtone in phone. When don't give location, it will be written
+"with preview" (in phones supporting this feature like 61xx or 6210).
+When use RTTL ringtones, give location and use \\fB\\-scale\\fR, there will be written
+scale info with each note. It will avoid scale problems available during
+editing ringtone in composer from phone menu (for example, in N33xx).
+
+\\fITIP:\\fR when use ~ char in ringtone name, in some phones (like 33xx)
+name will blink later in phone menus
+'''
+HELP['copyringtone'] = '''Copy source ringtone to destination.
+'''
+HELP['playringtone'] = '''Play aproximation of ringtone over phone buzzer. File can be in RTTL or BINARY (Nokia DCT3) format.
+'''
+HELP['getringtoneslist'] = ''''''
+HELP['nokiacomposer'] = '''Show, how to enter RTTL ringtone in composer existing in many Nokia phones
+(and how should it look like).
+'''
+HELP['dialvoice'] = '''Make voice call from SIM card line set in phone.
+'''
+HELP['maketerminatedcall'] = '''Make voice call from SIM card line set in phone which will
+be terminated after \\fBlength\\fR seconds.
+'''
+HELP['answercall'] = '''Answer incoming call.
+'''
+HELP['cancelcall'] = '''Cancel incoming call
+'''
+HELP['gettodo'] = ''''''
+HELP['deletetodo'] = ''''''
+HELP['getcalendarnotes'] = '''Get calendar notes from phone. In Nokia 3310 and 3330 they're named
+"Reminders" and have some limitations (they depends on phone firmware version).
+'''
+HELP['getcategory'] = ''''''
+HELP['getallcategies'] = ''''''
+HELP['getwapbookmark'] = '''Get WAP bookmarks from phone.
+
+Locations are numerated from 1.
+'''
+HELP['deletewapbookmark'] = '''Delete WAP bookmarks from phone.
+
+Locations are numerated from 1.
+'''
+HELP['getwapsettings'] = '''Get WAP settings from phone.
+
+Locations are numerated from 1.
+'''
+HELP['getmmssettings'] = ''''''
+HELP['getbitmap STARTUP'] = '''Get static startup logo from phone. Allow to save it in file.
+'''
+HELP['getbitmap CALLER'] = '''Get caller group logo from phone. Locations 1-5.
+'''
+HELP['getbitmap OPERATOR'] = '''Get operator logo (picture displayed instead of operator name) from phone.
+'''
+HELP['getbitmap PICTURE'] = '''Get Picture Image from phone.
+'''
+HELP['getbitmap'] = '''Get startup text from phone.
+'''
+HELP['getbitmap'] = '''In some models it's possible to save dealer welcome note - text displayed
+during enabling phone, which can't be edited from phone menu. Here you can
+get it.
+'''
+HELP['setbitmap STARTUP'] = '''Set startup logo in phone. It can be static (then you will have to give file
+name) or one of predefined animated (only some phones like Nokia 3310 or 3330
+supports it)
+'''
+HELP['setbitmap COLOURSTARTUP'] = ''''''
+HELP['setbitmap WALLPAPER'] = ''''''
+HELP['setbitmap CALLER'] = '''Set caller logo.
+'''
+HELP['setbitmap OPERATOR'] = '''Set operator logo in phone. When won't give file and netcode, operator logo
+will be removed from phone. When will give only filename, operator logo will
+be displayed for your current GSM operator. When give additionaly network
+code, it will be displayed for this operator: \\fBgammu setbitmap OPERATOR file "260 02"\\fR
+'''
+HELP['setbitmap COLOUROPERATOR'] = ''''''
+HELP['setbitmap PICTURE'] = ''''''
+HELP['setbitmap TEXT'] = ''''''
+HELP['setbitmap DEALER'] = ''''''
+HELP['copybitmap'] = '''Allow to convert logos files to another. When give ONLY inputfile, output will
+be written to stdout using ASCII art. When give output file and format, in
+some file formats (like NLM) will be set indicator informing about logo type
+to given.
+'''
+HELP['savefile CALENDAR'] = '''Allows to convert between various backup formats which gammu
+supports for calendar events. The file type is guessed (for input file
+guess is based on extension and file content, for output solely on
+extension).
+
+For example if you want to convert single entry from gammu native
+backup to vCalendar, you need following command:
+
+ gammu savefile CALENDAR output.vcs myCalendar.backup 260
+'''
+HELP['savefile TODO'] = '''Allows to convert between various backup formats which gammu
+supports for todo events. The file type is guessed (for input file
+guess is based on extension and file content, for output solely on
+extension).
+
+For example if you want to convert single entry from gammu native
+backup to vCalendar, you need following command:
+
+ gammu savefile CALENDAR output.vcs myCalendar.backup 260
+'''
+HELP['savefile'] = ''''''
+HELP['savesms TEXT'] = '''Take text from stdin (or commandline if \\-text specified)
+and save as text SMS into SIM/phone memory.
+
+\\fB\\-folder number\\fR - save to specified folder.
+
+Folders are numerated from 1.
+
+The most often folder 1 = "Inbox", 2 = "Outbox",etc. Use \\fBgetsmsfolders\\fR to get folder list.
+
+\\fB\\-unread\\fR - makes message unread. In some phones (like 6210)
+you won't see unread sms envelope after saving such
+sms. In some phones with internal SMS memory (like
+6210) after using it with folder 1 SIM SMS memory will be used
+
+\\fB\\-read\\fR - makes message read. In some phones with internal
+SMS memory (like 6210) after using it with folder 1 SIM SMS memory will be used
+
+\\fB\\-unsent\\fR - makes message unsent
+
+\\fB\\-reply\\fR - reply SMSC is set
+
+\\fB\\-sender number\\fR - set sender number (default: "Gammu")
+
+\\fB\\-flash\\fR - Class 0 SMS
+
+\\fB\\-smscset number\\fR - SMSC will be taken from set \\fBnumber\\fR. Default set: 1
+
+\\fB\\-smscnumber number\\fR - SMSC number
+
+\\fB\\-len len\\fR - specify, how many chars will be read. When use this
+option and text will be longer than 1 SMS, will be splitted into more
+linked SMS
+
+\\fB\\-autolen len\\fR - specify, how many chars will be read. When use this
+option and text will be longer than 1 SMS, will be splitted into more
+linked SMS.Coding type (SMS default alphabet/Unicode) is set according
+to input text
+
+\\fB\\-enablevoice\\fR | \\fB\\-disablevoice\\fR | \\fB\\-enablefax \\fR |
+\\fB\\-disablefax \\fR | \\fB\\-enableemail \\fR | \\fB\\-disableemail \\fR -
+sms will set such indicators. Text will be cut to 1 sms.
+
+\\fB\\-voidsms\\fR - many phones after receiving it won't display anything,
+only beep, vibrate or turn on light. Text will be cut to 1 sms.
+
+\\fB\\-unicode\\fR - SMS will be saved in Unicode format
+
+\\fB\\-inputunicode\\fR - input text is in Unicode.
+
+\\fB\\-text\\fR - get text from command line instead of stdin.
+
+\\fB\\-textutf8\\fR - get text in UTF-8 from command line instead of stdin.
+
+\\fITIP:\\fR
+You can create Unicode file using WordPad in Win32 (during saving select
+"Unicode Text Document" format). In Unix can use for example YUdit.
+
+\\fB\\-replacemessages ID\\fR - \\fBID\\fR can be 1..7. When you will use option and
+send more single SMS to one recipient with the same ID, each another SMS will
+replace each previous with the same ID
+
+\\fB\\-replacefile file\\fR - when you want, you can make file in such format:
+\\fBsrc_unicode_char1, dest_unicode_char1, src_unicode_char2, dest_unicode_char2\\fR
+(everything in one line). After reading text for SMS from stdin there will
+be made translation and each src char will be converted to dest char. In docs
+there is example file (\\fIreplace.txt\\fR), which will change all "a" chars to "1"
+
+\\fITIP:\\fR when use ~ char in sms text and \\fB\\-unicode\\fR option
+(Unicode coding required), text of sms after ~ char will blink in some phones
+(like N33xx)
+
+\\fIExample:\\fR echo some_text | gammu savesms TEXT
+'''
+HELP['savesms RINGTONE'] = '''Read RTTL ringtone from file and save as SMS into SIM/phone memory.
+Ringtone is saved in Nokia format.
+
+\\fB\\-folder number\\fR - save to specified folder.
+
+Folders are numerated from 1.
+
+The most often folder 1 = "Inbox", 2 = "Outbox", etc.
+
+\\fB\\-unread\\fR - makes message unread. In some phones (like 6210) you won't see
+unread sms envelope after saving such sms. In some phones with internal
+SMS memory (like 6210) after using it with folder 1 SIM SMS memory will be used
+
+\\fB\\-read\\fR - makes message read. In some phones with internal
+SMS memory (like 6210) after using it with folder 1 SIM SMS memory will be used
+\\fB\\-unsent\\fR - makes message unsent
+
+\\fB\\-reply\\fR - reply SMSC is set
+
+\\fB\\-sender number\\fR - set sender number
+
+\\fB\\-flash\\fR - Class 0 SMS
+
+\\fB\\-smscset number\\fR - SMSC will be taken from set \\fBnumber\\fR. Default set: 1
+
+\\fB\\-smscnumber number\\fR - SMSC number
+
+\\fB\\-long\\fR - ringtone is saved using Profile style. It can be longer (and saved
+in 2 SMS), but decoded only by newer phones (like 33xx)
+
+\\fB\\-scale\\fR - ringtone will have Scale info for each note. It will allow to edit
+it correctly later in phone composer (for example, in 33xx)
+'''
+HELP['savesms OPERATOR'] = '''Save operator logo as sms (Nokia format - size 72x14 or 78x21 after
+using \\fB\\-biglogo\\fR).
+'''
+HELP['savesms CALLER'] = '''Save caller logo as sms (Nokia format - size 72x14).
+'''
+HELP['savesms PICTURE'] = '''Save Picture Image as sms (Nokia format - size 72x28).
+'''
+HELP['savesms MMSINDICATOR'] = ''''''
+HELP['savesms BOOKMARK'] = '''Read WAP bookmark from file created by \\fBbackup\\fR option and saves in
+Nokia format as SMS
+'''
+HELP['savesms WAPSETTINGS'] = '''Read WAP settings from file created by \\fBbackup\\fR option and saves in Nokia format as SMS
+'''
+HELP['savesms MMSSETTINGS'] = ''''''
+HELP['savesms CALENDAR'] = '''Read calendar note from file created by \\fBbackup\\fR option and saves in
+VCALENDAR 1.0 format as SMS
+'''
+HELP['savesms TODO'] = ''''''
+HELP['savesms'] = '''Read phonebook entry from file created by \\fBbackup\\fR option and saves in
+VCARD 1.0 (only name and default number) or VCARD 2.1 (all entry details with
+all numbers, text and name) format as SMS
+'''
+HELP['savesms PROFILE'] = '''Read ringtone (RTTL) format and bitmap (Picture Image size) and name and save
+as Nokia profile.
+'''
+HELP['savesms EMS'] = '''
+Saves EMS sequence. All parameters after \\fB\\-unread\\fR (like \\fB\\-defsound\\fR) can be used few times.
+
+\\fB\\-text\\fR - adds text
+
+\\fB\\-unicodefiletext\\fR - adds text from Unicode file
+
+\\fB\\-defanimation\\fR - adds default animation with ID specified by user.ID for different phones are different.
+
+\\fB\\-animation\\fR - adds "frames" frames read from file1, file2, etc.
+
+\\fB\\-defsound\\fR - adds default sound with ID specified by user. ID for different phones are different.
+
+\\fB\\-tone10\\fR - adds IMelody version 1.0 read from RTTL or other compatible file
+
+\\fB\\-tone10long\\fR - IMelody version 1.0 saved in one of few SMS with UPI. Phones compatible with UPI (like SonyEricsson phones) will read such ringtone as one
+
+\\fB\\-tone12\\fR - adds IMelody version 1.2 read from RTTL or other compatible file
+
+\\fB\\-tone12long\\fR - IMelody version 1.0 saved in one of few SMS with UPI. Phones compatible with UPI (like SonyEricsson phones) will read such ringtone as one
+
+\\fB\\-toneSE\\fR - adds IMelody in "short" form supported by SonyEricsson phones
+
+\\fB\\-tone10long\\fR - SonyEricsson IMelody saved in one or few SMS with UPI
+
+\\fB\\-variablebitmap\\fR - bitmap in any size saved in one SMS
+
+\\fB\\-variablebitmaplong\\fR - bitmap with maximal size 96x128 saved in one or few sms
+
+\\fB\\-fixedbitmap \\fR - bitmap 16x16 or 32x32
+
+\\fB\\-protected\\fR - all ringtones and bitmaps after this parameter (excluding default ringtones and logos) will be "protected" (in phones compatible with ODI like SonyEricsson products it won't be possible to forward them from phone menu)
+
+\\fIExample:\\fR gammu savesms EMS \\-text "Greetings" \\-defsound 1 \\-text "from Gammu" \\-tone10 axelf.txt \\-animation 2 file1.bmp file2.bmp
+
+will create EMS sequence with text "Greetings" and default sound 1 and text "from Gammu" and ringtone axelf.txt and 2 frame animation read from (1'st frame) file1.bmp and (2'nd frame) file2.bmp
+
+\\fIExample:\\fR gammu savesms EMS \\-protected 2 \\-variablebitmaplong ala.bmp \\-toneSElong axelf.txt \\-toneSE ring.txt
+
+ala.bmp and axelf.txt will be "protected"
+'''
+HELP['sendsms TEXT'] = ''''''
+HELP['sendsms RINGTONE'] = ''''''
+HELP['sendsms OPERATOR'] = ''''''
+HELP['sendsms CALLER'] = ''''''
+HELP['sendsms PICTURE'] = ''''''
+HELP['sendsms BOOKMARK'] = ''''''
+HELP['sendsms WAPSETTINGS'] = ''''''
+HELP['sendsms MMSSETTINGS'] = ''''''
+HELP['sendsms MMSINDICATOR'] = '''
+Sends a message with MMS indication. The recipient phone will then download
+MMS from given URL and display it.
+
+Please note that you should provide valid smil data on that URL.
+'''
+HELP['sendsms CALENDAR'] = ''''''
+HELP['sendsms TODO'] = ''''''
+HELP['sendsms'] = ''''''
+HELP['sendsms PROFILE'] = ''''''
+HELP['sendsms EMS'] = ''''''
+HELP['displaysms'] = '''
+Displays PDU data of encoded SMS messages. It accepts same parameters and
+behaves same like sendsms.
+'''
+HELP['nokiagetoperatorname'] = '''6110.c phones have place for name for one GSM network (of course, with flashing it's
+possible to change all names, but Gammu is not flasher ;\\-)). You can get this
+name using this option.
+'''
+HELP['nokiasetoperatorname'] = ''''''
+HELP['nokiadisplayoutput'] = ''''''
+HELP['nokiasetvibralevel'] = '''Set vibra power to "level" (given in percent)
+'''
+HELP['nokiagetvoicerecord'] = '''
+Get voice record from location and save to WAV file. File is
+coded using GSM 6.10 codec (available for example in win32). Name
+of file is like name of voice record in phone.
+'''
+HELP['nokiasecuritycode'] = '''Get/reset to "12345" security code
+'''
+HELP['nokiatests'] = '''Make tests for Nokia DCT3 phones
+
+\\fINOTE:\\fR EEPROM test can show error, when your phone has EEPROM in flash
+(like in 82xx/7110/62xx/33xx). The same Clock test will show error
+when phone doesn't have internal battery for clock (like 3xxx)
+...and for DCT4 (work in progress)
+'''
+HELP['nokiasetphonemenus'] = '''Enable all (?) possible menus for DCT3 Nokia phones:
+
+1. ALS (Alternative Line Service) option menu
+.br
+2. vibra menu for 3210
+.br
+3. 3315 features in 3310 5.45 and higher
+.br
+4. two additional games (React and Logic) for 3210 5\\.31 and higher
+.br
+5. WellMate menu for 6150
+.br
+6. NetMonitor
+
+and for DCT4:
+
+1. ALS (Alternative Line Service) option menu
+.br
+2. Bluetooth, WAP bookmarks and settings menu, ... (6310i)
+.br
+3. GPRS Always Online
+.br
+ ...
+'''
+HELP['nokianetmonitor'] = '''Takes output or set netmonitor for Nokia DCT3 phones.
+
+\\fITIP:\\fR For more info about this option, please visit
+\\fIhttp://www.mwiacek.com\\fR and read netmonitor manual.
+
+\\fITIP:\\fR test \\fB243\\fR enables all tests (after using command
+\\fBgammu nokianetmonitor 243\\fR in some phones like 6210 or 9210 have to
+reboot them to see netmonitor menu)
+'''
+HELP['nokianetmonitor36'] = '''Reset counters from netmonitor test 36 in Nokia DCT3 phones.
+
+\\fITIP:\\fR For more info about this option, please visit
+\\fIwww.mwiacek.com\\fR and read netmonitor manual.
+'''
+HELP['siemensnetmonitor'] = ''''''
+HELP['backup'] = '''Backup your phone to file. It's possible to backup (depends on phone and backup format):
+
+* phonebook from SIM and phone memory
+.br
+* calendar notes
+.br
+* SMSC settings
+.br
+* operator logo
+.br
+* startup (static) logo or startup text
+.br
+* WAP bookmarks
+.br
+* WAP settings
+.br
+* caller logos and groups
+.br
+* user ringtones
+.br
+
+There are various backup formats supported and the backup format is guessed
+based on file extension:
+
+* .lmb - Nokia backup, supports contacts, caller logos and startup logo.
+.br
+* .vcs - vCalendar, supports calendar and todo.
+.br
+* .vcf - vCard, supports contacts.
+.br
+* .ldif - LDAP import, supports contacts.
+.br
+* .ics - iCalendar, supports calendar and todo.
+.br
+* Any other extension is Gammu backup file and it supports all data mentioned above.
+.br
+
+\\fITIP:\\fR if you will backup settings to Gammu text file, it will be possible to edit
+it. It's easy: many things in this file will be written double - once in Unicode,
+once in ASCII. When you will remove Unicode version Gammu will use ASCII
+on \\fBrestore\\fR (and you can easy edit ASCII text) and will convert it
+according to your OS locale. When will be available Unicode version of text,
+it will be used instead of ASCII (usefull with Unicode phones - it isn't important,
+what locale is set in computer and no conversion Unicode \\-> ASCII and ASCII \\->
+Unicode is done).
+
+\\fITIP:\\fR you can use any editor with regular expressions function to edit
+backup text file. Example: TextPad 4.2.2 from http://www.textpad.com/
+with regular expressions based on POSIX standard P1003.2 is OK for it.
+Few examples for it:
+
+.br
+* to remove info about voice tags:
+.br
+FROM: ^Entry\\\\([0\\-9][0\\-9]\\\\)VoiceTag = \\\\(.*\\\\)\\\\n
+.br
+TO:
+.br
+
+* to change all numbers starting from +3620, +3630, +3660, +3670
+to +3620
+.br
+Find: Type = NumberGeneral\\\\nEntry\\\\([0\\-9][0\\-9]\\\\)Text = "\\\\+36\\\\(20\\\\|30\\\\|60\\\\|70\\\\)
+.br
+Repl: Type = NumberMobile\\\\nEntry\\\\1Text = "\\\\+3620
+.br
+
+* to change phone numbers type to mobile for numbers starting from
++3620, +3630,... and removing the corresponding TextUnicode line
+.br
+F: Type = NumberGeneral\\\\nEntry\\\\([0\\-9][0\\-9]\\\\)Text = "\\\\+36\\\\([2367]0\\\\)\\\\([^\\\\"]*\\\\)"\\\\nEntry\\\\([0\\-9][0\\-9]\\\\)TextUnicode = \\\\([^\\\\n]*\\\\)\\\\n
+.br
+R: Type = NumberMobile\\\\nEntry\\\\1Text = "\\\\+36\\\\2\\\\3"\\\\n
+'''
+HELP['backupsms'] = '''Stores all SMSes from phone to file.
+
+Use \\-yes for answering yes to all questions (backup all messages and
+delete them from phone), or \\-all to just backup all folders while keeping
+messages in phone.
+'''
+HELP['addsms'] = '''Adds SMSes from file (format like backupsms uses) to
+selected folder in phone.'''
+HELP['restoresms'] = '''Restores SMSes from file (format like backupsms uses) to
+selected folder in phone. Please note that this overwrites existing
+messages in phone (if it supports it).'''
+HELP['restore'] = '''Restore settings written in file created using \\fBbackup\\fR option.
+
+Please note that restoring deletes all current content in phone. If you
+want only to add entries to phone, use addnew.
+
+In some phones restoring calendar notes will not show error, but won't
+be done, when phone doesn't have set clock inside.
+'''
+HELP['addnew'] = '''Adds data written in file created using \\fBbackup option\\fR. All things
+backup'ed by \\fBbackup\\fR can be restored (when made backup to Gammu text
+file).
+
+Please note that this adds all content of backup file to phone and
+does not care about current data in the phone (no duplicates are
+detected).
+'''
+HELP['clearall'] = ''''''
+HELP['decodesniff'] = '''Option available only, if Gammu was compiled with debug. Allows to decode
+sniffs. See \\fI/docs/develop/develop.txt\\fR for more details.
+'''
+HELP['decodebinarydump'] = '''After using option \\fBlogfile\\fR with name \\fBbinary\\fR (see \\fI/readme.txt\\fR for
+info about this method of reporting bugs) created file can be decoded using
+this option. It's available only, if Gammu was compiled with debug.
+
+'''
+
+SECTION_HELP = {}
+SECTION_HELP['sms'] = '''
+Sending messages might look a bit complicated on first attempt to use.
+But be patient, the command line has been written in order to allow
+almost every usage. See EXAMPLE section for some hints on usage.
+'''
+
+# Code
+
+import os
+import re
+
+SECTION_MATCHER = re.compile(' *([^ ]*) - (.*)')
+COMMAND_MATCHER = re.compile('^([^ \n]*) (.*)')
+COMMAND_SUBCOMMAND_MATCHER = re.compile('^([^ \n]*) ([A-Z0-9]*) (.*)')
+COMMAND_MATCHER_NOPARAM = re.compile('^([^ \n]*)')
+
+def read_help(section):
+ pipe = os.popen('LANG=C %s help %s' % (BIN_PATH, section))
+ data = pipe.readlines()
+ pipe.close()
+ return data
+
+def parse_sections(lines):
+ sections = []
+ section_data = {}
+ for line in lines:
+ match = SECTION_MATCHER.match(line)
+ if match is None:
+ continue
+ section = match.groups()[0]
+ sections.append(section)
+ section_data[section] = match.groups()[1]
+ return sections, section_data
+
+def parse_section_help(lines):
+ result = {}
+ for line in lines:
+ match = COMMAND_SUBCOMMAND_MATCHER.match(line)
+ if match is None:
+ match = COMMAND_MATCHER.match(line)
+ if match is None:
+ match = COMMAND_MATCHER_NOPARAM.match(line)
+ command = match.groups()[0]
+ options = ''
+ else:
+ command = match.groups()[0]
+ options = match.groups()[1]
+ else:
+ command = '%s %s' % (match.groups()[0], match.groups()[1])
+ options = match.groups()[2]
+ result[command] = options
+ return result
+
+def get_command_help(command):
+ try:
+ return HELP[command]
+ except KeyError:
+ return ''
+
+def write_section(output, name):
+ output.write(SECTION % name)
+
+def write_subsection(output, name):
+ output.write(SUBSECTION % name)
+
+def write_para(output, text):
+ output.write(PARAGRAPH % text)
+
+def write_command(output, name, params, help):
+ if params == '':
+ output.write(COMMAND_NOPARAM % (name, help))
+ else:
+ output.write(COMMAND % (name,
+ params.replace('][', '] ['),
+ help))
+
+def format_man_page(output, data):
+ keys = data.keys()
+ keys.sort()
+ for command in keys:
+ write_command(output, command, data[command].replace('-', '\\-'), get_command_help(command))
+
+def main():
+ text = read_help('')
+ result = re.match('\[Gammu version ([0-9.]*) built [0-9:]* on (.*) using.*\]', text[0])
+ build_date = result.groups()[1]
+ version = result.groups()[0]
+ syntax = text[2]
+
+ syntax_help = '.br\n'.join(text[4:9]).replace('nothing|text|textall|textalldate|binary|errors', 'see gammurc(5) for possible values')
+ commands_help = text[10]
+
+ output = file(OUT_PATH, 'w')
+ output.write(HEADER % {'version' : version, 'date' : build_date})
+
+ write_section(output, 'NAME')
+ output.write(NAME)
+
+ write_section(output, 'SYNOPSIS')
+ write_para(output, syntax.replace('[', '[\\fI').replace(']', '\\fP]'))
+
+ write_section(output, 'DESCRIPTION')
+
+ write_para(output, DESCRIPTION)
+
+ write_section(output, 'OPTIONS')
+
+ write_para(output, syntax_help.replace('-', '\\-'))
+
+ write_subsection(output, 'Commands')
+ write_para(output, commands_help.replace('-', '\\-'))
+
+ sections, section_data = parse_sections(text[12:])
+ for section in sections:
+ section_text = read_help(section)
+ write_subsection(output, section_data[section])
+ try:
+ write_para(output, SECTION_HELP[section])
+ except KeyError:
+ pass
+ data = parse_section_help(section_text[4:])
+ format_man_page(output, data)
+
+ write_section(output, 'FILES')
+ output.write(FILES)
+
+ write_section(output, 'EXAMPLE')
+ output.write(EXAMPLE)
+
+ write_section(output, 'COPYRIGHT')
+ output.write(COPYRIGHT)
+
+ write_section(output, 'REPORTING BUGS')
+ output.write(BUGS)
+
+ write_section(output, 'AUTHOR')
+ output.write(AUTHOR)
+
+ write_section(output, 'SEE ALSO')
+ output.write(SEE_ALSO)
+
+ output.close()
+
+if __name__ == '__main__':
+ main()
diff --git a/admin/get-se-list b/admin/get-se-list
new file mode 100755
index 0000000..edc4c5f
--- /dev/null
+++ b/admin/get-se-list
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+# This script downloads list of Sony-Ericsson phones from web and
+# prepares list suitable for common/gsmphones.c
+
+URL=http://homepage.mac.com/alvinmok/ericsson/types.html
+
+tmp=`mktemp`
+wget -O - "$URL" | tr '\r' '\n' > "$tmp"
+
+awk 'BEGIN { p = 0; }
+/Type code orderin/ { p = 1; }
+/<tr><th>.*<\/th><td>.*<\/td>(<\/tr>)?/ { if (p) print $0; }
+/<\/table>/ { p = 0;}' < "$tmp" | \
+ sed 's@</td></tr><tr><th>@\n@; s@<tr><th>@@; s@</th><td>@;@g; s@</td></tr>@@; s@</td>@@; s@<!-- @@; s@ -->@@;' | \
+ grep -Ev '&nbsp;|Cancelled' | \
+ gawk -F \; '{
+ delete models;
+ delete ids;
+ models[0] = $1;
+ ids[0] = $2;
+ if (match($2, "(.*)/(.*)/(.*)", a)) {
+ ids[0] = a[1];
+ ids[1] = a[2];
+ ids[2] = a[3];
+ } else
+ if (match($2, "(.*)/(.*)", a)) {
+ ids[0] = a[1];
+ ids[1] = a[2];
+ }
+ if (match($1, "(.*)-([^-]*)/(.*)", a)) {
+ models[0] = a[1]"-"a[2];
+ models[1] = a[1]"-"a[3];
+ }
+ /* New ID */
+ if (length(models[0]) == 14) {
+ sms = ", F_SUBMIT_SIM_ONLY";
+ } else {
+ sms = "";
+ }
+ if (models[0] == "FAE-1021011-BV") {
+ sms = sms", F_SMS_LOCATION_0";
+ }
+ if (length(models) == 2 && length(ids) == 2) {
+ print "\t{\""ids[0]"\",\t\""models[0]"\" ,\"\",\t\t\t\t {F_OBEX"sms", 0}},";
+ print "\t{\""ids[1]"\",\t\""models[1]"\" ,\"\",\t\t\t\t {F_OBEX"sms", 0}},";
+ } else {
+ /* Restore IDs, we need to have unique model */
+ if (length(models) == 1) {
+ delete ids;
+ ids[0] = $2;
+ }
+ for (model in models) {
+ for (id in ids) {
+ print "\t{\""ids[id]"\",\t\""models[model]"\" ,\"\",\t\t\t\t {F_OBEX"sms", 0}},";
+ }
+ }
+ }
+ }'
+
+rm -f "$tmp"
diff --git a/admin/locales-stats b/admin/locales-stats
new file mode 100755
index 0000000..9186c26
--- /dev/null
+++ b/admin/locales-stats
@@ -0,0 +1,19 @@
+#!/bin/sh
+echo gammu.po:
+for x in locale/*/gammu.po ; do
+ lang=`echo $x | sed 's@locale/\(.*\)/gammu.po@\1@'`
+ echo -n "$lang: "
+ msgfmt --statistics --check -o - $x > /dev/null
+done
+echo libgammu.po:
+for x in locale/*/libgammu.po ; do
+ lang=`echo $x | sed 's@locale/\(.*\)/libgammu.po@\1@'`
+ echo -n "$lang: "
+ msgfmt --statistics --check -o - $x > /dev/null
+done
+echo docs.po:
+for x in locale/*/docs.po ; do
+ lang=`echo $x | sed 's@locale/\(.*\)/docs.po@\1@'`
+ echo -n "$lang: "
+ msgfmt --statistics --check -o - $x > /dev/null
+done
diff --git a/admin/locales-update b/admin/locales-update
new file mode 100755
index 0000000..14ebebd
--- /dev/null
+++ b/admin/locales-update
@@ -0,0 +1,78 @@
+#!/bin/sh
+# vim: expandtab sw=4 ts=4 sts=4:
+
+LOCS=`ls locale/*/gammu.po | sed 's@.*/\(.*\)/[^/]*@\1@'`
+ver=`sed -n 's/set (VERSION "\([^"]*\)".*)/\1/p' CMakeLists.txt`
+
+xgettext \
+ -d gammu \
+ --msgid-bugs-address=michal@cihar.com \
+ -o locale/gammu.pot \
+ --language=C \
+ --keyword=_ \
+ --keyword=N_ \
+ --add-comments=l10n \
+ --add-location \
+ --copyright-holder "Michal Čihař <michal@cihar.com>" \
+ --package-name gammu \
+ --package-version $ver \
+ `find gammu helper -name '*.c' -o -name '*.h' | sort`
+
+xgettext \
+ -d libgammu \
+ --msgid-bugs-address=michal@cihar.com \
+ -o locale/libgammu.pot \
+ --language=C \
+ --keyword=_ \
+ --keyword=N_ \
+ --add-comments=l10n \
+ --add-location \
+ --copyright-holder "Michal Čihař <michal@cihar.com>" \
+ --package-name libgammu \
+ --package-version $ver \
+ `find libgammu -name '*.c' -o -name '*.h' | sort`
+
+for loc in $LOCS ; do
+ cd locale/$loc
+ msgmerge -U -C ../../../wammu/locale/$loc/wammu.po -C gammu.po -C libgammu.po docs.po ../docs.pot
+ cd ../..
+done
+
+./admin/po4a
+
+sed -i '
+ s/SOME DESCRIPTIVE TITLE/Gammu translation/;
+ s/PACKAGE/Gammu/;
+ s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
+ s/VERSION/'$ver'/;
+ ' locale/gammu.pot
+sed -i '
+ s/SOME DESCRIPTIVE TITLE/libGammu translation/;
+ s/PACKAGE/libGammu/;
+ s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
+ s/VERSION/'$ver'/;
+ ' locale/libgammu.pot
+
+for loc in $LOCS ; do
+ sed -i '
+ s/SOME DESCRIPTIVE TITLE/Gammu translation/;
+ s/PACKAGE/Gammu/;
+ s/VERSION/'$ver'/;
+ s/Project-Id-Version: Gammu [0-9.]*/Project-Id-Version: Gammu '$ver'/;
+ ' locale/$loc/gammu.po
+ msgmerge -C ../wammu/locale/$loc/wammu.po -C locale/$loc/libgammu.po -C locale/$loc/docs.po -U locale/$loc/gammu.po locale/gammu.pot
+ sed -i '
+ s/SOME DESCRIPTIVE TITLE/libGammu translation/;
+ s/PACKAGE/libGammu/;
+ s/VERSION/'$ver'/;
+ s/Project-Id-Version: libGammu [0-9.]*/Project-Id-Version: libGammu '$ver'/;
+ ' locale/$loc/libgammu.po
+ msgmerge -C ../wammu/locale/$loc/wammu.po -C locale/$loc/gammu.po -C locale/$loc/docs.po -U locale/$loc/libgammu.po locale/libgammu.pot
+ sed -i '
+ s/SOME DESCRIPTIVE TITLE/Gammu documentation translation/;
+ s/PACKAGE/Gammu-docs/;
+ s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
+ s/VERSION/'$ver'/;
+ s/Project-Id-Version: Gammu-docs [0-9.]*/Project-Id-Version: Gammu-docs '$ver'/;
+ ' locale/$loc/docs.po
+done
diff --git a/admin/make-release b/admin/make-release
new file mode 100755
index 0000000..06faa34
--- /dev/null
+++ b/admin/make-release
@@ -0,0 +1,177 @@
+#!/bin/sh
+# vim: expandtab sw=4 ts=4 sts=4:
+
+# Usage: make-release [branch]
+
+set -e
+
+repo=gammu
+
+version=`sed -n 's/set (VERSION "\([^"]*\)".*)/\1/p' CMakeLists.txt`
+
+srcdir=`pwd`
+
+signexe() {
+ if [ ! -f ~/.id/codesigning.spc ] ; then
+ echo 'Skipping signing, no certificates!'
+ return 0
+ fi
+ if [ "x$NO_SIGN" != "x" ] ; then
+ echo 'Skipping signing, disabled!'
+ return 0
+ fi
+ gk-get --user=nijel --object=codesign | signcode \
+ -spc ~/.id/codesigning.spc \
+ -v ~/.id/codesigning.pvk \
+ -$ individual \
+ -n "$2" \
+ -t http://timestamp.verisign.com/scripts/timstamp.dll \
+ -i http://cihar.com/ \
+ "$1"
+ rm "$1.bak"
+}
+
+checkexe() {
+ if /usr/i*mingw*/bin/objdump -x "$1" | grep -qi 'DLL Name.*msvcrt.dll' ; then
+ echo "Program $1 is linked to msvcrt.dll!"
+ exit 1
+ fi
+}
+
+# Pre release checks
+if [ "x$1" = "xbranch" ] ; then
+ if grep -q '^200[0-9]???? - ' ChangeLog ; then
+ echo 'ChangeLog does not seem to be finalised, aborting!'
+ exit 1
+ fi
+fi
+
+tmp=`mktemp -dt $repo-build-XXXXXX`
+
+CMAKE_EXTRA=""
+if [ "x$1" = "x--debug" ] ; then
+ shift
+ CMAKE_EXTRA="$CMAKE_EXTRA -DCMAKE_BUILD_TYPE=Debug"
+fi
+
+cd $tmp
+echo Working in $tmp
+if [ "x$1" = "xbranch" ] ; then
+ shift
+ rel=RELEASE_`echo -n $version|tr . _`
+ svn cp -m "Tag release $version" svn+ssh://mort/home/svn/$repo/trunk svn+ssh://mort/home/svn/$repo/tags/$rel
+ svn export svn+ssh://mort/home/svn/$repo/tags/$rel $repo-$version
+ # Submit to PyPi
+ $tmp/$repo-$version/python/setup.py register
+elif [ "x$1" = "x" ] ; then
+ rel=trunk
+ svn export svn+ssh://mort/home/svn/$repo/trunk $repo-$version
+else
+ version="$1"
+ shift
+ rel=RELEASE_`echo -n $version|tr . _`
+ svn export svn+ssh://mort/home/svn/$repo/tags/$rel $repo-$version
+fi
+
+echo "Creating release $version from $rel"
+
+
+echo 'Creating source tarballs...'
+tar cfz $repo-$version.tar.gz $repo-$version
+tar cfj $repo-$version.tar.bz2 $repo-$version
+
+echo 'Building Windows version...'
+mkdir build-win-shared
+cd build-win-shared
+cmake ../$repo-$version \
+ -DCMAKE_TOOLCHAIN_FILE=../$repo-$version/cmake/Toolchain-mingw32.cmake \
+ -DBUILD_SHARED_LIBS=ON \
+ -DDLL_LIBMYSQL.DLL=~/win-cross/mysql/bin/libmysql.dll \
+ -DMYSQL_INCLUDE_DIR=~/win-cross/mysql/include \
+ -DMYSQL_LIBRARIES=~/win-cross/mysql/lib/libmysql.a \
+ -DWITH_LibDBI=OFF \
+ -DINSTALL_BASH_COMPLETION=OFF \
+ $CMAKE_EXTRA \
+
+make -j2
+checkexe gammu/gammu.exe
+signexe gammu/gammu.exe "Gammu"
+cpack -G NSIS
+cpack -G ZIP
+mv Gammu-*-Windows.* $tmp/
+cd ..
+
+mkdir build-win-minimal
+echo "Building minimal Windows version..."
+cd $tmp/build-win-minimal
+cmake ../$repo-$version \
+ -DCMAKE_TOOLCHAIN_FILE=../$repo-$version/cmake/Toolchain-mingw32.cmake \
+ -DBUILD_SHARED_LIBS=OFF \
+ $CMAKE_EXTRA \
+ -DCPACK_SYSTEM_NAME=Windows-Minimal \
+ -DWITH_Postgres=OFF \
+ -DWITH_MySQL=OFF \
+ -DWITH_GettextLibs=OFF \
+ -DWITH_Iconv=OFF \
+ -DWITH_CURL=OFF \
+ -DWITH_LibDBI=OFF \
+ -DINSTALL_BASH_COMPLETION=OFF \
+
+make -j2
+checkexe gammu/gammu.exe
+signexe gammu/gammu.exe "Gammu"
+cpack -G NSIS
+cpack -G ZIP
+mv Gammu-*-Windows-Minimal.* $tmp/
+cd $tmp
+
+mkdir build-win-python
+for py in 2.4 2.5 ; do
+ pynodot=`echo $py | tr -d '.'`
+ echo "Building minimal Windows version with Python $py..."
+ cd $tmp/build-win-python
+ cmake ../$repo-$version \
+ -DCMAKE_TOOLCHAIN_FILE=../$repo-$version/cmake/Toolchain-mingw32.cmake \
+ -DBUILD_SHARED_LIBS=OFF \
+ $CMAKE_EXTRA \
+ -DCPACK_SYSTEM_NAME=Windows-Minimal \
+ -DWITH_Postgres=OFF \
+ -DWITH_MySQL=OFF \
+ -DWITH_GettextLibs=OFF \
+ -DWITH_Iconv=ON \
+ -DWITH_CURL=OFF \
+ -DWITH_LibDBI=OFF \
+ -DPYTHON_LIBRARY=~/.wine/drive_c/Python$pynodot/libs/libpython$pynodot.a \
+ -DPYTHON_INCLUDE_PATH=~/.wine/drive_c/Python$pynodot/include/ \
+ -DPYTHON_EXECUTABLE=~/.wine/drive_c/Python$pynodot/python.exe \
+ -DINSTALL_BASH_COMPLETION=OFF \
+
+ make -j2
+ mkdir -p $tmp/$repo-$version/python/build/lib.win32-$py/gammu/
+ cp python/gammu/*.py $tmp/$repo-$version/python/build/lib.win32-$py/gammu/
+ cp python/gammu/*.pyd $tmp/$repo-$version/python/build/lib.win32-$py/gammu/
+ cp python/gammu/*.dll $tmp/$repo-$version/python/build/lib.win32-$py/gammu/
+ cd ..
+ cd $repo-$version/python
+ rm -rf gammu/CMakeFiles
+ wine \
+ ~/.wine/drive_c/Python$pynodot/python.exe setup.py \
+ bdist_wininst --skip-build --target-version $py
+ mv dist/*.exe $tmp/
+ if [ $py != "2.4" ] ; then
+ wine \
+ ~/.wine/drive_c/Python$pynodot/python.exe setup.py \
+ bdist_msi --skip-build --target-version $py
+ mv dist/*.msi $tmp/
+ fi
+ cd $tmp
+done
+
+# Sign binaries (not for python-gammu, it breaks some code underneath)
+for bin in $tmp/Gammu*.exe ; do
+ signexe $bin "Gammu installer"
+done
+
+# We're done
+echo "Release is in $tmp directory"
+ls -lh $tmp
diff --git a/admin/new-lang b/admin/new-lang
new file mode 100755
index 0000000..3bd3c5e
--- /dev/null
+++ b/admin/new-lang
@@ -0,0 +1,24 @@
+#!/bin/sh
+# vim: expandtab sw=4 ts=4 sts=4:
+
+set -e
+
+if [ -z "$1" ] ; then
+ echo "Usage: ./admin/new-lang ll"
+ exit 1
+fi
+
+mkdir locale/$1
+
+for loc in docs gammu libgammu ; do
+ msginit -i locale/$loc.pot -o locale/$1/$loc.po -l $1 --no-translator
+done
+
+sed -i "s/\(.*po4a_langs.*\)/\1 $1/" admin/po4a.config
+
+svn add locale/$1
+
+tmp=`mktemp`
+svn propget svn:ignore locale/cs/ > $tmp
+svn propset svn:ignore -F $tmp locale/$1
+rm -f $tmp
diff --git a/admin/po4a b/admin/po4a
new file mode 100755
index 0000000..be8473b
--- /dev/null
+++ b/admin/po4a
@@ -0,0 +1,19 @@
+#!/bin/sh
+# vim: expandtab sw=4 ts=4 sts=4:
+
+LOCS=`ls locale/*/gammu.po | sed 's@.*/\(.*\)/[^/]*@\1@'`
+ver=`sed -n 's/set (VERSION "\([^"]*\)".*)/\1/p' CMakeLists.txt`
+
+po4a \
+ --msgid-bugs-address michal@cihar.com \
+ --copyright-holder "Michal Čihař <michal@cihar.com>" \
+ --package-name Gammu-docs \
+ --package-version $ver \
+ admin/po4a.config
+sed -i '
+ s/SOME DESCRIPTIVE TITLE/Gammu documentation translation/;
+ s/PACKAGE/Gammu-docs/;
+ s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
+ s/VERSION/'$ver'/;
+ ' locale/docs.pot
+
diff --git a/admin/po4a.config b/admin/po4a.config
new file mode 100644
index 0000000..3ba633b
--- /dev/null
+++ b/admin/po4a.config
@@ -0,0 +1,15 @@
+[po4a_langs] cs de es fr id it pl ru zh_CN af bg ca el et fi gl he hu ko nl pt_BR sk sv zh_TW da
+[po4a_paths] locale/docs.pot $lang:locale/$lang/docs.po
+[type: man] docs/user/gammu.1 $lang:docs/user/$lang/gammu.1
+[type: man] docs/user/gammurc.5 $lang:docs/user/$lang/gammurc.5
+[type: man] docs/user/gammu-smsdrc.5 $lang:docs/user/$lang/gammu-smsdrc.5
+[type: man] docs/user/gammu-smsd.1 $lang:docs/user/$lang/gammu-smsd.1
+[type: man] docs/user/gammu-smsd-inject.1 $lang:docs/user/$lang/gammu-smsd-inject.1
+[type: man] docs/user/gammu-smsd-monitor.1 $lang:docs/user/$lang/gammu-smsd-monitor.1
+[type: man] docs/user/jadmaker.1 $lang:docs/user/$lang/jadmaker.1
+[type: man] docs/user/gammu-config.1 $lang:docs/user/$lang/gammu-config.1
+[type: man] docs/user/gammu-smsd-files.7 $lang:docs/user/$lang/gammu-smsd-files.7
+[type: man] docs/user/gammu-smsd-mysql.7 $lang:docs/user/$lang/gammu-smsd-mysql.7
+[type: man] docs/user/gammu-smsd-pgsql.7 $lang:docs/user/$lang/gammu-smsd-pgsql.7
+[type: man] docs/user/gammu-smsd-dbi.7 $lang:docs/user/$lang/gammu-smsd-dbi.7
+[type: man] docs/user/gammu-smsd-tables.7 $lang:docs/user/$lang/gammu-smsd-tables.7
diff --git a/admin/set-version b/admin/set-version
new file mode 100755
index 0000000..5059fbf
--- /dev/null
+++ b/admin/set-version
@@ -0,0 +1,34 @@
+#!/bin/sh
+# vim: expandtab sw=4 ts=4 sts=4:
+
+if [ -z "$1" ] ; then
+ echo "Usage: set-version VERSION"
+ exit 1
+fi
+
+version=$1
+
+do_replace() {
+ sed "s/@VERSION@/$version/;" < $1 > $2
+}
+
+echo "Setting version to $version"
+
+# Packaging
+do_replace cmake/templates/gammu.spec.in gammu.spec
+do_replace cmake/templates/description-pak.in description-pak
+
+# CMakeLists.txt
+sed -i "
+ s/set (VERSION \"[^\"]*\"\\(.*\\))/set (VERSION \"$version\"\1)/;
+ " CMakeLists.txt
+# python/setup.py
+sed -i "s/VERSION = '[0-9.]*'/VERSION = '$version'/" python/setup.py
+
+# Update ChangeLog
+if ! grep -q " - $version" ChangeLog ; then
+ sed -i -e '/^=========$/ a\
+ ' -e '/^=========$/ a\
+2009???? - '"$version"'
+ ' ChangeLog
+fi