summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2021-01-02 21:16:31 +0100
committerDavid Seifert <soap@gentoo.org>2021-01-02 21:16:31 +0100
commit7e800fb79ead62e7e3aeed1bb22ba64ab96b1ed4 (patch)
treefc48ba77b6b8c5356368bdc6bd78f0caf05b8711 /app-mobilephone/smstools
parentacct-user/smsd: Add user for smstools (diff)
downloadgentoo-7e800fb79ead62e7e3aeed1bb22ba64ab96b1ed4.tar.gz
gentoo-7e800fb79ead62e7e3aeed1bb22ba64ab96b1ed4.tar.bz2
gentoo-7e800fb79ead62e7e3aeed1bb22ba64ab96b1ed4.zip
app-mobilephone/smstools: Port to EAPI 7 and GLEP 81
Closes: https://bugs.gentoo.org/708512 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'app-mobilephone/smstools')
-rw-r--r--app-mobilephone/smstools/Manifest1
-rw-r--r--app-mobilephone/smstools/metadata.xml14
-rw-r--r--app-mobilephone/smstools/smstools-3.1.21-r2.ebuild75
3 files changed, 83 insertions, 7 deletions
diff --git a/app-mobilephone/smstools/Manifest b/app-mobilephone/smstools/Manifest
index 8e26b00a1408..0d55aa677e83 100644
--- a/app-mobilephone/smstools/Manifest
+++ b/app-mobilephone/smstools/Manifest
@@ -1 +1,2 @@
+DIST smstools-3.1.21-patches.tgz 6961 BLAKE2B ee70220d96645f1cdea403ebcc3a199e16aeea2c11d222d4013d6ae08be43daa089f1c6b770ad79edfe783f534913c0fad547181aeeb51796f41420a1e43d505 SHA512 9d6697f64a1af00664bec734e638dff810c984de959675ba856fe4f74290bb971425c909c2e245a62bb8d1991811c79dd5b10864a0f4cc14c5773bf5e01d07a7
DIST smstools3-3.1.21.tar.gz 356548 BLAKE2B 8bbb65761128a86200a6d47e90456fef076be10cd4081b4e3cdc9456c0176996ee6ee9afbe3d9f2a989d93db706bf5461ddf7f739bc8d70337a842b96eb27a5c SHA512 0587e5020a0318351ca99b68baa1c19411824279055857a5b5aa4e346cae373fe94a811eaca6767bcf991cf849eaaa66ec120f046420531a6088cdde9373db31
diff --git a/app-mobilephone/smstools/metadata.xml b/app-mobilephone/smstools/metadata.xml
index 4fedfbd15bb2..0d9769b13f3f 100644
--- a/app-mobilephone/smstools/metadata.xml
+++ b/app-mobilephone/smstools/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>chainsaw@gentoo.org</email>
- <name>Tony Vroon</name>
-</maintainer>
-<use>
- <flag name="stats">Enable statistic reporting</flag>
-</use>
+ <maintainer type="person">
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <use>
+ <flag name="stats">Enable statistic reporting</flag>
+ </use>
</pkgmetadata>
diff --git a/app-mobilephone/smstools/smstools-3.1.21-r2.ebuild b/app-mobilephone/smstools/smstools-3.1.21-r2.ebuild
new file mode 100644
index 000000000000..7bbd2e97cb6f
--- /dev/null
+++ b/app-mobilephone/smstools/smstools-3.1.21-r2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd tmpfiles toolchain-funcs
+
+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
+ https://dev.gentoo.org/~soap/distfiles/${P}-patches.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="stats"
+
+DEPEND="
+ acct-group/sms
+ acct-user/smsd"
+RDEPEND="${DEPEND}
+ sys-process/procps
+ stats? ( dev-libs/mm )"
+
+PATCHES=(
+ "${WORKDIR}"/${P}-gawk-location.patch
+ "${WORKDIR}"/${P}-fno-common.patch
+)
+
+S="${WORKDIR}"/${PN}3
+
+src_prepare() {
+ default
+ 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() {
+ emake -C src \
+ 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/{checked,incoming,outgoing}
+ fowners -R smsd:sms /var/spool/sms
+ fperms g+s /var/spool/sms/incoming
+
+ newinitd "${FILESDIR}"/smsd.initd4 smsd
+ insopts -o smsd -g sms -m0644
+ insinto /etc
+ newins examples/smsd.conf.easy smsd.conf
+ dodoc -r doc
+
+ systemd_dounit "${FILESDIR}"/smsd.service
+ newtmpfiles "${FILESDIR}"/smsd.tmpfiles smsd.conf
+}
+
+pkg_postinst() {
+ touch "${EROOT}"/var/log/smsd.log || die
+ chown --no-dereference -f smsd:sms "${EROOT}"/var/log/smsd.log || die
+}