mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-29 10:18:30 +00:00
o add more MASTER_SITES
o add PKG{,DE}INSTALL scripts to handle: - empty directories - configuration files o do not create unnecessary directories
This commit is contained in:
parent
5f1a017a4d
commit
d52bd53bb1
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=49898
@ -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"
|
||||
|
@ -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
|
||||
|
66
net/silc-client/pkg-install
Normal file
66
net/silc-client/pkg-install
Normal file
@ -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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user