diff options
Diffstat (limited to 'community/smstools')
-rw-r--r-- | community/smstools/APKBUILD | 89 | ||||
-rw-r--r-- | community/smstools/makefile.patch | 42 | ||||
-rw-r--r-- | community/smstools/smstools.conf | 8 | ||||
-rw-r--r-- | community/smstools/smstools.initd | 30 | ||||
-rw-r--r-- | community/smstools/smstools.logrotate | 6 | ||||
-rwxr-xr-x | community/smstools/smstools.pre-install | 5 |
6 files changed, 180 insertions, 0 deletions
diff --git a/community/smstools/APKBUILD b/community/smstools/APKBUILD new file mode 100644 index 0000000000..b493932d36 --- /dev/null +++ b/community/smstools/APKBUILD @@ -0,0 +1,89 @@ +# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> +pkgname=smstools +pkgver=3.1.15 +pkgrel=8 +_realname="${pkgname}${pkgver%\.[0-9]*\.[0-9]*}" +pkgdesc="SMS Gateway software which can send and receive short messages through GSM modems and mobile phones" +url="http://smstools3.kekekasvi.com/" +arch="all" +license="GPL" +depends= +depends_dev= +makedepends="$depends_dev" +install=$pkgname.pre-install +subpackages= +pkgusers="smsd" +pkggroups="smsd" +source="http://smstools3.kekekasvi.com/packages/${_realname}-$pkgver.tar.gz + makefile.patch + $pkgname.initd + $pkgname.conf + $pkgname.logrotate" + +_builddir="$srcdir"/$_realname + +prepare() { + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + make || return 1 +} + +package() { + cd "$_builddir" + mkdir -p $pkgdir/usr/bin/ $pkgdir/usr/sbin/ || return 1 + install -m0755 $_builddir/src/smsd $pkgdir/usr/sbin/smsd || return 1 + install -m0755 $_builddir/scripts/sendsms $pkgdir/usr/bin/sendsms || return 1 + install -m0755 $_builddir/scripts/sms2html $pkgdir/usr/bin/sms2html || return 1 + install -m0755 $_builddir/scripts/sms2unicode $pkgdir/usr/bin/sms2unicode || return 1 + install -m0755 $_builddir/scripts/unicode2sms $pkgdir/usr/bin/unicode2sms || return 1 + + mkdir -p $pkgdir/etc/ || return 1 + install -m0644 $srcdir/smstools.conf $pkgdir/etc/smsd.conf || return 1 + + mkdir -p $pkgdir/etc/init.d/ || return 1 + install -m0755 $srcdir/smstools.initd $pkgdir/etc/init.d/smsd || return 1 + + #mkdir -p $pkgdir/etc/conf.d/ || return 1 + #install -m0644 $srcdir/smsd.confd $pkgdir/etc/conf.d/smsd || return 1 + + mkdir -p $pkgdir/etc/logrotate.d/ || return 1 + install -m0644 $srcdir/smstools.logrotate $pkgdir/etc/logrotate.d/smsd || return 1 + + #mkdir -p $pkgdir/usr/lib/tmpfiles.d/ || return 1 + #install -m0644 $srcdir/smsd.tmpfiles $pkgdir/usr/lib/tmpfiles.d/smsd.conf || return 1 + + mkdir -p $pkgdir/var/spool/sms/incoming || return 1 + mkdir -p $pkgdir/var/spool/sms/outgoing || return 1 + mkdir -p $pkgdir/var/spool/sms/checked || return 1 + chmod 0750 $pkgdir/var/spool/sms || return 1 + chmod 0770 $pkgdir/var/spool/sms/* || return 1 + chown -R smsd:smsd $pkgdir/var/spool/sms || return 1 + + mkdir -p $pkgdir/var/log/smsd || return 1 + chmod 0770 $pkgdir/var/log/smsd || return 1 + chown -R smsd:smsd $pkgdir/var/log/smsd || return 1 +} + +md5sums="0241ef60e646fac1a06254a848e61ed7 smstools3-3.1.15.tar.gz +f4ab5a570e8006d85de48b7080091ea6 makefile.patch +643197999fd06c0b481a3b55fed750e6 smstools.initd +6582c2d7961b5fd888f018b7287e401b smstools.conf +b6f3db0e9fbd38058c2effc43c54abb9 smstools.logrotate" +sha256sums="ed00ffaeaa312a5b4f969f4e97a64603a866bbe16e393ea02f5bf05234814d59 smstools3-3.1.15.tar.gz +aa37e42c94dedbea41060881e0133500c965dafb6911b26e5ba659ea7de9490f makefile.patch +f59346f202f8dfecf527fd35e24c140002ca00fd6245c4894e3e068c1a02d099 smstools.initd +fbf2f111d9ab8b3f0ede02fc426c0056a5ac6554972b948e011bb1f08fedd299 smstools.conf +f1c046c4b35c35777453cbaca32a982ed8511bf7d50a5190b9f57109e94c26e4 smstools.logrotate" +sha512sums="6a4cc852327fac27b00fc58def4bbc8caa395552586fe1b84f0f4a9f7f6b00008943b85c86de0821036629c58cf04840a189d711b4ac96f7ddaafd6b340b11fa smstools3-3.1.15.tar.gz +fee73681f570052855e868aebe264c9d068596690667156f2068be99c69c2cf1edf670e9a5c2520d3e3e2b6d1efccb77289215642fd99e2357b4a1682b14bc47 makefile.patch +4e101ba553bdf4898b17e82a35a546b1ed64c215850b5c78da9ae68009fad84a3c53dd7f5825b05fe40e93c3ab3ed12a9baf47da91025f1e383a33431ee7c14e smstools.initd +cf2a6d605f49df10d172bc412983312d37b315e42bdb82b2ce27eda4aaaec8526a6548db293457f48aa70b8d911a4169c77682f68850bef4c084b27ca478db9d smstools.conf +668eed2143c1f08fe1deb27a20496317c77160f3278d68fbc54ac8008c5d266c0a2dc39551fd1ced92706bfffc0bc5ee7581e452670e3bff92837e598b98b10e smstools.logrotate" diff --git a/community/smstools/makefile.patch b/community/smstools/makefile.patch new file mode 100644 index 0000000000..459e5d64a8 --- /dev/null +++ b/community/smstools/makefile.patch @@ -0,0 +1,42 @@ +--- ./Makefile.orig ++++ ./Makefile +@@ -7,7 +7,7 @@ + VERSION=$(shell grep package_version src/version.h | cut -f2) + + compile: +- cd src && $(MAKE) -$(MAKEFLAGS) ++ cd src && $(MAKE) + + install: compile + ./install.sh $(BINDIR) +@@ -16,7 +16,7 @@ + ./uninstall.sh $(BINDIR) + + clean: +- cd src && $(MAKE) -$(MAKEFLAGS) clean ++ cd src && $(MAKE) clean + + package: compile clean + ./package.sh +--- ./src/Makefile.orig ++++ ./src/Makefile +@@ -37,15 +37,15 @@ + # Use the following only on GNU/Linux and only if you need ps listing like "smsd: MAINPROCESS" and "smsd: GSM1" + # CFLAGS += -D USE_LINUX_PS_TRICK + +-all: smsd +- +-smsd: smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.o stats.o blacklist.o whitelist.o modeminit.o pdu.o +- + ifneq (,$(findstring SOLARIS,$(CFLAGS))) + ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS))) + override LFLAGS += -lsocket -lnsl + endif + endif ++ ++all: smsd ++ ++smsd: smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.o stats.o blacklist.o whitelist.o modeminit.o pdu.o + + ifneq (,$(findstring NOSTATS,$(CFLAGS))) + $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) diff --git a/community/smstools/smstools.conf b/community/smstools/smstools.conf new file mode 100644 index 0000000000..7fc1ecc439 --- /dev/null +++ b/community/smstools/smstools.conf @@ -0,0 +1,8 @@ +devices = GSM1 +logfile = /var/log/smsd/smsd.log +loglevel = 7 + +[GSM1] +device = /dev/ttyS0 +incoming = yes +#pin = 1111 diff --git a/community/smstools/smstools.initd b/community/smstools/smstools.initd new file mode 100644 index 0000000000..78383bc285 --- /dev/null +++ b/community/smstools/smstools.initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/smstools/files/smsd.initd3,v 1.1 2012/12/20 10:41:42 chainsaw Exp $ + +depend() { + need localmount +} + +start() { + if ! [ -d /var/run/smsd ]; then + ebegin "Creating /var/run/smsd for ${SVCNAME}" + mkdir /var/run/smsd \ + && chown smsd:smsd /var/run/smsd \ + && chmod 770 /var/run/smsd + eend $? + fi + + ebegin "Starting smsd" + start-stop-daemon -b -u smsd:smsd --start --exec /usr/sbin/smsd -- \ + -c /etc/smsd.conf -p /var/run/smsd/smsd.pid \ + -i /var/run/smsd/smsd.working + eend ${?} +} + +stop() { + ebegin "Stopping smsd" + start-stop-daemon --stop -n smsd + eend ${?} +} diff --git a/community/smstools/smstools.logrotate b/community/smstools/smstools.logrotate new file mode 100644 index 0000000000..3aeac7d5cf --- /dev/null +++ b/community/smstools/smstools.logrotate @@ -0,0 +1,6 @@ +/var/log/smsd/smsd.log { + notifempty + missingok + sharedscripts + copytruncate +} diff --git a/community/smstools/smstools.pre-install b/community/smstools/smstools.pre-install new file mode 100755 index 0000000000..dc250442df --- /dev/null +++ b/community/smstools/smstools.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh +addgroup -S smsd &>/dev/null +adduser -h /var/spool/sms -s /sbin/nologin -G smsd -S -D smsd &>/dev/null +adduser -G uucp smsd &>/dev/null +exit 0 |