aboutsummaryrefslogtreecommitdiff
path: root/comms/smstools3
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2008-05-18 09:23:03 +0000
committerMartin Matuska <mm@FreeBSD.org>2008-05-18 09:23:03 +0000
commita64073f3fa7989d2bdc95816ba410ec8250c9a30 (patch)
treee40fdb5f996ce38f2080f4b2df55e9a602fa12ed /comms/smstools3
parent4c77305f1ac38eaad2486676d6cf18934c33840d (diff)
Notes
Diffstat (limited to 'comms/smstools3')
-rw-r--r--comms/smstools3/Makefile81
-rw-r--r--comms/smstools3/distinfo3
-rw-r--r--comms/smstools3/files/patch-Makefile28
-rw-r--r--comms/smstools3/files/patch-install.sh51
-rw-r--r--comms/smstools3/files/patch-src_smsd_cfg.c20
-rw-r--r--comms/smstools3/files/smsd.in34
-rw-r--r--comms/smstools3/pkg-descr6
-rw-r--r--comms/smstools3/pkg-plist97
8 files changed, 320 insertions, 0 deletions
diff --git a/comms/smstools3/Makefile b/comms/smstools3/Makefile
new file mode 100644
index 000000000000..601985f4adf5
--- /dev/null
+++ b/comms/smstools3/Makefile
@@ -0,0 +1,81 @@
+# New ports collection makefile for: smstools3
+# Date created: 2008-05-18
+# Whom: Martin Matuska <mm@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= smstools
+PORTVERSION= 3.1
+CATEGORIES= comms
+MASTER_SITES= http://smstools3.kekekasvi.com/packages/
+DISTNAME= smstools3-${PORTVERSION}
+
+MAINTAINER= mm@FreeBSD.org
+COMMENT= SMS Gateway software for GSM modems and mobile phones
+
+LIB_DEPENDS= mm:${PORTSDIR}/devel/mm
+
+CONFLICTS= smstools-2.*
+
+WRKSRC= ${WRKDIR}/smstools3
+USE_GMAKE= yes
+USE_RC_SUBR= smsd
+SPOOLDIR?= /var/spool/sms
+PLIST_SUB+= PREFIX="${PREFIX}" \
+ SPOOLDIR="${SPOOLDIR}"
+
+DOCS= alarmhandler.html blacklist.html book.html compiling.html \
+ configure.html configure2.html costs.html eventhandler.html \
+ faq.html fileformat.html gpl.html gpl_de.html \
+ hardwarecomp.html history3.html index.html license.html \
+ links.html localizing.html references.html run.html \
+ softwarecomp.html statformat.html statusmonitor.html \
+ support.gif support.html udh.html windows.html
+
+SLIDESHOW= blacklist.gif eventhandler.gif logfile.gif modem.gif \
+ move_l.gif move_r.gif page1.html page2.html page2.jpg \
+ page2b.html page3.html page4.html page5.html page6.html \
+ page7.html page8.html queue.gif sms.gif smstools3-small.jpg \
+ statistic.gif status.gif support.gif
+
+EXAMPLES= .procmailrc .qmailrc language-ISO-8859-15.fi \
+ language-UTF-8.fi operator_logo1.sms operator_logo2.sms \
+ received_report.sms received_sms.sms send_sms.sms \
+ send_sms_unicode.sms smsd.conf.easy smsd.conf.full \
+ smsd.conf.non-root
+
+SCRIPTS= checkhandler-utf-8 email2sms eventhandler-utf-8 hex2bin \
+ hex2dec mysmsd pkill regular_run sendsms sms2html sms2unicode \
+ sms2xml sms3 smsevent smsresend smstest.php sql_demo \
+ unicode2sms
+
+post-patch:
+ @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/install.sh \
+ ${WRKSRC}/src/smsd_cfg.c
+ @${REINPLACE_CMD} 's|/dev/ttyS0|/dev/cuad0|g' \
+ ${WRKSRC}/examples/smsd.conf.easy \
+ ${WRKSRC}/examples/smsd.conf.full \
+ ${WRKSRC}/examples/smsd.conf.non-root
+
+post-install:
+ @${MKDIR} ${DATADIR}
+ @${INSTALL_SCRIPT} ${SCRIPTS:S,^,${WRKSRC}/scripts/,} ${DATADIR}
+.for FILE in sendsms sms2html sms2unicode unicode2sms
+ @${LN} -s ${DATADIR}/${FILE} ${PREFIX}/bin/${FILE}
+.endfor
+ @${INSTALL_DATA} ${WRKSRC}/examples/smsd.conf.easy ${PREFIX}/etc/smsd.conf.sample
+ @if [ ! -f ${PREFIX}/etc/smsd.conf ]; then \
+ ${CP} ${PREFIX}/etc/smsd.conf.sample ${PREFIX}/etc/smsd.conf; \
+ fi
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}/slideshow
+ @${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/doc/,} ${DOCSDIR}/
+ @${INSTALL_DATA} ${SLIDESHOW:S,^,${WRKSRC}/doc/slideshow/,} \
+ ${DOCSDIR}/slideshow
+.endif
+.if !defined(NOPORTEXAMPLES)
+ @${MKDIR} ${EXAMPLESDIR}
+ @${INSTALL_DATA} ${EXAMPLES:S,^,${WRKSRC}/examples/,} ${EXAMPLESDIR}/
+.endif
+.include <bsd.port.mk>
diff --git a/comms/smstools3/distinfo b/comms/smstools3/distinfo
new file mode 100644
index 000000000000..555564bb452e
--- /dev/null
+++ b/comms/smstools3/distinfo
@@ -0,0 +1,3 @@
+MD5 (smstools3-3.1.tar.gz) = 81b0d46e76c8d737820b1f7d65d44ea0
+SHA256 (smstools3-3.1.tar.gz) = 8b5ec53286ad1d6a22a4fdc05378f0ee1bfae8002867cd0c323ce526e1ac9a24
+SIZE (smstools3-3.1.tar.gz) = 229983
diff --git a/comms/smstools3/files/patch-Makefile b/comms/smstools3/files/patch-Makefile
new file mode 100644
index 000000000000..4a06161c0298
--- /dev/null
+++ b/comms/smstools3/files/patch-Makefile
@@ -0,0 +1,28 @@
+--- Makefile.orig 2007-04-22 13:42:22.000000000 +0200
++++ Makefile 2008-05-17 14:45:59.000000000 +0200
+@@ -6,17 +6,17 @@
+
+ VERSION=$(shell grep package_version src/version.h | cut -f2)
+
+-compile:
+- cd src && $(MAKE) -$(MAKEFLAGS)
++all:
++ cd src && $(MAKE) $(MAKEFLAGS)
+
+-install: compile
+- ./install.sh $(BINDIR)
++install:
++ $(SH) ./install.sh $(BINDIR)
+
+ uninstall:
+- ./uninstall.sh $(BINDIR)
++ $(SH) ./uninstall.sh $(BINDIR)
+
+ clean:
+- cd src && $(MAKE) -$(MAKEFLAGS) clean
++ cd src && $(MAKE) $(MAKEFLAGS) clean
+
+-package: compile clean
+- ./package.sh
++package: clean
++ $(SH) ./package.sh
diff --git a/comms/smstools3/files/patch-install.sh b/comms/smstools3/files/patch-install.sh
new file mode 100644
index 000000000000..607cefb5a788
--- /dev/null
+++ b/comms/smstools3/files/patch-install.sh
@@ -0,0 +1,51 @@
+--- install.sh.orig 2007-04-22 13:43:17.000000000 +0200
++++ install.sh 2008-05-18 00:16:05.000000000 +0200
+@@ -3,7 +3,7 @@
+
+ BINDIR=$1
+ if [ -z "$BINDIR" ]; then
+- BINDIR=/usr/local/bin
++ BINDIR=/usr/local
+ fi
+
+ makepath()
+@@ -84,14 +84,8 @@
+ delete $BINDIR/getsms
+ delete $BINDIR/putsms
+
+-echo "Installing some scripts"
+-copy scripts/sendsms $BINDIR/sendsms
+-copy scripts/sms2html $BINDIR/sms2html
+-copy scripts/sms2unicode $BINDIR/sms2unicode
+-copy scripts/unicode2sms $BINDIR/unicode2sms
+-
+ echo "Installing config file"
+-copy examples/smsd.conf.easy /etc/smsd.conf
++copy examples/smsd.conf.easy /usr/local/etc/smsd.conf
+
+ echo "Creating minimum spool directories"
+ makedir /var/spool
+@@ -100,22 +94,6 @@
+ makedir /var/spool/sms/outgoing
+ makedir /var/spool/sms/checked
+
+-echo "Installing start-script"
+-SMS3SCRIPT=scripts/sms3
+-if [ -d /etc/init.d ]; then
+- copy scripts/sms3 /etc/init.d/sms3
+- SMS3SCRIPT=/etc/init.d/sms3
+-elif [ -d /sbin/init.d ]; then
+- copy scripts/sms3 /sbin/init.d/sms3
+- SMS3SCRIPT=/sbin/init.d/sms3
+-else
+- echo " I do not know where to copy scripts/sms3. Please find out yourself."
+-fi
+-
+ echo ""
+ echo "Example script files are not installed automatically."
+-echo 'Please dont forget to edit /etc/smsd.conf.'
+-if [ "$BINDIR" != "/usr/local/bin" ]; then
+- echo "You have installed executables to $BINDIR,"
+- echo "you should manually edit $SMS3SCRIPT script."
+-fi
++echo 'Please dont forget to edit /usr/local/etc/smsd.conf.'
diff --git a/comms/smstools3/files/patch-src_smsd_cfg.c b/comms/smstools3/files/patch-src_smsd_cfg.c
new file mode 100644
index 000000000000..df03fec70086
--- /dev/null
+++ b/comms/smstools3/files/patch-src_smsd_cfg.c
@@ -0,0 +1,20 @@
+--- src/smsd_cfg.c Fri Apr 21 11:25:01 2006
++++ src/smsd_cfg.c Fri Apr 21 11:27:51 2006
+@@ -387,7 +387,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);
+ }
+@@ -395,7 +395,7 @@
+ void parsearguments(int argc,char** argv)
+ {
+ int result;
+- strcpy(configfile,"/etc/smsd.conf");
++ strcpy(configfile,"%%PREFIX%%/etc/smsd.conf");
+ printstatus=0;
+
+ do
diff --git a/comms/smstools3/files/smsd.in b/comms/smstools3/files/smsd.in
new file mode 100644
index 000000000000..2dec3b9ad417
--- /dev/null
+++ b/comms/smstools3/files/smsd.in
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: smsd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable smsd:
+#
+# smsd_enable="YES"
+#
+smsd_enable=${smsd_enable-"NO"}
+
+. %%RC_SUBR%%
+
+name="smsd"
+rcvar=`set_rcvar`
+load_rc_config $name
+pidfile="/var/run/smsd.pid"
+command="%%PREFIX%%/bin/smsd"
+command_args='&'
+
+# Unfortunally we need to this because as the program won't
+# exit cleanly and the terminal will be stuck forever in waitpid.
+case "$1" in
+ stop)
+ pkill smsd
+ ;;
+ *)
+ run_rc_command "$1"
+ ;;
+esac
+
diff --git a/comms/smstools3/pkg-descr b/comms/smstools3/pkg-descr
new file mode 100644
index 000000000000..595deaa5fe48
--- /dev/null
+++ b/comms/smstools3/pkg-descr
@@ -0,0 +1,6 @@
+The SMS Server Tools 3 is a SMS Gateway software which can send and receive
+short messages through GSM modems and mobile phones.
+
+This is the enhanced version 3.x maintained by Mr. Keijo "Keke" Kasvi.
+
+WWW: http://smstools3.kekekasvi.com
diff --git a/comms/smstools3/pkg-plist b/comms/smstools3/pkg-plist
new file mode 100644
index 000000000000..82ec97374248
--- /dev/null
+++ b/comms/smstools3/pkg-plist
@@ -0,0 +1,97 @@
+bin/smsd
+bin/sendsms
+bin/sms2html
+bin/sms2unicode
+bin/unicode2sms
+%%DATADIR%%/checkhandler-utf-8
+%%DATADIR%%/email2sms
+%%DATADIR%%/eventhandler-utf-8
+%%DATADIR%%/hex2bin
+%%DATADIR%%/hex2dec
+%%DATADIR%%/mysmsd
+%%DATADIR%%/pkill
+%%DATADIR%%/regular_run
+%%DATADIR%%/sendsms
+%%DATADIR%%/sms3
+%%DATADIR%%/sms2html
+%%DATADIR%%/sms2unicode
+%%DATADIR%%/sms2xml
+%%DATADIR%%/smsevent
+%%DATADIR%%/smsresend
+%%DATADIR%%/smstest.php
+%%DATADIR%%/sql_demo
+%%DATADIR%%/unicode2sms
+@unexec if [ -f %D/etc/smsd.conf ] && cmp -s %D/etc/smsd.conf %D/etc/smsd.conf.sample; then rm -f %D/etc/smsd.conf; fi
+etc/smsd.conf.sample
+@exec if [ ! -f %D/etc/smsd.conf ] ; then cp -p %D/%F %B/smsd.conf; fi
+%%PORTDOCS%%%%DOCSDIR%%/alarmhandler.html
+%%PORTDOCS%%%%DOCSDIR%%/blacklist.html
+%%PORTDOCS%%%%DOCSDIR%%/book.html
+%%PORTDOCS%%%%DOCSDIR%%/compiling.html
+%%PORTDOCS%%%%DOCSDIR%%/configure.html
+%%PORTDOCS%%%%DOCSDIR%%/configure2.html
+%%PORTDOCS%%%%DOCSDIR%%/costs.html
+%%PORTDOCS%%%%DOCSDIR%%/eventhandler.html
+%%PORTDOCS%%%%DOCSDIR%%/faq.html
+%%PORTDOCS%%%%DOCSDIR%%/fileformat.html
+%%PORTDOCS%%%%DOCSDIR%%/gpl.html
+%%PORTDOCS%%%%DOCSDIR%%/gpl_de.html
+%%PORTDOCS%%%%DOCSDIR%%/hardwarecomp.html
+%%PORTDOCS%%%%DOCSDIR%%/history3.html
+%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/license.html
+%%PORTDOCS%%%%DOCSDIR%%/links.html
+%%PORTDOCS%%%%DOCSDIR%%/localizing.html
+%%PORTDOCS%%%%DOCSDIR%%/references.html
+%%PORTDOCS%%%%DOCSDIR%%/run.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/blacklist.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/eventhandler.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/logfile.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/modem.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/move_l.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/move_r.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page1.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page2.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page2.jpg
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page2b.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page3.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page4.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page5.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page6.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page7.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/page8.html
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/queue.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/sms.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/smstools3-small.jpg
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/statistic.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/status.gif
+%%PORTDOCS%%%%DOCSDIR%%/slideshow/support.gif
+%%PORTDOCS%%%%DOCSDIR%%/softwarecomp.html
+%%PORTDOCS%%%%DOCSDIR%%/statformat.html
+%%PORTDOCS%%%%DOCSDIR%%/statusmonitor.html
+%%PORTDOCS%%%%DOCSDIR%%/support.gif
+%%PORTDOCS%%%%DOCSDIR%%/support.html
+%%PORTDOCS%%%%DOCSDIR%%/udh.html
+%%PORTDOCS%%%%DOCSDIR%%/windows.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.procmailrc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.qmailrc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/language-ISO-8859-15.fi
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/language-UTF-8.fi
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/operator_logo1.sms
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/operator_logo2.sms
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/received_report.sms
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/received_sms.sms
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/send_sms.sms
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/send_sms_unicode.sms
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/smsd.conf.easy
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/smsd.conf.full
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/smsd.conf.non-root
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
+%%PORTDOCS%%@dirrm %%DATADIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/slideshow
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@exec mkdir -p %%SPOOLDIR%%/incoming %%SPOOLDIR%%/outgoing %%SPOOLDIR%%/checked
+@unexec echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
+@unexec echo "If you are permanently removing smstools, you should also:" | /usr/bin/fmt
+@unexec echo "'rm -rf %%SPOOLDIR%%'" | /usr/bin/fmt
+@unexec echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="