diff options
author | lioux <lioux@FreeBSD.org> | 2001-11-10 06:16:11 +0800 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2001-11-10 06:16:11 +0800 |
commit | 36b319d10a274dac5dac1d0dd8310550f35f8f31 (patch) | |
tree | 551dc51068152e0e0eb3c5b9af072672e7cca8e2 /net/silc-server | |
parent | bf9782267439497f646412cd6ce9a0aa9fc2b5d7 (diff) | |
download | freebsd-ports-gnome-36b319d10a274dac5dac1d0dd8310550f35f8f31.tar.gz freebsd-ports-gnome-36b319d10a274dac5dac1d0dd8310550f35f8f31.tar.zst freebsd-ports-gnome-36b319d10a274dac5dac1d0dd8310550f35f8f31.zip |
o add more MASTER_SITES
o add PKG{,DE}INSTALL scripts to handle:
- empty directories
- configuration files
o do not create unnecessary directories
o remove prefix in the daemon binary name (debolaz)
Submitted by: Anders Nor Berle <debolaz@debolaz.com> (some of it)
Diffstat (limited to 'net/silc-server')
-rw-r--r-- | net/silc-server/Makefile | 17 | ||||
-rw-r--r-- | net/silc-server/files/patch-Makefile.in | 27 | ||||
-rw-r--r-- | net/silc-server/files/patch-silcd:Makefile.in | 13 | ||||
-rw-r--r-- | net/silc-server/pkg-install | 96 | ||||
-rw-r--r-- | net/silc-server/pkg-plist | 6 |
5 files changed, 147 insertions, 12 deletions
diff --git a/net/silc-server/Makefile b/net/silc-server/Makefile index a2f1b486dd01..86d863fcec17 100644 --- a/net/silc-server/Makefile +++ b/net/silc-server/Makefile @@ -9,7 +9,17 @@ PORTNAME= silc PORTVERSION= 0.6.2 CATEGORIES= net security MASTER_SITES= http://www.silcnet.org/download/ \ - ftp://ftp.silcnet.org/pub/silc/ + ftp://ftp.silcnet.org/pub/silc/ \ + http://ftp.silcnet.org/ \ + http://munitions.vipul.net/software/mirrors/silc/ \ + ftp://ftp.wiretapped.net/pub/security/network-security/silc/ \ + http://www.au.silcnet.org/download/ \ + ftp://ftp.au.silcnet.org/pub/silcnet/ \ + http://www.planetmirror.com/pub/silcnet/ \ + http://the.wiretapped.net/security/network-security/silc/ \ + ftp://ftp.wiretapped.net/pub/security/network-security/silc/ \ + http://www.no.silcnet.org/download/ \ + ftp://ftp.no.silcnet.org/pub/silc/ PKGNAMESUFFIX= -server DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} @@ -26,6 +36,7 @@ CONFIGURE_ARGS= --with-silcd-config-file=${PREFIX}/etc/${PORTNAME}/silcd.conf \ --with-simdir=libexec/${PORTNAME}/modules INSTALLS_SHLIB= yes PLIST_SUB= INSTALL_DIR="${INSTALL_DIR}" +PKGDEINSTALL= ${PKGINSTALL} INSTALL_DIR?= ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 @@ -57,6 +68,10 @@ post-patch: @${PERL} -pi -e 's/-O2//' ${WRKSRC}/${CONFIGURE_SCRIPT} .endif +post-install: + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ + ${PKGINSTALL} ${PKGNAME} POST-INSTALL + .include <bsd.port.pre.mk> .if ${ARCH} != "i386" diff --git a/net/silc-server/files/patch-Makefile.in b/net/silc-server/files/patch-Makefile.in index 9a4ef20e994d..aacee5b5b5c8 100644 --- a/net/silc-server/files/patch-Makefile.in +++ b/net/silc-server/files/patch-Makefile.in @@ -1,13 +1,24 @@ ---- Makefile.in.orig Fri Nov 9 00:26:32 2001 -+++ Makefile.in Fri Nov 9 00:26:39 2001 -@@ -543,10 +543,6 @@ - $(etcdir)/silcd.conf; \ - chmod go= $(etcdir)/silcd.conf; \ - fi +--- Makefile.in.orig Wed Nov 7 17:16:23 2001 ++++ Makefile.in Fri Nov 9 15:26:33 2001 +@@ -538,18 +538,13 @@ + $(INSTALL_DATA) $(srcdir)/TODO $(docdir)/ + + etc-install: +- -@if test '!' -f $(etcdir)/silcd.conf ; then \ ++ -@if test '!' -f $(etcdir)/silcd.conf.sample ; then \ + $(INSTALL_DATA) $(srcdir)/doc/example_silcd.conf \ +- $(etcdir)/silcd.conf; \ +- chmod go= $(etcdir)/silcd.conf; \ +- fi - -@if test '!' -f $(etcdir)/silc.conf ; then \ - $(INSTALL_DATA) $(srcdir)/doc/example_silc.conf \ - $(etcdir)/silc.conf; \ -- fi ++ $(etcdir)/silcd.conf.sample; \ + fi @SILC_DIST_CLIENT_TRUE@install-data-hook: install-dirs sim-install doc-install etc-install - @SILC_DIST_CLIENT_FALSE@install-data-hook: install-dirs generate-server-key sim-install doc-install etc-install +-@SILC_DIST_CLIENT_FALSE@install-data-hook: install-dirs generate-server-key sim-install doc-install etc-install ++@SILC_DIST_CLIENT_FALSE@install-data-hook: install-dirs sim-install doc-install etc-install + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/net/silc-server/files/patch-silcd:Makefile.in b/net/silc-server/files/patch-silcd:Makefile.in new file mode 100644 index 000000000000..da6e3eca52f6 --- /dev/null +++ b/net/silc-server/files/patch-silcd:Makefile.in @@ -0,0 +1,13 @@ +--- silcd/Makefile.in.orig Fri Nov 9 13:26:07 2001 ++++ silcd/Makefile.in Fri Nov 9 13:28:59 2001 +@@ -240,8 +240,8 @@ + if test -f $$p \ + ; then \ + f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ +- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f"; \ +- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f; \ ++ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$p"; \ ++ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$p; \ + else :; fi; \ + done + diff --git a/net/silc-server/pkg-install b/net/silc-server/pkg-install new file mode 100644 index 000000000000..7ea02a81e09e --- /dev/null +++ b/net/silc-server/pkg-install @@ -0,0 +1,96 @@ +#!/bin/sh +# $FreeBSD$ + +# based on original from op port, written by Cyrille Lefevre +# <clefevre@citeweb.net> + +[ $# != 2 ] && exit 1 +PKGNAME=$1 +ACTION=$2 + + +CONF_DIR=${PKG_PREFIX}/etc/silc + +SILC_DAEMON=${PKG_PREFIX}/sbin/silcd +KEY_FILES="silcd.prv silcd.pub" + +CONF_FILE=silcd.conf +CONF_OWN=root +CONF_GRP=wheel +CONF_MODE=0600 + +SAMP_SUFX=.sample + +INSTALL=install +CMP=cmp +FMT=fmt +RM=rm +RMDIR=rmdir + +INSTALL_DIR="${INSTALL} -d -o root -g wheel -m 755" + +case "$ACTION" in + +POST-INSTALL) + if [ -f "${CONF_DIR}/${CONF_FILE}" ] + then + echo "$PKGNAME: Will not overwrite existing ${CONF_DIR}/${CONF_FILE} configuration file." + else + ${INSTALL} -c -o ${CONF_OWN} -g ${CONF_GRP} -m ${CONF_MODE} \ + ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \ + ${CONF_DIR}/${CONF_FILE} + fi + if [ -f ${CONF_DIR}/silcd.prv -o -f ${CONF_DIR}/silcd.pub ] + then + echo "$PKGNAME: Will not overwrite existing PUBLIC KEY PAIRS in ${CONF_DIR}." + echo "$PKGNAME: Remove them if you both want new keys and know what you are doing, deinstall this package and install again." | ${FMT} + echo "$PKGNAME: To remove the old keys:" + for key_file in ${KEY_FILES} + do + [ -f ${CONF_DIR}/${key_file} ] && echo "$PKGNAME: rm -f ${CONF_DIR}/${key_file}" + done + else + ${SILC_DAEMON} -C ${CONF_DIR} + fi + ${INSTALL_DIR} ${PKG_PREFIX}/libexec/silc/modules ${PKG_PREFIX}/silc/logs + ;; + +DEINSTALL) + if ${CMP} -s ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \ + ${CONF_DIR}/${CONF_FILE}; then + ${RM} -f ${CONF_DIR}/${CONF_FILE} + else + echo "$PKGNAME: Will not remove existing ${CONF_DIR}/${CONF_FILE} configuration file." + echo "$PKGNAME: Remove it manually if you know what you are doing:" + echo "$PKGNAME: rm -f ${CONF_DIR}/${CONF_FILE}" + fi + echo "$PKGNAME: Will not remove remaining PUBLIC KEY PAIRS." + echo "$PKGNAME: If you want to remove any remaining PUBLIC KEY PAIRS:" + for key_file in ${KEY_FILES} + do + [ -f ${CONF_DIR}/${key_file} ] && echo "$PKGNAME: rm -f ${CONF_DIR}/${key_file}" + done + echo "$PKGNAME: Also, do not forget to 'rmdir ${CONF_DIR} 2>/dev/null'" + + ${RMDIR} ${PKG_PREFIX}/libexec/silc/modules 2>/dev/null + if [ -d ${PKG_PREFIX}/libexec/silc ] + then + ${RMDIR} ${PKG_PREFIX}/libexec/silc 2>/dev/null || echo "$PKGNAME: Will not remove silc modules. If permanently removing the port, 'rm -Rf ${PKG_PREFIX}/libexec/silc'" + fi + + ${RMDIR} ${PKG_PREFIX}/silc/logs 2>/dev/null + if [ -d ${PKG_PREFIX}/silc ] + then + ${RMDIR} ${PKG_PREFIX}/silc 2>/dev/null || echo "$PKGNAME: Will not remove silc server logs. If permanently removing the port, 'rm -Rf ${PKG_PREFIX}/silc'" + fi + ;; + +PRE-INSTALL|POST-DEINSTALL) + ;; + +*) + exit 1 + ;; +esac + +exit diff --git a/net/silc-server/pkg-plist b/net/silc-server/pkg-plist index a1788bb458a8..ca5fc43749ef 100644 --- a/net/silc-server/pkg-plist +++ b/net/silc-server/pkg-plist @@ -1,3 +1,3 @@ -etc/silc/silcd.conf -sbin/i386--freebsd4.4-silcd -@dirrm etc/silc +etc/silc/silcd.conf.sample +sbin/silcd +@unexec rmdir %D/etc/silc 2>/dev/null || true |