aboutsummaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2002-01-05 23:43:13 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2002-01-05 23:43:13 +0000
commit2025ba84eedefaef90a7e7d9eaee3f6f03181f8f (patch)
tree701fd40b4de20d4b4b0bb2d2c9b977933243c1a2 /news
parent261b278d90f0f680d1cae2b44e765007a34d3ca0 (diff)
downloadports-2025ba84eedefaef90a7e7d9eaee3f6f03181f8f.tar.gz
ports-2025ba84eedefaef90a7e7d9eaee3f6f03181f8f.zip
Notes
Diffstat (limited to 'news')
-rw-r--r--news/cnews/Makefile2
-rw-r--r--news/fidogate/Makefile45
-rw-r--r--news/ifmail/Makefile21
-rw-r--r--news/ifmail/pkg-deinstall45
-rw-r--r--news/ifmail/pkg-install100
-rw-r--r--news/ifmail/pkg-plist6
-rw-r--r--news/suck/Makefile10
7 files changed, 44 insertions, 185 deletions
diff --git a/news/cnews/Makefile b/news/cnews/Makefile
index c3d711132816..d4371e826c49 100644
--- a/news/cnews/Makefile
+++ b/news/cnews/Makefile
@@ -124,7 +124,7 @@ do-install:
@${ECHO} "!!!!!!!!"
@${ECHO} ""
-test:
+test:
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} r)
diff --git a/news/fidogate/Makefile b/news/fidogate/Makefile
index d19efe128d70..a83713490f35 100644
--- a/news/fidogate/Makefile
+++ b/news/fidogate/Makefile
@@ -25,6 +25,10 @@ FORBIDDEN= indefinite hang
USE_GMAKE= yes
USE_PERL5= yes
+DOCLIST= fidogate.texi fidogate.txt gatebau94.txt kludge-rfc.doc \ msgid.doc qmail.txt texinfo.tex dirs.html index.html \
+ template.html fido howto misc rfc gatebau/msgid.sgml \
+ gatebau/msgid.tex gatebau/msgid.txt
+
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 300000
@@ -32,40 +36,25 @@ EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-perl
.endif
pre-configure:
- @${MV} ${WRKSRC}/config.make ${WRKSRC}/config.make.sed
- @${SED} -e 's/\$${PREFIX}/${PREFIX:S/\//\\\//g}/g' \
- < ${WRKSRC}/config.make.sed > ${WRKSRC}/config.make
+ @${PERL5} -pi -e "s=.{PREFIX}=${PREFIX}=g" ${WRKSRC}/config.make
+.if defined(FIDOGATE_RUNAS)
+ @${PERL5} -pi -e "s/OWNER.*= news/OWNER = ${FIDOGATE_RUNAS}/" \
+ ${WRKSRC}/config.make
+.endif
pre-install:
${MKDIR} ${PREFIX}/libexec/fidogate
- ${MKDIR} ${PREFIX}/share/doc/fidogate/html
- ${MKDIR} ${PREFIX}/share/doc/fidogate/info
- ${MKDIR} ${PREFIX}/share/doc/fidogate/fido
- ${MKDIR} ${PREFIX}/share/doc/fidogate/howto
- ${MKDIR} ${PREFIX}/share/doc/fidogate/misc
- ${MKDIR} ${PREFIX}/share/doc/fidogate/gatebau
-
-DOCLIST= \
- fidogate.texi fidogate.txt \
- gatebau94.txt kludge-rfc.doc msgid.doc \
- qmail.txt texinfo.tex \
- dirs.html index.html template.html \
- fido \
- howto \
- misc \
- rfc \
- gatebau/msgid.sgml \
- gatebau/msgid.tex \
- gatebau/msgid.txt
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}/html ${DOCSDIR}/info ${DOCSDIR}/fido \
+ ${DOCSDIR}/howto ${DOCSDIR}/misc ${DOCSDIR}/gatebau
+.endif
post-install:
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/doc/fidogate
- @cd ${WRKSRC}/doc; tar cf - ${DOCLIST} |\
- (cd ${PREFIX}/share/doc/fidogate; tar xf -)
- ${MKDIR} ${PREFIX}/share/examples/fidogate
- @cd ${WRKSRC}/examples; tar cf - . |\
- (cd ${PREFIX}/share/examples/fidogate; tar xf -)
+ ${MKDIR} ${DOCSDIR}
+ @${TAR} -C ${WRKSRC}/doc -cf - ${DOCLIST} | ${TAR} -C ${DOCSDIR} -xf -
+ ${MKDIR} ${EXAMPLESDIR}
+ @${TAR} -C ${WRKSRC}/examples -cf - . | ${TAR} -C ${EXAMPLESDIR} -xf -
.endif
.include <bsd.port.post.mk>
diff --git a/news/ifmail/Makefile b/news/ifmail/Makefile
index 73214c91f181..2ff93f1a4f03 100644
--- a/news/ifmail/Makefile
+++ b/news/ifmail/Makefile
@@ -17,8 +17,17 @@ MAINTAINER= dinoex@FreeBSD.org
MAN3= parsedate.3
MAN8= ifmail.8 iftoss.8
+.if defined(IFMAIL_RUNAS)
+pre-configure:
+ @${PERL5} -pi -e "s/OWNER = ifmail/OWNER = ${IFMAIL_RUNAS}/" \
+ ${WRKSRC}/CONFIG
+.endif
+
pre-install:
- @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+.if !defined(IFMAIL_RUNAS)
+ if ! pw usershow ifmail; then pw useradd ifmail -g uucp -u 70 \
+ -h - -d /nonexistent -s /nonexistent -c "Ifmail Server"; fi
+.endif
${MKDIR} ${PREFIX}/libexec/ifmail
post-install:
@@ -29,13 +38,13 @@ post-install:
${INSTALL_MAN} ${WRKSRC}/iflib/${i} ${PREFIX}/man/man3
.endfor
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/doc/ifmail
- ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/ifmail
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
.for i in ifcico ifgate iflib
- ${INSTALL_DATA} ${WRKSRC}/${i}/README ${PREFIX}/share/doc/ifmail/README.${i}
+ ${INSTALL_DATA} ${WRKSRC}/${i}/README ${DOCSDIR}/README.${i}
.endfor
+ ${MKDIR} ${EXAMPLESDIR}
+ @${TAR} -C ${WRKSRC}/misc -cf - . | ${TAR} -C ${EXAMPLESDIR} -xf -
.endif
- ${MKDIR} ${PREFIX}/share/examples/ifmail
- @cd ${WRKSRC}/misc; tar cf - . | (cd ${PREFIX}/share/examples/ifmail; tar xf -)
.include <bsd.port.mk>
diff --git a/news/ifmail/pkg-deinstall b/news/ifmail/pkg-deinstall
deleted file mode 100644
index 50d05233e469..000000000000
--- a/news/ifmail/pkg-deinstall
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-user=ifmail
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-if [ x$2 != xDEINSTALL ]; then
- exit
-fi
-
-if yesno "Do you want me to remove user \"${user}\"" y; then
- if [ `id -u` -ne 0 ]; then
- echo "You must be root to delete the user."
- exit 1
- fi
- pw userdel -n ${user}
- echo "Done."
-fi
diff --git a/news/ifmail/pkg-install b/news/ifmail/pkg-install
deleted file mode 100644
index 544ec0d2bdb4..000000000000
--- a/news/ifmail/pkg-install
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/bin/sh
-
-user=ifmail
-group=uucp
-uid=70
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-case $2 in
-
-PRE-INSTALL)
-
- if which -s pw; then
- :
- else
- cat <<EOF
-
-This system looks like a pre-2.2 version of FreeBSD. I see that
-it is missing the "pw" utility. I need this utility. Please get
-it and install it, and try again. You can get the sources from:
-
- ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar
-
-EOF
- exit 1
- fi
-
- if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
- else
- echo "You need a user \"${user}\"."
- if which -s pw && yesno "Would you like me to create it" y; then
- if [ `id -u` -ne 0 ]; then
- echo "You must be root to add the user."
- exit 1
- fi
- if pw user show ${uid} >/dev/null 2>&1; then
- echo "The ifmail user is normally UID ${uid}. However, you currently have"
- echo "a UID ${uid}."
- if yesno "Should I just pick a new UID" y; then
- while pw user show ${uid} >/dev/null 2>&1; do
- uid=`expr ${uid} + 1`
- done
- if [ $uid -gt 99 ]; then
- echo "I can't find a low UID to use. Please create an 'ifmail' user"
- echo "and try the installation again."
- exit 1
- fi
- else
- exit 1
- fi
- echo "Ok, I'll use UID ${uid}."
- fi
- pw useradd ${user} -g ${group} -u ${uid} -h - -d /nonexistent \
- -s /nonexistent -c "Ifmail user" || exit 1
- echo "Done."
- else
- echo "Please create it, and try again."
- exit 1
- fi
- fi
-
- ;;
-
-#
-# The package system untar's the file first, potentially before the
-# ifmail user is created. This means that the files in
-# ${PKG_PREFIX}/libexec/ifmail will be setuid root, not setuid ifmail.
-# We have to fix this up.
-POST-INSTALL)
- chown ifmail ${PKG_PREFIX}/libexec/ifmail/*
- ;;
-esac
diff --git a/news/ifmail/pkg-plist b/news/ifmail/pkg-plist
index 3a590bdefd0f..a2b449c7f209 100644
--- a/news/ifmail/pkg-plist
+++ b/news/ifmail/pkg-plist
@@ -1,3 +1,7 @@
+@exec if ! pw usershow ifmail 2>/dev/null; then pw useradd ifmail -g uucp -u 70 -h - -d /nonexistent -s /nonexistent -c "Ifmail Server"; fi
+@unexec if pw usershow ifmail | grep -q 70:70; then pw userdel ifmail; fi
+@owner ifmail
+@group uucp
libexec/ifmail/ifcico
libexec/ifmail/ifindex
libexec/ifmail/ifmail
@@ -8,6 +12,8 @@ libexec/ifmail/ifstat
libexec/ifmail/iftoss
libexec/ifmail/ifunpack
libexec/ifmail/nlpatch
+@owner
+@group
@dirrm libexec/ifmail
%%PORTDOCS%%share/doc/ifmail/README
%%PORTDOCS%%share/doc/ifmail/README.ifcico
diff --git a/news/suck/Makefile b/news/suck/Makefile
index 2cde8cc38b10..7d35b675844b 100644
--- a/news/suck/Makefile
+++ b/news/suck/Makefile
@@ -53,11 +53,11 @@ post-patch:
post-install:
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/examples/suck
- ${INSTALL_SCRIPT} ${WRKSRC}/sample/get.news.inn ${PREFIX}/share/examples/suck
- ${INSTALL_SCRIPT} ${WRKSRC}/sample/get.news.generic ${PREFIX}/share/examples/suck
- ${INSTALL_SCRIPT} ${WRKSRC}/sample/put.news ${PREFIX}/share/examples/suck
- ${INSTALL_DATA} ${WRKSRC}/sample/*.sample ${PREFIX}/share/examples/suck
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/sample/get.news.inn ${EXAMPLESDIR}/
+ ${INSTALL_SCRIPT} ${WRKSRC}/sample/get.news.generic ${EXAMPLESDIR}/
+ ${INSTALL_SCRIPT} ${WRKSRC}/sample/put.news ${EXAMPLESDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/sample/*.sample ${EXAMPLESDIR}/
.endif
.include <bsd.port.post.mk>