app-mobilephone/smstools: Fix bug #603266 & #607470.
authorTony Vroon <chainsaw@gentoo.org>
Mon, 11 Sep 2017 13:22:13 +0000 (14:22 +0100)
committerTony Vroon <chainsaw@gentoo.org>
Mon, 11 Sep 2017 13:22:13 +0000 (14:22 +0100)
Package-Manager: Portage-2.3.6, Repoman-2.3.1

app-mobilephone/smstools/files/3.1.21-gawk-location.patch [new file with mode: 0644]
app-mobilephone/smstools/files/smsd.initd4 [new file with mode: 0644]
app-mobilephone/smstools/smstools-3.1.21-r1.ebuild [moved from app-mobilephone/smstools/smstools-3.1.21.ebuild with 94% similarity]

diff --git a/app-mobilephone/smstools/files/3.1.21-gawk-location.patch b/app-mobilephone/smstools/files/3.1.21-gawk-location.patch
new file mode 100644 (file)
index 0000000..e8070a3
--- /dev/null
@@ -0,0 +1,9 @@
+diff -uNr smstools3.ORIG/scripts/hex2bin smstools3/scripts/hex2bin
+--- smstools3.ORIG/scripts/hex2bin     2017-09-11 14:11:48.040928533 +0100
++++ smstools3/scripts/hex2bin  2017-09-11 14:12:00.925927820 +0100
+@@ -1,4 +1,4 @@
+-#!/bin/gawk -f
++#!/usr/bin/gawk -f
+ # This script reads a hex-dump and converts it to a binary file.
+ # The hex-dump must contain one or more hexadecimal numbers separated
diff --git a/app-mobilephone/smstools/files/smsd.initd4 b/app-mobilephone/smstools/files/smsd.initd4
new file mode 100644 (file)
index 0000000..ff40d47
--- /dev/null
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+       need localmount
+}
+
+start() {
+       checkpath -q -d -m 0770 -o smsd:sms /run/smsd || return 1
+       checkpath -q -f -o smsd:sms /var/log/smsd.log || return 1
+       ebegin "Starting smsd"
+       start-stop-daemon -b -u smsd:sms --start --exec /usr/bin/smsd -- \
+               -c /etc/smsd.conf -p /run/smsd/smsd.pid \
+               -i /run/smsd/smsd.working
+       eend ${?}
+}
+
+stop() {
+       ebegin "Stopping smsd"
+       start-stop-daemon --stop -n smsd
+       eend ${?}
+}
similarity index 94%
rename from app-mobilephone/smstools/smstools-3.1.21.ebuild
rename to app-mobilephone/smstools/smstools-3.1.21-r1.ebuild
index d041d82242ac6e6094e5a465a8ef26a1d9fb6a8f..96dfea8f1069d0fe165c5dec825d8eccb15423b8 100644 (file)
@@ -18,6 +18,7 @@ DEPEND=""
 RDEPEND="sys-process/procps
        stats? ( >=dev-libs/mm-1.4.0 )"
 
+PATCHES="${FILESDIR}/${PV}-gawk-location.patch"
 S="${WORKDIR}/${PN}3"
 
 pkg_setup() {
@@ -57,7 +58,7 @@ src_install() {
        fowners -R smsd:sms /var/spool/sms
        fperms g+s /var/spool/sms/incoming
 
-       newinitd "${FILESDIR}"/smsd.initd3 smsd
+       newinitd "${FILESDIR}"/smsd.initd4 smsd
        insopts -o smsd -g sms -m0644
        insinto /etc
        newins examples/smsd.conf.easy smsd.conf