aboutsummaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2020-09-14 08:22:22 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2020-09-14 08:22:22 +0000
commit360eff51783e188b3d7aba3c7a45d224c0cbd8fc (patch)
treef12e237266370d70d17c8aa6ab4d04913726a6ce /news
parentb7598ef9d2014a55729ba7e9e50b388672df170e (diff)
downloadports-360eff51783e188b3d7aba3c7a45d224c0cbd8fc.tar.gz
ports-360eff51783e188b3d7aba3c7a45d224c0cbd8fc.zip
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
Notes
Notes: svn path=/head/; revision=548596
Diffstat (limited to 'news')
-rw-r--r--news/nn/Makefile9
-rw-r--r--news/nn/files/nntp_domain.dist13
-rw-r--r--news/nn/files/nntp_server.dist8
-rw-r--r--news/nn/files/pkg-message.in13
-rw-r--r--news/nn/pkg-install65
-rw-r--r--news/nn/pkg-plist5
6 files changed, 44 insertions, 69 deletions
diff --git a/news/nn/Makefile b/news/nn/Makefile
index d928d16b2665..958902382b8c 100644
--- a/news/nn/Makefile
+++ b/news/nn/Makefile
@@ -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
@@ -25,4 +27,9 @@ 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>
diff --git a/news/nn/files/nntp_domain.dist b/news/nn/files/nntp_domain.dist
new file mode 100644
index 000000000000..c0f0fa0dbcd6
--- /dev/null
+++ b/news/nn/files/nntp_domain.dist
@@ -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.
diff --git a/news/nn/files/nntp_server.dist b/news/nn/files/nntp_server.dist
new file mode 100644
index 000000000000..d492cf3691e9
--- /dev/null
+++ b/news/nn/files/nntp_server.dist
@@ -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
diff --git a/news/nn/files/pkg-message.in b/news/nn/files/pkg-message.in
new file mode 100644
index 000000000000..14d6e8fadbf7
--- /dev/null
+++ b/news/nn/files/pkg-message.in
@@ -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
+}
+]
diff --git a/news/nn/pkg-install b/news/nn/pkg-install
deleted file mode 100644
index 3464fa390e52..000000000000
--- a/news/nn/pkg-install
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-
-if [ "x$2" != "xPOST-INSTALL" ]; then
- exit
-fi
-
-cat << xxENDxx
-
-*******************************************************************
-You have just installed the $1 package
-
-Please set your NNTP server address or hostname in the file:
-
-xxENDxx
-
-echo "${PKG_PREFIX}/etc/nntp_server"
-echo ""
-
-cat << xxENDxx
-If desired, please set your domain name for From: addresses when
-posting in the file (default is to use your hostname):
-
-xxENDxx
-
-echo "${PKG_PREFIX}/etc/nntp_domain"
-echo ""
-
-cat << xxENDxx
-*******************************************************************
-xxENDxx
-
-cat << xxENDxx > ${PKG_PREFIX}/etc/nntp_server.dist
-# 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
-xxENDxx
-
-if [ ! -e ${PKG_PREFIX}/etc/nntp_server ]; then
- cp ${PKG_PREFIX}/etc/nntp_server.dist ${PKG_PREFIX}/etc/nntp_server
-fi
-
-cat << xxENDxx > ${PKG_PREFIX}/etc/nntp_domain.dist
-# 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.
-xxENDxx
-
-if [ ! -e ${PKG_PREFIX}/etc/nntp_domain ]; then
- cp ${PKG_PREFIX}/etc/nntp_domain.dist ${PKG_PREFIX}/etc/nntp_domain
-fi
diff --git a/news/nn/pkg-plist b/news/nn/pkg-plist
index 694c3baad2a4..b44848caa910 100644
--- a/news/nn/pkg-plist
+++ b/news/nn/pkg-plist
@@ -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