Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Sep 2020 08:22:23 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r548596 - in head/news/nn: . files
Message-ID:  <202009140822.08E8MNC4058671@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Mon Sep 14 08:22:22 2020
New Revision: 548596
URL: https://svnweb.freebsd.org/changeset/ports/548596

Log:
  Fix build on modern toolchain and remove install script
  
  Replace the install script with static files properly packaged and usage of
  @sample
  
  Use pkg-message instead of script to inform the users

Added:
  head/news/nn/files/nntp_domain.dist   (contents, props changed)
  head/news/nn/files/nntp_server.dist   (contents, props changed)
  head/news/nn/files/pkg-message.in   (contents, props changed)
Deleted:
  head/news/nn/pkg-install
Modified:
  head/news/nn/Makefile
  head/news/nn/pkg-plist

Modified: head/news/nn/Makefile
==============================================================================
--- head/news/nn/Makefile	Mon Sep 14 08:16:38 2020	(r548595)
+++ head/news/nn/Makefile	Mon Sep 14 08:22:22 2020	(r548596)
@@ -12,8 +12,10 @@ COMMENT=	Menu based USENET newsreader
 
 BROKEN_aarch64=	Fails to link: missing sbrk
 
+SUB_FILES=	pkg-message
+
 USES=		tar:Z
-MAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS} -Iconf" LDFLAGS="${LDFLAGS} -s"
+MAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS} -Iconf -fcommon" LDFLAGS="${LDFLAGS} -s"
 
 pre-patch:
 	@${CP} ${WRKSRC}/config.h-dist ${WRKSRC}/config.h.unparsed
@@ -24,5 +26,10 @@ pre-build:
 
 post-build:
 	@${REINPLACE_CMD} 's#${PREFIX}#$${DESTDIR}&#' ${WRKSRC}/inst
+
+post-install:
+	${INSTALL_DATA} ${FILESDIR}/nntp_domain.dist \
+			${FILESDIR}/nntp_server.dist \
+			${STAGEDIR}${PREFIX}/etc
 
 .include <bsd.port.mk>

Added: head/news/nn/files/nntp_domain.dist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/news/nn/files/nntp_domain.dist	Mon Sep 14 08:22:22 2020	(r548596)
@@ -0,0 +1,13 @@
+# nntp_domain: Configuration file for NN newsreader
+#
+# Set the default domain name portion of user e-mail addresses as you
+# would like them to appear in the From: line of articles posted
+# with NN.
+#
+# For example, setting the name to foobar.com in this file will cause
+# the From: line for joeuser to look like something like this:
+#
+# From: joeuser@foobar.com (Joe User)
+#
+# If this file is left blank, NN will use the hostname of this
+# computer as the From: domain name.

Added: head/news/nn/files/nntp_server.dist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/news/nn/files/nntp_server.dist	Mon Sep 14 08:22:22 2020	(r548596)
@@ -0,0 +1,8 @@
+# nntp_server: Configuration file for NN newsreader
+#
+# Set your NNTP server address or hostname in this file.
+#
+# If this file is left blank, NN will use the server set in the
+# NNTP_SERVER environment variable.
+#
+# news.myisp.com

Added: head/news/nn/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/news/nn/files/pkg-message.in	Mon Sep 14 08:22:22 2020	(r548596)
@@ -0,0 +1,13 @@
+[
+{
+type: install
+message: <<EOM
+Please set your NNTP server address or hostname in the file:
+%%PREFIX%%/etc/nntp_server
+
+If desired, please set your domain name for From: addresses when
+posting in the file (default is to use your hostname):
+%%PREFIX%%/etc/nntp_domain
+EOM
+}
+]

Modified: head/news/nn/pkg-plist
==============================================================================
--- head/news/nn/pkg-plist	Mon Sep 14 08:16:38 2020	(r548595)
+++ head/news/nn/pkg-plist	Mon Sep 14 08:22:22 2020	(r548596)
@@ -10,9 +10,8 @@ bin/nngrep
 bin/nnpost
 bin/nnbatch
 bin/nnview
-@unexec if cmp -s %D/etc/nntp_domain %D/etc/nntp_domain.dist; then rm -f %D/etc/nntp_domain; fi
-@unexec if cmp -s %D/etc/nntp_server %D/etc/nntp_server.dist; then rm -f %D/etc/nntp_server; fi
-@unexec rm -f %D/etc/nntp_domain.dist %D/etc/nntp_server.dist
+@sample etc/nntp_domain.dist etc/nntp_domain
+@sample etc/nntp_server.dist etc/nntp_server
 lib/nn/aux
 lib/nn/upgrade_rc
 lib/nn/conf



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009140822.08E8MNC4058671>