diff options
author | lioux <lioux@FreeBSD.org> | 2001-11-09 22:12:14 +0000 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2001-11-09 22:12:14 +0000 |
commit | bf9782267439497f646412cd6ce9a0aa9fc2b5d7 (patch) | |
tree | 085dccafc05416aa46078db32870af5262527418 /net/silc-client | |
parent | a48c0dbb9fc692fc60f562626bdbe6c02d600f90 (diff) | |
download | FreeBSD-ports-bf9782267439497f646412cd6ce9a0aa9fc2b5d7.zip FreeBSD-ports-bf9782267439497f646412cd6ce9a0aa9fc2b5d7.tar.gz |
o add more MASTER_SITES
o add PKG{,DE}INSTALL scripts to handle:
- empty directories
- configuration files
o do not create unnecessary directories
Diffstat (limited to 'net/silc-client')
-rw-r--r-- | net/silc-client/Makefile | 17 | ||||
-rw-r--r-- | net/silc-client/files/patch-Makefile.in | 23 | ||||
-rw-r--r-- | net/silc-client/pkg-install | 66 | ||||
-rw-r--r-- | net/silc-client/pkg-plist | 10 |
4 files changed, 102 insertions, 14 deletions
diff --git a/net/silc-client/Makefile b/net/silc-client/Makefile index 3b408e7..37e798e 100644 --- a/net/silc-client/Makefile +++ b/net/silc-client/Makefile @@ -9,7 +9,17 @@ PORTNAME= silc PORTVERSION= 0.6.4 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= -client DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} @@ -23,6 +33,7 @@ CONFIGURE_ARGS= --with-docdir=share/doc/${PORTNAME} \ --with-helpdir=share/${PORTNAME}/help \ --with-simdir=libexec/${PORTNAME}/modules PLIST_SUB= INSTALL_DIR="${INSTALL_DIR}" +PKGDEINSTALL= ${PKGINSTALL} INSTALL_DIR?= ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 @@ -58,6 +69,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-client/files/patch-Makefile.in b/net/silc-client/files/patch-Makefile.in index 54d1c3e..8ec4bb8 100644 --- a/net/silc-client/files/patch-Makefile.in +++ b/net/silc-client/files/patch-Makefile.in @@ -1,6 +1,14 @@ ---- Makefile.in.orig Fri Nov 9 00:27:10 2001 -+++ Makefile.in Fri Nov 9 00:27:16 2001 -@@ -538,11 +538,6 @@ +--- Makefile.in.orig Fri Nov 2 22:58:36 2001 ++++ Makefile.in Fri Nov 9 18:15:27 2001 +@@ -515,7 +515,6 @@ + -mkdir -p $(modulesdir) + -mkdir -p $(helpdir) + -mkdir -p $(docdir) +- -mkdir -p $(logsdir) + + generate-server-key: + -@if test '!' -f $(etcdir)/silcd.pub ; then \ +@@ -538,14 +537,9 @@ $(INSTALL_DATA) $(srcdir)/TODO $(docdir)/ etc-install: @@ -9,6 +17,11 @@ - $(etcdir)/silcd.conf; \ - chmod go= $(etcdir)/silcd.conf; \ - fi - -@if test '!' -f $(etcdir)/silc.conf ; then \ +- -@if test '!' -f $(etcdir)/silc.conf ; then \ ++ -@if test '!' -f $(etcdir)/silc.conf.sample ; then \ $(INSTALL_DATA) $(srcdir)/doc/example_silc.conf \ - $(etcdir)/silc.conf; \ +- $(etcdir)/silc.conf; \ ++ $(etcdir)/silc.conf.sample; \ + fi + + @SILC_DIST_CLIENT_TRUE@install-data-hook: install-dirs sim-install doc-install etc-install diff --git a/net/silc-client/pkg-install b/net/silc-client/pkg-install new file mode 100644 index 0000000..7a7c377 --- /dev/null +++ b/net/silc-client/pkg-install @@ -0,0 +1,66 @@ +#!/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 + +CONF_FILE=silc.conf +CONF_OWN=root +CONF_GRP=wheel +CONF_MODE=444 + +SAMP_SUFX=.sample + +INSTALL=install +CMP=cmp +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 + ${INSTALL_DIR} ${PKG_PREFIX}/libexec/silc/modules + ;; + +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: However, if you are permanently removing this port, you should do a 'rm -f ${CONF_DIR}/${CONF_FILE}' to remove the configuration file left." + echo "$PKGNAME: Also, do not forget to 'rmdir ${CONF_DIR} 2>/dev/null'" + fi + + ${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 + ;; + +PRE-INSTALL|POST-DEINSTALL) + ;; + +*) + exit 1 + ;; +esac + +exit diff --git a/net/silc-client/pkg-plist b/net/silc-client/pkg-plist index 448155f..7fbdadf 100644 --- a/net/silc-client/pkg-plist +++ b/net/silc-client/pkg-plist @@ -1,7 +1,7 @@ bin/silc etc/silc/config etc/silc/default.theme -etc/silc/silc.conf +etc/silc/silc.conf.sample %%PORTDOCS%%share/doc/silc/CHANGES %%PORTDOCS%%share/doc/silc/COPYING %%PORTDOCS%%share/doc/silc/CREDITS @@ -92,13 +92,7 @@ share/silc/help/version share/silc/help/whois share/silc/help/whowas share/silc/help/window -@dirrm silc/logs -@dirrm silc @dirrm share/silc/help @dirrm share/silc %%PORTDOCS%%@dirrm share/doc/silc -@dirrm libexec/silc/modules -@dirrm libexec/silc -@dirrm etc/silc -@exec %%INSTALL_DIR%% %D/libexec/silc/modules -@exec %%INSTALL_DIR%% %D/silc/logs +@unexec rmdir %D/etc/silc 2>/dev/null || true |