Index: head/comms/smstools3/Makefile =================================================================== --- head/comms/smstools3/Makefile (revision 425137) +++ head/comms/smstools3/Makefile (revision 425138) @@ -1,86 +1,90 @@ # Created by: Martin Matuska # $FreeBSD$ PORTNAME= smstools PORTVERSION= 3.1.15 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= comms MASTER_SITES= http://smstools3.kekekasvi.com/packages/ DISTNAME= smstools3-${PORTVERSION} MAINTAINER= madpilot@FreeBSD.org COMMENT= SMS Gateway software for GSM modems and mobile phones LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE CONFLICTS= gnokii-[0-9]* smstools-2.* sendsms-[0-9]* -OPTIONS_DEFINE= STATS EXAMPLES DOCS -OPTIONS_DEFAULT= STATS +OPTIONS_DEFINE= STATS UTF8 EXAMPLES DOCS +OPTIONS_DEFAULT= STATS UTF8 STATS_DESC= Build status and statistics support WRKSRC= ${WRKDIR}/smstools3 USES= gmake shebangfix SHEBANG_FILES= scripts/hex2dec scripts/hex2bin SHEBANG_LANG= awk awk_OLD_CMD= /bin/gawk awk_CMD= ${LOCALBASE}/bin/awk USE_RC_SUBR= smsd SPOOLDIR?= /var/spool/sms LOGDIR?= /var/log/smsd PIDDIR?= /var/run/smsd SMSD_USER?= uucp SMSD_GROUP?= dialer SUB_LIST+= SPOOLDIR="${SPOOLDIR}" LOGDIR="${LOGDIR}" PIDDIR="${PIDDIR}" \ SMSD_USER="${SMSD_USER}" SMSD_GROUP="${SMSD_GROUP}" PLIST_SUB+= SPOOLDIR="${SPOOLDIR}" LOGDIR="${LOGDIR}" PIDDIR="${PIDDIR}" \ SMSD_USER="${SMSD_USER}" SMSD_GROUP="${SMSD_GROUP}" SUB_FILES= pkg-install pkg-deinstall PORTDOCS= * PORTEXAMPLES= .procmailrc .qmailrc * STATS_LIB_DEPENDS= libmm.so:devel/mm STATS_CFLAGS= -I${LOCALBASE}/include STATS_CFLAGS_OFF= -DNOSTATS +UTF8_USES= iconv +UTF8_LDFLAGS= -L${ICONV_PREFIX}/lib ${ICONV_LIB} +UTF8_CFLAGS= -DUSE_ICONV + SMSTOOLS_DEFAULT_COMPORT?= /dev/cuau0 post-patch: @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ -e 's|%%STAGEDIR%%|${STAGEDIR}|g' \ ${WRKSRC}/Makefile ${WRKSRC}/install.sh ${WRKSRC}/src/smsd_cfg.h @${REINPLACE_CMD} -e 's,^override,\toverride,g' ${WRKSRC}/src/Makefile @${REINPLACE_CMD} -e 's|/dev/ttyS0|${SMSTOOLS_DEFAULT_COMPORT}|g' \ -e 's|%%SMSD_USER%%|${SMSD_USER}|' \ -e 's|%%SMSD_GROUP%%|${SMSD_GROUP}|' \ ${WRKSRC}/examples/smsd.conf.easy \ ${WRKSRC}/examples/smsd.conf.full \ ${WRKSRC}/examples/smsd.conf.non-root @${REINPLACE_CMD} 's|/bin/bash|/bin/sh|g' \ ${WRKSRC}/scripts/* post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/smsd - @${MKDIR} ${STAGEDIR}${DATADIR} - @for file in `${FIND} ${WRKSRC}/scripts -type f ! -name 'README' ! -name '*.bak'`; do \ + ${MKDIR} ${STAGEDIR}${DATADIR} + for file in `${FIND} ${WRKSRC}/scripts -type f ! -name 'README' ! -name '*.bak'`; do \ ${INSTALL_SCRIPT} $$file ${STAGEDIR}${DATADIR}/; \ done .for FILE in sendsms sms2html sms2unicode unicode2sms - @${LN} -sf ${DATADIR}/${FILE} ${STAGEDIR}${PREFIX}/bin/${FILE} + ${LN} -sf ${DATADIR}/${FILE} ${STAGEDIR}${PREFIX}/bin/${FILE} .endfor - @${INSTALL_DATA} ${WRKSRC}/examples/smsd.conf.easy ${STAGEDIR}${PREFIX}/etc/smsd.conf.sample - @${MKDIR} ${STAGEDIR}${DOCSDIR}/slideshow - @${INSTALL_DATA} ${WRKSRC}/doc/*.html ${STAGEDIR}${DOCSDIR}/ - @${INSTALL_DATA} ${WRKSRC}/doc/slideshow/* ${STAGEDIR}${DOCSDIR}/slideshow - @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - @for file in `${FIND} ${WRKSRC}/examples -type f ! -name 'README'`; do \ + ${INSTALL_DATA} ${WRKSRC}/examples/smsd.conf.easy ${STAGEDIR}${PREFIX}/etc/smsd.conf.sample + ${MKDIR} ${STAGEDIR}${DOCSDIR}/slideshow + ${INSTALL_DATA} ${WRKSRC}/doc/*.html ${STAGEDIR}${DOCSDIR}/ + ${INSTALL_DATA} ${WRKSRC}/doc/slideshow/* ${STAGEDIR}${DOCSDIR}/slideshow + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + for file in `${FIND} ${WRKSRC}/examples -type f ! -name 'README'`; do \ ${INSTALL_SCRIPT} $$file ${STAGEDIR}${EXAMPLESDIR}/; \ done - @${MKDIR} ${STAGEDIR}${SPOOLDIR}/incoming ${STAGEDIR}${SPOOLDIR}/outgoing \ + ${MKDIR} ${STAGEDIR}${SPOOLDIR}/incoming ${STAGEDIR}${SPOOLDIR}/outgoing \ ${STAGEDIR}${SPOOLDIR}/checked ${STAGEDIR}${LOGDIR} \ ${STAGEDIR}${PIDDIR} .include Index: head/comms/smstools3/distinfo =================================================================== --- head/comms/smstools3/distinfo (revision 425137) +++ head/comms/smstools3/distinfo (revision 425138) @@ -1,2 +1,3 @@ +TIMESTAMP = 1478085197 SHA256 (smstools3-3.1.15.tar.gz) = ed00ffaeaa312a5b4f969f4e97a64603a866bbe16e393ea02f5bf05234814d59 SIZE (smstools3-3.1.15.tar.gz) = 300088 Index: head/comms/smstools3/files/patch-Makefile =================================================================== --- head/comms/smstools3/files/patch-Makefile (revision 425137) +++ head/comms/smstools3/files/patch-Makefile (revision 425138) @@ -1,33 +1,33 @@ ---- Makefile.orig 2007-04-22 13:42:22.000000000 +0200 -+++ Makefile 2009-06-15 09:28:29.000000000 +0200 +--- Makefile.orig 2007-04-22 11:42:22 UTC ++++ Makefile @@ -2,21 +2,21 @@ # If you change destination of executables, remember to change # startup script (init.d/sms3) too. -BINDIR=/usr/local/bin +BINDIR=%%STAGEDIR%%%%PREFIX%%/bin VERSION=$(shell grep package_version src/version.h | cut -f2) -compile: - cd src && $(MAKE) -$(MAKEFLAGS) +all: + cd src && $(MAKE) -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) clean -package: compile clean - ./package.sh +package: clean + $(SH) ./package.sh Index: head/comms/smstools3/files/patch-examples-smsd.conf.easy =================================================================== --- head/comms/smstools3/files/patch-examples-smsd.conf.easy (revision 425137) +++ head/comms/smstools3/files/patch-examples-smsd.conf.easy (revision 425138) @@ -1,16 +1,16 @@ ---- examples/smsd.conf.easy.orig 2006-02-04 20:52:06.000000000 +0100 -+++ examples/smsd.conf.easy 2014-06-26 15:07:50.021638337 +0200 +--- examples/smsd.conf.easy.orig 2006-02-04 19:52:06 UTC ++++ examples/smsd.conf.easy @@ -1,9 +1,12 @@ # Example smsd.conf. Read the manual for a description devices = GSM1 -logfile = /var/log/smsd.log +logfile = /var/log/smsd/smsd.log loglevel = 7 +user = %%SMSD_USER%% +group = %%SMSD_GROUP%% + [GSM1] device = /dev/ttyS0 incoming = yes Index: head/comms/smstools3/files/patch-install.sh =================================================================== --- head/comms/smstools3/files/patch-install.sh (revision 425137) +++ head/comms/smstools3/files/patch-install.sh (revision 425138) @@ -1,51 +1,51 @@ ---- install.sh.orig 2007-04-22 13:43:17.000000000 +0200 -+++ install.sh 2013-10-16 12:22:40.725619989 +0200 +--- install.sh.orig 2007-04-22 11:43:17 UTC ++++ install.sh @@ -3,7 +3,7 @@ BINDIR=$1 if [ -z "$BINDIR" ]; then - BINDIR=/usr/local/bin + BINDIR=%%STAGEDIR%%%%PREFIX%%/bin fi makepath() -@@ -84,38 +84,6 @@ +@@ -84,38 +84,6 @@ fi 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 - -echo "Creating minimum spool directories" -makedir /var/spool -makedir /var/spool/sms -makedir /var/spool/sms/incoming -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 %%STAGEDIR%%%%PREFIX%%/etc/smsd.conf.' Index: head/comms/smstools3/files/patch-scripts_sendsms =================================================================== --- head/comms/smstools3/files/patch-scripts_sendsms (nonexistent) +++ head/comms/smstools3/files/patch-scripts_sendsms (revision 425138) @@ -0,0 +1,11 @@ +--- scripts/sendsms.orig 2010-07-08 12:41:13 UTC ++++ scripts/sendsms +@@ -80,7 +80,7 @@ echo "Text: $TEXT" + + ALPHABET="" + if which iconv > /dev/null 2>&1; then +- if ! $ECHO -n "$TEXT" | iconv -t ISO-8859-15 >/dev/null 2>&1; then ++ if $ECHO -n "$TEXT" | iconv -t ISO-8859-15 2>&1 | grep "invalid" > /dev/null; then + ALPHABET="Alphabet: UCS" + fi + fi Property changes on: head/comms/smstools3/files/patch-scripts_sendsms ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/comms/smstools3/files/patch-src-Makefile =================================================================== --- head/comms/smstools3/files/patch-src-Makefile (revision 425137) +++ head/comms/smstools3/files/patch-src-Makefile (revision 425138) @@ -1,29 +1,45 @@ ---- src/Makefile.orig 2010-06-16 14:02:36.000000000 +0200 -+++ src/Makefile 2010-07-06 22:00:30.303633098 +0200 +--- src/Makefile.orig 2010-09-21 11:29:14 UTC ++++ src/Makefile @@ -1,7 +1,7 @@ # In case of windows, use os_cygwin=yes setting in the configuration file (smsd.conf). # Select your setup size: -CFLAGS = -D NUMBER_OF_MODEMS=64 +CFLAGS += -DNUMBER_OF_MODEMS=64 # Uncomment for Solaris # CFLAGS += -D SOLARIS -@@ -9,7 +9,7 @@ +@@ -9,13 +9,13 @@ CFLAGS = -D NUMBER_OF_MODEMS=64 # CC=gcc # Comment this out, to enable statistics -CFLAGS += -D NOSTATS +#CFLAGS += -D NOSTATS # Comment this out if iconv is not available on the system #CFLAGS += -D USE_ICONV -@@ -50,7 +50,7 @@ + + # Uncomment this is iconv is used and it's not included in libc: +-#LFLAGS += -liconv ++#LDFLAGS += -liconv + + # Uncomment this to force smsd to run in terminal mode + #CFLAGS += -D TERMINAL +@@ -43,14 +43,14 @@ smsd: smsd.c extras.o locking.o cfgfile. + + ifneq (,$(findstring SOLARIS,$(CFLAGS))) + ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS))) +-override LFLAGS += -lsocket -lnsl ++override LDFLAGS += -lsocket -lnsl + endif + endif + ifneq (,$(findstring NOSTATS,$(CFLAGS))) - $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) +- $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) ++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) else - $(CC) `mm-config --cflags` $(CFLAGS) -o $@ $^ `mm-config --ldflags --libs` $(LFLAGS) -+ $(CC) `$(LOCALBASE)/bin/mm-config --cflags` $(CFLAGS) -o $@ $^ `$(LOCALBASE)/bin/mm-config --ldflags --libs` $(LFLAGS) ++ $(CC) `$(LOCALBASE)/bin/mm-config --cflags` $(CFLAGS) -o $@ $^ `$(LOCALBASE)/bin/mm-config --ldflags --libs` $(LDFLAGS) endif clean: