Initial import of smstools:

The SMS Server Tools 3 is a SMS Gateway software which can send and
receive short messages through GSM modems and mobile phones.

You can send short messages by simply storing text files into a special
spool directory. The program monitors this directory and sends new
files automatically. It also stores received short messages into another
directory as text files. Binary messages (including Unicode text) are
also supported, for example ring tone messages. It's also possible to
send a WAP Push message to the WAP/MMS capable mobile phone.

The program can be run as a SMS daemon which can be started automatically
when the operating system starts. High availability can be ensured by
using multiple GSM devices (currently up to 64, this limit is easily
changeable).
This commit is contained in:
Sergey Svishchev 2008-02-05 10:39:41 +00:00 committed by Thomas Klausner
parent 0af8d4a9a9
commit d44155bc4c
7 changed files with 130 additions and 0 deletions

7
smstools/DESCR Normal file
View file

@ -0,0 +1,7 @@
The SMS Server Tools 3 is a SMS Gateway software which can send and
receive short messages through GSM modems and mobile phones.
You can send short messages by simply storing text files into a special
spool directory. The program monitors this directory and sends new
files automatically. It also stores received short messages into another
directory as text files.

32
smstools/Makefile Normal file
View file

@ -0,0 +1,32 @@
# $NetBSD: Makefile,v 1.1.1.1 2008/02/05 10:39:41 shattered Exp $
#
DISTNAME= smstools3-3.0.10
PKGNAME= smstools-3.0.10
CATEGORIES= comms
MASTER_SITES= http://smstools3.kekekasvi.com/packages/
MAINTAINER= shattered@users.sourceforge.net
HOMEPAGE= http://smstools3.kekekasvi.com/
COMMENT= Send and receive short messages via GSM phones
USE_TOOLS+= gmake
CPPFLAGS+= -DPKG_SYSCONFDIR="\"${PKG_SYSCONFDIR}\""
EGDIR= ${PREFIX}/share/examples/smstools
CONF_FILES= ${EGDIR}/smsd.conf ${PKG_SYSCONFDIR}/smsd.conf
INSTALLATION_DIRS+= ${EGDIR}
RCD_SCRIPTS= smsd
WRKSRC= ${WRKDIR}/smstools3
BUILD_DIRS= src
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/smsd ${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKSRC}/scripts/sendsms ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/scripts/sms2html ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/scripts/sms2unicode ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/scripts/unicode2sms ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/examples/smsd.conf.easy ${EGDIR}/smsd.conf
.include "../../mk/bsd.pkg.mk"

8
smstools/PLIST Normal file
View file

@ -0,0 +1,8 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2008/02/05 10:39:41 shattered Exp $
bin/sendsms
bin/sms2html
bin/sms2unicode
bin/unicode2sms
sbin/smsd
share/examples/rc.d/smsd
share/examples/smstools/smsd.conf

1
smstools/TODO Normal file
View file

@ -0,0 +1 @@
Install HTML documentation.

6
smstools/distinfo Normal file
View file

@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.1.1.1 2008/02/05 10:39:41 shattered Exp $
SHA1 (smstools3-3.0.10.tar.gz) = 86a77b250dd4d1519161aa551a69146068f3ac31
RMD160 (smstools3-3.0.10.tar.gz) = 04aef3ddf345038138b76dd1fd68c2b0d72e5cfe
Size (smstools3-3.0.10.tar.gz) = 210913 bytes
SHA1 (patch-aa) = d6fcad9fb3f1ba82165be8733fcaf0c51f69d649

54
smstools/files/smsd.sh Normal file
View file

@ -0,0 +1,54 @@
#!@RCD_SCRIPTS_SHELL@
#
# PROVIDE: smsd
# REQUIRE: DAEMON
# KEYWORD: shutdown
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
name="smsd"
rcvar=$name
command="@PREFIX@/bin/${name}"
command_args="&"
required_files="@PKG_SYSCONFDIR@/smsd.conf"
start_precmd="smsd_precmd"
if [ -f "${required_files}" ]; then
pidfile_=`@AWK@ '/^#/ {next}; /^pidfile[ ]/ {r = $3};
END {print r}' ${required_files}`
if [ -n "${pidfile_}" ]; then
pidfile=${pidfile_}
fi
smsd_user=`@AWK@ '/^#/ {next}; /^user[ ]/ {r = $3};
END {print r}' ${required_files}`
device=`@AWK@ '/^#/ {next}; /^device[ ]/ {r = $3};
END {print r}' ${required_files}`
logfile=`@AWK@ '/^#/ {next}; /^logfile[ ]/ {r = $3};
END {print r}' ${required_files}`
fi
smsd_precmd()
{
if [ -n "${smsd_user}" -a -n "${device}" ]; then
@CHOWN@ ${smsd_user} ${device}
fi
if [ -n "${smsd_user}" -a -n "${pidfile}" ]; then
@TOUCH@ ${pidfile}
@CHOWN@ ${smsd_user} ${pidfile}
fi
if [ -n "${smsd_user}" -a -n "${logfile}" ]; then
@TOUCH@ ${logfile}
@CHOWN@ ${smsd_user} ${logfile}
fi
}
if [ -f /etc/rc.subr -a -f /etc/rc.conf \
-a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
load_rc_config $name
run_rc_command "$1"
else
@ECHO@ -n " ${name}"
${command} ${command_args}
fi

22
smstools/patches/patch-aa Normal file
View file

@ -0,0 +1,22 @@
$NetBSD: patch-aa,v 1.1.1.1 2008/02/05 10:39:41 shattered Exp $
--- src/smsd_cfg.c.orig 2007-07-08 12:45:30.000000000 +0000
+++ src/smsd_cfg.c
@@ -677,7 +677,7 @@ void help()
#endif
printf(" -t run smsd in terminal\n");
printf(" -V print copyright and version\n\n");
- printf("All other options are set by the file /etc/smsd.conf.\n\n");
+ printf("All other options are set by the file " PKG_SYSCONFDIR "/smsd.conf.\n\n");
printf("Output is written to stdout, errors are written to stderr.\n\n");
exit(0);
}
@@ -685,7 +685,7 @@ void help()
void parsearguments(int argc,char** argv)
{
int result;
- strcpy(configfile,"/etc/smsd.conf");
+ strcpy(configfile,PKG_SYSCONFDIR "/smsd.conf");
printstatus=0;
terminal = 0;
arg_infofile[0] = 0;