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/smstools-3.1.21-r2.ebuild
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/smstools-3.1.21-r2.ebuild')
-rw-r--r--app-mobilephone/smstools/smstools-3.1.21-r2.ebuild75
1 files changed, 75 insertions, 0 deletions
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
+}