summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2013-12-22 09:39:34 +0000
committerPacho Ramos <pacho@gentoo.org>2013-12-22 09:39:34 +0000
commite42f6c888db5364a630b2f251158b2ddffe5b778 (patch)
tree8976a2c16c2035eed2aba499ad88836ae2a9ae82 /app-mobilephone
parentAdd unit file (#493978) (diff)
downloadgentoo-2-e42f6c888db5364a630b2f251158b2ddffe5b778.tar.gz
gentoo-2-e42f6c888db5364a630b2f251158b2ddffe5b778.tar.bz2
gentoo-2-e42f6c888db5364a630b2f251158b2ddffe5b778.zip
Add unit file (#493908 by Marcin Kowalski)
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'app-mobilephone')
-rw-r--r--app-mobilephone/smstools/ChangeLog11
-rw-r--r--app-mobilephone/smstools/files/smsd.service11
-rw-r--r--app-mobilephone/smstools/files/smsd.tmpfiles1
-rw-r--r--app-mobilephone/smstools/smstools-3.1.15-r1.ebuild73
4 files changed, 93 insertions, 3 deletions
diff --git a/app-mobilephone/smstools/ChangeLog b/app-mobilephone/smstools/ChangeLog
index 9da1ca3bff93..1b71269153ec 100644
--- a/app-mobilephone/smstools/ChangeLog
+++ b/app-mobilephone/smstools/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-mobilephone/smstools
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/smstools/ChangeLog,v 1.19 2012/12/20 10:41:42 chainsaw Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/smstools/ChangeLog,v 1.20 2013/12/22 09:39:34 pacho Exp $
+
+*smstools-3.1.15-r1 (22 Dec 2013)
+
+ 22 Dec 2013; Pacho Ramos <pacho@gentoo.org> +files/smsd.service,
+ +files/smsd.tmpfiles, +smstools-3.1.15-r1.ebuild:
+ Add unit file (#493908 by Marcin Kowalski)
*smstools-3.1.15 (20 Dec 2012)
@@ -123,4 +129,3 @@
14 Jun 2006; Tony Vroon <chainsaw@gentoo.org> +files/smsd.initd,
+metadata.xml, +smstools-2.2.1.ebuild:
Initial commit. Ebuild by me.
-
diff --git a/app-mobilephone/smstools/files/smsd.service b/app-mobilephone/smstools/files/smsd.service
new file mode 100644
index 000000000000..1fb436681b4b
--- /dev/null
+++ b/app-mobilephone/smstools/files/smsd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=SMS Server Tools 3
+
+[Service]
+User=smsd
+PIDFile=/run/smsd/smsd.pid
+ExecStart=/usr/bin/smsd -n MAINPROCESS -l/var/log/smsd.log \
+ -p/run/smsd/smsd.pid -i/run/smsd/smsd.working
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-mobilephone/smstools/files/smsd.tmpfiles b/app-mobilephone/smstools/files/smsd.tmpfiles
new file mode 100644
index 000000000000..8978d18f54ad
--- /dev/null
+++ b/app-mobilephone/smstools/files/smsd.tmpfiles
@@ -0,0 +1 @@
+d /run/smsd 0755 smsd sms -
diff --git a/app-mobilephone/smstools/smstools-3.1.15-r1.ebuild b/app-mobilephone/smstools/smstools-3.1.15-r1.ebuild
new file mode 100644
index 000000000000..8dec52c0224d
--- /dev/null
+++ b/app-mobilephone/smstools/smstools-3.1.15-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/smstools/smstools-3.1.15-r1.ebuild,v 1.1 2013/12/22 09:39:34 pacho Exp $
+
+EAPI=4
+
+inherit systemd toolchain-funcs user
+
+DESCRIPTION="Send and receive short messages through GSM modems"
+HOMEPAGE="http://smstools3.kekekasvi.com/"
+SRC_URI="http://smstools3.kekekasvi.com/packages/smstools3-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE="stats"
+
+DEPEND=""
+RDEPEND="sys-process/procps
+ stats? ( >=dev-libs/mm-1.4.0 )"
+
+S="${WORKDIR}/${PN}3"
+
+pkg_setup() {
+ enewgroup sms
+ enewuser smsd -1 -1 /var/spool/sms sms
+}
+
+src_prepare() {
+ if use stats; then
+ sed -i -e "s:CFLAGS += -D NOSTATS:#CFLAGS += -D NOSTATS:" \
+ "${S}/src/Makefile" || die
+ fi
+ echo "CFLAGS += ${CFLAGS}" >> src/Makefile || die
+}
+
+src_compile() {
+ cd src || die
+ emake \
+ CC="$(tc-getCC)" \
+ LFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin src/smsd
+ cd scripts || die
+ dobin sendsms sms2html sms2unicode unicode2sms
+ dobin hex2bin hex2dec email2sms
+ dodoc mysmsd smsevent smsresend sms2xml sql_demo \
+ smstest.php checkhandler-utf-8 eventhandler-utf-8 \
+ forwardsms regular_run
+ cd .. || die
+
+ keepdir /var/spool/sms/incoming
+ keepdir /var/spool/sms/outgoing
+ keepdir /var/spool/sms/checked
+ fowners -R smsd:sms /var/spool/sms
+ fperms g+s /var/spool/sms/incoming
+
+ newinitd "${FILESDIR}"/smsd.initd3 smsd
+ insopts -o smsd -g sms -m0644
+ insinto /etc
+ newins examples/smsd.conf.easy smsd.conf
+ dohtml -r doc
+
+ systemd_dounit "${FILESDIR}"/smsd.service
+ systemd_newtmpfilesd "${FILESDIR}"/smsd.tmpfiles smsd.conf
+}
+
+pkg_postinst() {
+ touch "${ROOT}"/var/log/smsd.log || die
+ chown -f smsd:sms "${ROOT}"/var/log/smsd.log
+}