1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

Tools to handle Short Message Service

PR:		ports/80511
Submitted by:	Benny Kjrgaard <benny@catpipe.net>
This commit is contained in:
Sergey Matveychuk 2005-05-01 19:43:33 +00:00
parent db5d02a600
commit cc8659b76e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=134464
11 changed files with 296 additions and 0 deletions

View File

@ -82,6 +82,7 @@
SUBDIR += scud
SUBDIR += seyon
SUBDIR += sms_client
SUBDIR += smstools
SUBDIR += snooper
SUBDIR += sredird
SUBDIR += thebridge

35
comms/smstools/Makefile Normal file
View File

@ -0,0 +1,35 @@
# New ports collection makefile for: smstools
# Date created: 06-11-2004
# Whom: Benny Kjaergaard <bennyk@wax.dk>
#
# $FreeBSD$
#
PORTNAME= smstools
PORTVERSION= 1.14.8
CATEGORIES= comms
MASTER_SITES= http://smstools.meinemullemaus.de/packages/
MAINTAINER= bennyk@wax.dk
COMMENT= Tools to handle Short Message Service
LIB_DEPENDS= mm:${PORTSDIR}/devel/mm
WRKSRC= ${WRKDIR}/smstools
USE_GMAKE= yes
USE_REINPLACE= yes
post-patch:
echo "${EXAMPLESDIR}"
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" \
${WRKSRC}/src/smsd_cfg.c \
${WRKSRC}/install.sub \
${WRKSRC}/Makefile \
${WRKSRC}/examples/smsd.conf.easy \
${WRKSRC}/examples/smsd.conf.full \
${WRKSRC}/bin/sms
@${REINPLACE_CMD} -e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g; \
s|%%DOCSDIR%%|${DOCSDIR}|g" \
${WRKSRC}/install.sub
.include <bsd.port.mk>

2
comms/smstools/distinfo Normal file
View File

@ -0,0 +1,2 @@
MD5 (smstools-1.14.8.tar.gz) = 85b342e53d7fdde89ef25ad21e1c5fe0
SIZE (smstools-1.14.8.tar.gz) = 158423

View File

@ -0,0 +1,14 @@
--- Makefile.orig Sat Nov 6 16:09:09 2004
+++ Makefile Sat Nov 6 16:09:24 2004
@@ -1,9 +1,8 @@
# Makefile
-VERSION=$(shell grep package_version src/version.h | cut -f2)
-
+all: compile
compile:
- cd src && $(MAKE) -$(MAKEFLAGS)
+ cd src && $(MAKE)
install: compile
./install.sub

View File

@ -0,0 +1,49 @@
--- bin/sms.orig Sun Apr 17 12:56:51 2005
+++ bin/sms Sun Apr 17 12:58:09 2005
@@ -1,21 +1,27 @@
-#! /bin/sh
-# This script can be used to start/stop smsd
-# as a daemon in Linux and Solaris.
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: smsd
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+#
+# Add the following line to %%PREFIX%%/etc/rc.conf to enable smsd:
+#
+# smsd_enable="YES"
+#
+smsd_enable=${smsd_enable-"NO"}
+smsd_flags=${smsd_flags-""}
-case "$1" in
- start)
- find /var/spool/sms -name '*.LOCK' -exec rm {} \;
- /usr/local/bin/smsd &
- ;;
- stop)
- pkill smsd
- ;;
- restart|reload)
- $0 stop
- $0 start
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
-esac
+. /etc/rc.subr
+
+name=smsd
+rcvar=`set_rcvar`
+
+command="find /var/spool/sms -name '*.LOCK' -exec rm {} \; %%PREFIX%%/sbin/${name}"
+pidfile=/var/run/${name}.pid
+sig_stop=-KILL
+
+load_rc_config ${name}
+run_rc_command "$1"

View File

@ -0,0 +1,13 @@
--- examples/smsd.conf.easy.orig Sat Nov 6 16:10:46 2004
+++ examples/smsd.conf.easy Sat Nov 6 16:12:34 2004
@@ -7,8 +7,8 @@
loglevel = 7
[GSM1]
-# Windows: /dev/com1, Solaris: /dev/cua/a, Linux /dev/ttyS0
-device = /dev/ttyS0
+# Windows: /dev/com1, Solaris: /dev/cua/a, Linux /dev/ttyS0, FreeBSD5: /dev/cuaa0
+device = /dev/cuaa0
incoming = yes
cs_convert = yes
#pin = 1111

View File

@ -0,0 +1,24 @@
--- examples/smsd.conf.full.orig Sat Nov 6 16:11:35 2004
+++ examples/smsd.conf.full Sat Nov 6 16:16:54 2004
@@ -45,8 +45,8 @@
[GSM1]
init = ATE0+CPMS="SM"+CNMI=2,0,0,2,1
-# Windows: /dev/com1, Solaris: /dev/cua/a, Linux /dev/ttyS0
-device = /dev/ttyS0
+# Windows: /dev/com1, Solaris: /dev/cua/a, Linux /dev/ttyS0, FreeBSD5: /dev/cuaa0
+device = /dev/cuaa0
incoming = yes
queues = OTHER
#You don't need a PIN for mobile phones
@@ -61,8 +61,8 @@
[GSM2]
init = ATE0
-# Windows: /dev/com2, Solaris: /dev/cua/b, Linux /dev/ttyS1
-device = /dev/ttyS1
+# Windows: /dev/com2, Solaris: /dev/cua/b, Linux /dev/ttyS1, FreeBSD5: /dev/cuaa1
+device = /dev/cuaa1
incoming = yes
queues = OTHER
#You don't need a PIN for mobile phones

View File

@ -0,0 +1,37 @@
--- install.sub.orig Wed Apr 21 22:37:00 2004
+++ install.sub Sun May 1 19:37:23 2005
@@ -15,19 +15,24 @@
exit 1
fi
echo "Installing"
-cp bin/smsd* bin/getsms* bin/putsms* /usr/local/bin
-copy bin/smsevent /usr/local/bin/smsevent
-copy bin/mysmsd /usr/local/bin/mysmsd
-copy bin/email2sms /usr/local/bin/email2sms
-copy bin/sendsms /usr/local/bin/sendsms
-copy bin/smsresend /usr/local/bin/smsresend
-copy examples/smsd.conf.easy /etc/smsd.conf
-[ -d /etc/init.d ] && copy bin/sms /etc/init.d/sms
-[ -d /sbin/init.d ] && copy bin/sms /sbin/init.d/sms
+cp bin/smsd* bin/getsms* bin/putsms* %%PREFIX%%/bin
+copy bin/smsevent %%PREFIX%%/bin/smsevent
+copy bin/mysmsd %%PREFIX%%/bin/mysmsd
+copy bin/email2sms %%PREFIX%%/bin/email2sms
+copy bin/sendsms %%PREFIX%%/bin/sendsms
+copy bin/smsresend %%PREFIX%%/bin/smsresend
+copy examples/smsd.conf.easy %%PREFIX%%/etc/smsd.conf
+rm examples/.qmailrc
+rm examples/.procmailrc
+[ -d %%PREFIX%%/etc/rc.d ] && copy bin/sms %%PREFIX%%/etc/rc.d/smsd.sh.sample
+[ -d %%EXAMPLESDIR%% ] || mkdir -p %%EXAMPLESDIR%%
+[ -d %%EXAMPLESDIR%% ] && cp -R examples/* %%EXAMPLESDIR%%
+[ -d %%DOCSDIR%% ] || mkdir -p %%DOCSDIR%%
+[ -d %%DOCSDIR%% ] && cp -R doc/* %%DOCSDIR%%
[ -d /var/spool ] || mkdir /var/spool
[ -d /var/spool/sms ] || mkdir /var/spool/sms
[ -d /var/spool/sms/incoming ] || mkdir /var/spool/sms/incoming
[ -d /var/spool/sms/outgoing ] || mkdir /var/spool/sms/outgoing
[ -d /var/spool/sms/checked ] || mkdir /var/spool/sms/checked
echo Installation finished
-echo 'Please dont forget to edit /etc/smsd.conf.'
+echo 'Please dont forget to edit %%PREFIX%%/etc/smsd.conf.'

View File

@ -0,0 +1,20 @@
--- src/smsd_cfg.orig Sat Nov 6 16:04:24 2004
+++ src/smsd_cfg.c Sat Nov 6 16:06:29 2004
@@ -329,7 +329,7 @@
printf(" -h this help\n");
printf(" -s display status monitor\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 %%PREFIX%%/etc/smsd.conf.\n\n");
printf("Output is written to stdout, errors are written to stderr.\n\n");
exit(0);
}
@@ -337,7 +337,7 @@
void parsearguments(int argc,char** argv)
{
int result;
- strcpy(configfile,"/etc/smsd.conf");
+ strcpy(configfile,"%%PREFIX%%/etc/smsd.conf");
debug=0;
printstatus=0;

8
comms/smstools/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
SMS server tools , utils to handle a sms gateway
for more info see authors site at:
WWW: http://smstools.meinemullemaus.de/
- Benny
bennyk@wax.dk

93
comms/smstools/pkg-plist Normal file
View File

@ -0,0 +1,93 @@
bin/email2sms
bin/sendsms
bin/smsresend
bin/smsd
bin/getsms
bin/putsms
bin/mysmsd
bin/smsevent
etc/rc.d/smsd.sh.sample
etc/smsd.conf
%%EXAMPLESDIR%%/operator_logo2.sms
%%EXAMPLESDIR%%/received_report.sms
%%EXAMPLESDIR%%/received_sms.sms
%%EXAMPLESDIR%%/send_sms.sms
%%EXAMPLESDIR%%/smsd.black
%%EXAMPLESDIR%%/smsd.conf.easy
%%EXAMPLESDIR%%/smsd.conf.full
%%EXAMPLESDIR%%/sql_demo
%%EXAMPLESDIR%%/smsd.conf.easy.orig
%%EXAMPLESDIR%%/smsd.conf.full.orig
%%EXAMPLESDIR%%/smsd.conf.full.bak
%%EXAMPLESDIR%%/smsd.conf.easy.bak
%%EXAMPLESDIR%%/operator_logo1.sms
%%DOCSDIR%%/html/slideshow/status.gif
%%DOCSDIR%%/html/slideshow/eventhandler.gif
%%DOCSDIR%%/html/slideshow/logfile.gif
%%DOCSDIR%%/html/slideshow/modem.gif
%%DOCSDIR%%/html/slideshow/move_l.gif
%%DOCSDIR%%/html/slideshow/move_r.gif
%%DOCSDIR%%/html/slideshow/page1.html
%%DOCSDIR%%/html/slideshow/page2.html
%%DOCSDIR%%/html/slideshow/page3.html
%%DOCSDIR%%/html/slideshow/page4.html
%%DOCSDIR%%/html/slideshow/page5.html
%%DOCSDIR%%/html/slideshow/page6.html
%%DOCSDIR%%/html/slideshow/page7.html
%%DOCSDIR%%/html/slideshow/page8.html
%%DOCSDIR%%/html/slideshow/queue.gif
%%DOCSDIR%%/html/slideshow/sms.gif
%%DOCSDIR%%/html/slideshow/statistic.gif
%%DOCSDIR%%/html/slideshow/blacklist.gif
%%DOCSDIR%%/html/blacklist.html
%%DOCSDIR%%/html/book.html
%%DOCSDIR%%/html/butterfly.gif
%%DOCSDIR%%/html/compiling.html
%%DOCSDIR%%/html/configure.html
%%DOCSDIR%%/html/configure2.html
%%DOCSDIR%%/html/contact.html
%%DOCSDIR%%/html/costs.html
%%DOCSDIR%%/html/download.html
%%DOCSDIR%%/html/email.png
%%DOCSDIR%%/html/book.html~
%%DOCSDIR%%/html/eventhandler.html
%%DOCSDIR%%/html/faq.html
%%DOCSDIR%%/html/fileformat.html
%%DOCSDIR%%/html/gpl.html
%%DOCSDIR%%/html/gpl_de.html
%%DOCSDIR%%/html/gsmmodem.html
%%DOCSDIR%%/html/hardwarecomp.html
%%DOCSDIR%%/html/history.html
%%DOCSDIR%%/html/index.html
%%DOCSDIR%%/html/index.html~
%%DOCSDIR%%/html/key.png
%%DOCSDIR%%/html/license.html
%%DOCSDIR%%/html/links.html
%%DOCSDIR%%/html/logging.html
%%DOCSDIR%%/html/mnp.html
%%DOCSDIR%%/html/news.html
%%DOCSDIR%%/html/public_key_stefan_frings.txt
%%DOCSDIR%%/html/quotes.html
%%DOCSDIR%%/html/redundancy.html
%%DOCSDIR%%/html/referenzen.html
%%DOCSDIR%%/html/run.html
%%DOCSDIR%%/html/softwarecomp.html
%%DOCSDIR%%/html/sql.html
%%DOCSDIR%%/html/sql2.html
%%DOCSDIR%%/html/statformat.html
%%DOCSDIR%%/html/statusmonitor.html
%%DOCSDIR%%/html/tc35.gif
%%DOCSDIR%%/html/thanks.html
%%DOCSDIR%%/html/twist.gif
%%DOCSDIR%%/html/windows.html
%%DOCSDIR%%/html/thanks.gif
%%DOCSDIR%%/html/alarmhandler.html
%%DOCSDIR%%/html/shippingdetails.html
%%DOCSDIR%%/license.txt
%%DOCSDIR%%/manual.html
@dirrm %%EXAMPLESDIR%%
@dirrm %%DOCSDIR%%/html/slideshow
@dirrm %%DOCSDIR%%/html
@dirrm %%DOCSDIR%%