From nobody Wed Jul 27 20:31:01 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LtQQs5NTsz4XdkM; Wed, 27 Jul 2022 20:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LtQQs4Rbdz3W0r; Wed, 27 Jul 2022 20:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658953861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+fQEj2dDtloUpf0ML+KiHccKwUqkBVMvojhZ+waCdA=; b=JL6P+CB/MbIoILKUGjDE8w50g0iaTWFkff6fC4geUgFForUi3evV4g7qCOl1gDOe+islm/ ZkuA8hZ/bfb1uj+H5C82q7bwHQNFheol1WzyEqDFFPqkx90MCfe7R/wgANnek87VVkq/LL nUnwky0knXp70HQb3OJ4A2W7pl0hxTRlH5JmGMSzLiZ9FZMycbZ7tjjbB/vSzRsUfn5A7f 0ut3fjyklzI6i5bzB07X2XJOY9ySTnzaXOjL8XkWU0BLkBwA2ogkEkwMcJwwyhwgSDA45c lSH38AgUENLKdcRS7svXp4HoIjayZ1Shdkv0wqpZilOjHhsG5iKP59W8ozi91Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LtQQs3VQvzVL0; Wed, 27 Jul 2022 20:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26RKV10t063913; Wed, 27 Jul 2022 20:31:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26RKV1GF063912; Wed, 27 Jul 2022 20:31:01 GMT (envelope-from git) Date: Wed, 27 Jul 2022 20:31:01 GMT Message-Id: <202207272031.26RKV1GF063912@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Guido Falsi Subject: git: 3109e75af713 - main - comms/smstools3: Clean up and modernize port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: madpilot X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3109e75af713dfba3e429ee56d688e4a18141279 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658953861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+fQEj2dDtloUpf0ML+KiHccKwUqkBVMvojhZ+waCdA=; b=VJKqfeX4BcvWOYsIsXsGq4ut+z3izBwOfk4Fhi3OaQ+90RBaw3xnZx17Se7oJXtr7rljTR 164+HXUHADoS/0tQJp8IdzbOlZIw4jviRzZ/IFhJg5OnO93wva0FirFEsstjrvemHeaOZo pIR2rSv+oRpMz/7YRX5yi29HwtllAF7bMknSknT7HQTQv/MxWl4+puEOP+ShMlnm4pWbXV tlN3Nzk8n/vsy8prhKCtESyI0eyTP3hkgPph6e3VsDqM7H5y6uSnjXKBdgZUYDGWzm39Ef 3h9SMTQPeblJvXhYQfJZnIfGVupMCk6rJ6ktfKGavmRgA5anYpRMV5nQiBTQhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658953861; a=rsa-sha256; cv=none; b=xHRL4yrsm8Lt5MWsfmx3qRbXQFgeboas0ADnTkJe5YmT7B304VJX+SD/YPZeW+spLKVozz q+q5/wo/zgCT/A9vYu1WaHhKbBBhEF0fZb6cyzHH6BN7Gv6z58a1d+oe38RoVnZK91y+Mf cMkn8ct5bYqZ2D4zxAN9nRsfxuDgoZyzbRwA1sRcKujPYsL9fByNkPI3aBstfosXdy5DTv Rml/KRlQ9NfrgJvp9mH4JiBbOYstDH4g/SN6ixJ8ESntLNxwOYh+UrleKcB4vNLPpriybU cX+ULEd9RAYYHP+Xl/CfFNfHP2pJQmxG3Jf5FtDXE75bD4sOAD7J5CZ+US6TOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/ports/commit/?id=3109e75af713dfba3e429ee56d688e4a18141279 commit 3109e75af713dfba3e429ee56d688e4a18141279 Author: Guido Falsi AuthorDate: 2022-07-27 20:29:54 +0000 Commit: Guido Falsi CommitDate: 2022-07-27 20:30:53 +0000 comms/smstools3: Clean up and modernize port - Remove unneeded pkg-install/pkg-deinstall scripts, and properly use pkg-message to display uninstall message [1] - Reorder some statements to silence some portlint warnings - Properly use shebangfix on more files, replacing some REINPLACE_CMDs - Remove unneeded REINPLACE_CMDs - Use RLN in place of LN, to correctly create relative symlinks Reported by: bapt [1] --- comms/smstools3/Makefile | 30 +++++++++++++++++------------- comms/smstools3/files/pkg-deinstall.in | 14 -------------- comms/smstools3/files/pkg-install.in | 8 -------- comms/smstools3/files/pkg-message.in | 11 +++++++++++ 4 files changed, 28 insertions(+), 35 deletions(-) diff --git a/comms/smstools3/Makefile b/comms/smstools3/Makefile index aada16563a54..6461fbc67ef3 100644 --- a/comms/smstools3/Makefile +++ b/comms/smstools3/Makefile @@ -1,5 +1,6 @@ PORTNAME= smstools PORTVERSION= 3.1.21 +PORTREVISION= 1 CATEGORIES= comms MASTER_SITES= http://smstools3.kekekasvi.com/packages/ DISTNAME= smstools3-${PORTVERSION} @@ -12,16 +13,18 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libinotify.so:devel/libinotify +USES= gmake localbase:ldflags shebangfix CONFLICTS_INSTALL= gnokii sendsms # bin/sendsms - -OPTIONS_DEFINE= STATS UTF8 EXAMPLES DOCS -OPTIONS_DEFAULT= STATS UTF8 -STATS_DESC= Build status and statistics support - WRKSRC= ${WRKDIR}/smstools3 - -USES= gmake localbase:ldflags shebangfix -SHEBANG_FILES= scripts/hex2dec scripts/hex2bin +SHEBANG_FILES= scripts/eventhandler_report \ + scripts/hex2bin \ + scripts/hex2dec \ + scripts/load_balancing.sh \ + scripts/regular_run \ + scripts/sendsms \ + scripts/sms2html \ + scripts/sms2unicode \ + scripts/unicode2sms SHEBANG_LANG= awk awk_OLD_CMD= /bin/gawk awk_CMD= ${LOCALBASE}/bin/awk @@ -35,7 +38,7 @@ SUB_LIST+= SPOOLDIR="${SPOOLDIR}" LOGDIR="${LOGDIR}" PIDDIR="${PIDDIR}" \ SMSD_USER="${SMSD_USER}" SMSD_GROUP="${SMSD_GROUP}" PLIST_SUB+= SPOOLDIR="${SPOOLDIR}" LOGDIR="${LOGDIR}" PIDDIR="${PIDDIR}" \ SMSD_USER="${SMSD_USER}" SMSD_GROUP="${SMSD_GROUP}" -SUB_FILES= pkg-install pkg-deinstall +SUB_FILES= pkg-message CFLAGS+= -fcommon LDFLAGS+= -linotify @@ -43,6 +46,10 @@ LDFLAGS+= -linotify PORTDOCS= * PORTEXAMPLES= .procmailrc .qmailrc * +OPTIONS_DEFINE= STATS UTF8 EXAMPLES DOCS +OPTIONS_DEFAULT= STATS UTF8 + +STATS_DESC= Build status and statistics support STATS_LIB_DEPENDS= libmm.so:devel/mm STATS_CFLAGS_OFF= -DNOSTATS @@ -56,15 +63,12 @@ post-patch: @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ -e 's|%%STAGEDIR%%|${STAGEDIR}|g' \ ${WRKSRC}/Makefile ${WRKSRC}/install.sh ${WRKSRC}/src/smsd_cfg.h - @${REINPLACE_CMD} -e 's,^override,\toverride,g' ${WRKSRC}/src/Makefile @${REINPLACE_CMD} -e 's|/dev/ttyS0|${SMSTOOLS_DEFAULT_COMPORT}|g' \ -e 's|%%SMSD_USER%%|${SMSD_USER}|' \ -e 's|%%SMSD_GROUP%%|${SMSD_GROUP}|' \ ${WRKSRC}/examples/smsd.conf.easy \ ${WRKSRC}/examples/smsd.conf.full \ ${WRKSRC}/examples/smsd.conf.non-root - @${REINPLACE_CMD} 's|/bin/bash|/bin/sh|g' \ - ${WRKSRC}/scripts/* post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/smsd @@ -73,7 +77,7 @@ post-install: ${INSTALL_SCRIPT} $$file ${STAGEDIR}${DATADIR}/; \ done .for FILE in sendsms sms2html sms2unicode unicode2sms - ${LN} -sf ${DATADIR}/${FILE} ${STAGEDIR}${PREFIX}/bin/${FILE} + ${RLN} ${STAGEDIR}${DATADIR}/${FILE} ${STAGEDIR}${PREFIX}/bin/${FILE} .endfor ${INSTALL_DATA} ${WRKSRC}/examples/smsd.conf.easy ${STAGEDIR}${PREFIX}/etc/smsd.conf.sample ${MKDIR} ${STAGEDIR}${DOCSDIR}/slideshow diff --git a/comms/smstools3/files/pkg-deinstall.in b/comms/smstools3/files/pkg-deinstall.in deleted file mode 100644 index 726b8856a0e9..000000000000 --- a/comms/smstools3/files/pkg-deinstall.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -if [ "x$2" = "xPOST-DEINSTALL" ]; then - rmdir %%SPOOLDIR%%/incoming %%SPOOLDIR%%/outgoing \ - %%SPOOLDIR%%/checked %%SPOOLDIR%% %%LOGDIR%% %%PIDDIR%% \ - 2>/dev/null || true - echo - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - echo "If you are permanently removing smstools, you should also:" | /usr/bin/fmt - echo "'rm -rf %%SPOOLDIR%%'" - echo "'rm -rf %%LOGDIR%%'" - echo "'rm -rf %%PIDDIR%%'" - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" -fi diff --git a/comms/smstools3/files/pkg-install.in b/comms/smstools3/files/pkg-install.in deleted file mode 100644 index 19e362078a62..000000000000 --- a/comms/smstools3/files/pkg-install.in +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "x$2" = "xPOST-INSTALL" ]; then - mkdir -p %%SPOOLDIR%%/incoming %%SPOOLDIR%%/outgoing \ - %%SPOOLDIR%%/checked %%LOGDIR%% %%PIDDIR%% - chown -R %%SMSD_USER%%:%%SMSD_GROUP%% %%SPOOLDIR%% \ - %%LOGDIR%% %%PIDDIR%% -fi diff --git a/comms/smstools3/files/pkg-message.in b/comms/smstools3/files/pkg-message.in new file mode 100644 index 000000000000..24350daa10e8 --- /dev/null +++ b/comms/smstools3/files/pkg-message.in @@ -0,0 +1,11 @@ +[ +{ type: remove + message: <