mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 20:05:13 +08:00
🤞 Sync 2026-04-23 06:19:46
This commit is contained in:
1 parent
a1df15cd3d
commit
b86d032e91
250 files changed
+41507
-188
No files matched your search
@@ -0,0 +1,65 @@
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=smstools3
|
||||
PKG_VERSION:=3.1.21
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://smstools3.kekekasvi.com/packages/
|
||||
PKG_HASH:=skip
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
PKG_MAINTAINER:=Harald Geyer <harald@ccbib.org>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_PARALLEL:=0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/smstools3-fix
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=SMS Server Tools 3
|
||||
DEPENDS:=$(ICONV_DEPENDS)
|
||||
URL:=http://smstools3.kekekasvi.com/
|
||||
endef
|
||||
|
||||
define Package/smstools3/description
|
||||
The SMS Server Tools 3 is a SMS Gateway software which can send and receive
|
||||
short messages through GSM modems and mobile phones.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -D NUMBER_OF_MODEMS=1
|
||||
TARGET_CFLAGS += $(if $(ICONV_FULL),-D USE_ICONV)
|
||||
TARGET_CFLAGS += -D DISABLE_INET_SOCKET
|
||||
TARGET_CFLAGS += -W -Wall
|
||||
TARGET_CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
TARGET_CFLAGS += -fcommon
|
||||
|
||||
MAKE_VARS += LFLAGS="$(TARGET_LDFLAGS) $(if $(ICONV_FULL),-liconv)"
|
||||
|
||||
define Package/smstools3-fix/configure
|
||||
endef
|
||||
|
||||
define Package/smstools3-fix/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) \
|
||||
$(PKG_BUILD_DIR)/src/smsd \
|
||||
$(PKG_BUILD_DIR)/scripts/sendsms \
|
||||
$(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/smstools3.init $(1)/etc/init.d/smstools3
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_CONF) ./files/smstools3.conf $(1)/etc/smsd.conf
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,smstools3-fix))
|
||||
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Description: Main configuration file for the smsd
|
||||
#
|
||||
|
||||
devices = GSM1
|
||||
incoming = /var/spool/sms/incoming
|
||||
outgoing = /var/spool/sms/outgoing
|
||||
checked = /var/spool/sms/checked
|
||||
failed = /var/spool/sms/failed
|
||||
sent = /var/spool/sms/sent
|
||||
receive_before_send = no
|
||||
autosplit = 3
|
||||
logfile = 1
|
||||
loglevel = 5
|
||||
|
||||
# Uncomment (and edit) this section to allow smsd to start:
|
||||
#
|
||||
#[GSM1]
|
||||
#init = AT+CPMS="ME","ME","ME"
|
||||
#device = /dev/ttyUSB0
|
||||
#incoming = yes
|
||||
#pin = 0000
|
||||
#baudrate = 115200
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2014-2018 OpenWrt.org
|
||||
|
||||
START=94
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
# If an unpriviledged user is selected, make sure that next two
|
||||
# files are writable by that user:
|
||||
PIDFILE="/var/run/smsd.pid"
|
||||
INFOFILE="/var/run/smsd.working"
|
||||
|
||||
DAEMON=/usr/bin/smsd
|
||||
|
||||
# Set/edit this before starting service !!!!!
|
||||
WRT_SPOOL=/var/spool
|
||||
|
||||
start_service() {
|
||||
echo "Creating minimum spool directories"
|
||||
mkdir -p $WRT_SPOOL
|
||||
mkdir -p $WRT_SPOOL/sms
|
||||
mkdir -p $WRT_SPOOL/sms/incoming
|
||||
mkdir -p $WRT_SPOOL/sms/outgoing
|
||||
mkdir -p $WRT_SPOOL/sms/checked
|
||||
mkdir -p $WRT_SPOOL/sms/failed
|
||||
mkdir -p $WRT_SPOOL/sms/sent
|
||||
|
||||
procd_open_instance
|
||||
|
||||
procd_set_param command $DAEMON -t -n MAINPROCESS -p$PIDFILE -i$INFOFILE
|
||||
procd_set_param respawn
|
||||
procd_set_param stdout 1
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/src/Makefile
|
||||
+++ b/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 ?= -D NUMBER_OF_MODEMS=64
|
||||
|
||||
# Uncomment for Solaris
|
||||
# CFLAGS += -D SOLARIS
|
||||
@@ -0,0 +1,8 @@
|
||||
--- a/scripts/sendsms
|
||||
+++ b/scripts/sendsms
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/ash
|
||||
# This script send a text sms at the command line by creating
|
||||
# a sms file in the outgoing queue.
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
commit 3790bd05ed86b1692719df22857ef76c1293b01c
|
||||
Author: Harald Geyer <harald@ccbib.org>
|
||||
Date: Sun Feb 18 19:24:48 2018 +0100
|
||||
|
||||
Make modem processes terminate when main process dies
|
||||
|
||||
--- a/src/smsd.c
|
||||
+++ b/src/smsd.c
|
||||
@@ -34,6 +34,7 @@ Either version 2 of the License, or (at
|
||||
#ifndef DISABLE_INOTIFY
|
||||
#include <sys/inotify.h>
|
||||
#endif
|
||||
+#include <sys/prctl.h>
|
||||
|
||||
#include "extras.h"
|
||||
#include "locking.h"
|
||||
@@ -8100,6 +8101,7 @@ int main(int argc,char** argv)
|
||||
|
||||
if (pid == 0)
|
||||
{
|
||||
+ prctl(PR_SET_PDEATHSIG, SIGTERM, 0, 0, 0);
|
||||
process_id = i;
|
||||
strcpy(process_title, DEVICE.name);
|
||||
apply_process_name(argc, argv, process_title);
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/src/smsd.c b/src/smsd.c
|
||||
index fdfa193..c9c8471 100755
|
||||
--- a/src/smsd.c
|
||||
+++ b/src/smsd.c
|
||||
@@ -3959,6 +3959,10 @@ int receivesms(int* quick, int only1st)
|
||||
foundsomething=1;
|
||||
*quick=1;
|
||||
|
||||
+ // 10/2023: allow lowcase letters from modem:
|
||||
+ for (i = 0; line2[i]; i++)
|
||||
+ line2[i] = toupper((int)line2[i]);
|
||||
+
|
||||
//Create a temp file for received message
|
||||
//3.1beta3: Moved to the received2file function, filename is now a return value:
|
||||
//sprintf(filename,"%s/%s.XXXXXX",d_incoming,DEVICE.name);
|
||||
Reference in new issue
Block a user