mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-25 09:34:11 +00:00
Tidy things up a bit
Submitted by: Cyrille Lefevre <clefevre@citeweb.net> (maintainer)
This commit is contained in:
parent
7695192533
commit
98d4e4780e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=46596
@ -9,15 +9,13 @@ PORTNAME= op
|
||||
PORTVERSION= 1.11
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= ftp://ftp.cerias.purdue.edu/pub/tools/%SUBDIR%/ \
|
||||
ftp://ftp.cso.uiuc.edu/pub/security/coast/%SUBDIR%/ \
|
||||
ftp://ftp.rge.com/pub/security/cerias/tools/%SUBDIR%/ \
|
||||
ftp://ftp.hacktic.nl/pub/security/coast.cs.purdue.edu/%SUBDIR%/ \
|
||||
ftp://ftp.hacktic.nl/pub/security/coast.cs.purdue.edu/%SUBDIR%/ \
|
||||
ftp://ftp.nask.pl/pub/mirror/coast.cs.purdue.edu/%SUBDIR%/
|
||||
MASTER_SITE_SUBDIR= unix/sysutils/${PORTNAME}
|
||||
|
||||
MAINTAINER= clefevre@redirect.to
|
||||
MAINTAINER= clefevre@citeweb.net
|
||||
|
||||
#
|
||||
# Global variables
|
||||
#
|
||||
|
||||
@ -28,31 +26,23 @@ MAKE_ARGS= BASE="${PREFIX}" \
|
||||
BINOWN=${BINOWN} BINGRP=${BINGRP} BINMODE=${BINMODE} \
|
||||
MANOWN=${MANOWN} MANGRP=${MANGRP} MANMODE=${MANMODE}
|
||||
ALL_TARGET= ${PORTNAME}
|
||||
PLIST_SUB= DOCDIR="${DOC_SUBDIR}"
|
||||
|
||||
MAN8= op.8
|
||||
|
||||
PKGDEINSTALL= ${PKGINSTALL}
|
||||
|
||||
#
|
||||
# Local variables
|
||||
#
|
||||
|
||||
CO?= co
|
||||
|
||||
RCS_SUBDIR= RCS
|
||||
|
||||
CONF_DIR= ${PREFIX}/etc
|
||||
SAMP_DIR= ${CONF_DIR}
|
||||
DOC_SUBDIR= share/doc/${PKGBASE}
|
||||
DOC_DIR= ${PREFIX}/${DOC_SUBDIR}
|
||||
|
||||
CONF_FILE= op.access
|
||||
SAMP_FILE= ${CONF_FILE}
|
||||
SAMP_SUFX= .sample
|
||||
DOC_FILES= README op.paper
|
||||
|
||||
#
|
||||
# Post-extract
|
||||
#
|
||||
|
||||
@ -61,7 +51,6 @@ post-extract: checkout-files
|
||||
checkout-files:
|
||||
@cd ${WRKSRC} && ${CO} -q ${RCS_SUBDIR}/*
|
||||
|
||||
#
|
||||
# Post-patch
|
||||
#
|
||||
|
||||
@ -75,7 +64,6 @@ patch-conf-file:
|
||||
@${PERL} -pi.fbsd -e 's|^|#| if (!/^#|DEFAULT|MAGIC/);s|/usr/ucb:||;' \
|
||||
${WRKSRC}/${CONF_FILE}
|
||||
|
||||
#
|
||||
# Post-install
|
||||
#
|
||||
|
||||
@ -83,7 +71,7 @@ post-install: install-samp-files install-conf-file install-doc-files
|
||||
|
||||
install-samp-files:
|
||||
@${INSTALL_DATA} ${WRKSRC}/${CONF_FILE} \
|
||||
${SAMP_DIR}/${SAMP_FILE}${SAMP_SUFX}
|
||||
${CONF_DIR}/${CONF_FILE}${SAMP_SUFX}
|
||||
|
||||
install-conf-file:
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
|
||||
@ -91,28 +79,10 @@ install-conf-file:
|
||||
|
||||
install-doc-files:
|
||||
.if !defined(NOPORTSDOC)
|
||||
@${MKDIR} ${DOC_DIR}
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
.for file in ${DOC_FILES}
|
||||
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOC_DIR}/${file}
|
||||
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}/${file}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
# some sketchy hackery
|
||||
FETCH_CMD_INTERIOR!= ${ECHO} ${FETCH_CMD} | ${SED} -E -e "s!(.+/)?fetch(.+/|\s+.*)?!!"
|
||||
|
||||
# only enable the hack if FETCH_CMD is fetch
|
||||
.if ! ${FETCH_CMD_INTERIOR}
|
||||
# coast sites dislike $USER@localhost...
|
||||
FETCH_ENV= FTP_PASSWORD=${FTP_PASSWORD}
|
||||
|
||||
AWK?= awk
|
||||
IFCONFIG?= ifconfig
|
||||
|
||||
# well, this is a hack to make fetch happy on coast sites, ugh!
|
||||
HOSTIPADDR= ${IFCONFIG} | ${AWK} '/inet /{print $$2; exit}'
|
||||
FTP_PASSWORD?= ${USER}@`${HOSTIPADDR}`
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -6,34 +6,32 @@ PKGNAME=$1
|
||||
ACTION=$2
|
||||
|
||||
CONF_DIR=${PKG_PREFIX}/etc
|
||||
SAMP_DIR=${CONF_DIR}
|
||||
|
||||
CONF_FILE=op.access
|
||||
CONF_OWN=root
|
||||
CONF_GRP=wheel
|
||||
CONF_MODE=400
|
||||
|
||||
SAMP_FILE=${CONF_FILE}
|
||||
SAMP_SUFX=.sample
|
||||
|
||||
INSTALL=install
|
||||
CMP=cmp
|
||||
RM=rm
|
||||
|
||||
case $ACTION in
|
||||
case "$ACTION" in
|
||||
|
||||
POST-INSTALL)
|
||||
if [ -f ${CONF_DIR}/${CONF_FILE} ]; then
|
||||
echo "$PKGNAME: Will not overwrite existing ${CONF_DIR}/${CONF_FILE} file."
|
||||
else
|
||||
${INSTALL} -c -o ${CONF_OWN} -g ${CONF_GRP} -m ${CONF_MODE} \
|
||||
${SAMP_DIR}/${SAMP_FILE}${SAMP_SUFX} \
|
||||
${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \
|
||||
${CONF_DIR}/${CONF_FILE}
|
||||
fi
|
||||
;;
|
||||
|
||||
DEINSTALL)
|
||||
if ${CMP} -s ${SAMP_DIR}/${SAMP_FILE}${SAMP_SUFX} \
|
||||
if ${CMP} -s ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \
|
||||
${CONF_DIR}/${CONF_FILE}; then
|
||||
${RM} -f ${CONF_DIR}/${CONF_FILE}
|
||||
else
|
||||
@ -42,13 +40,11 @@ DEINSTALL)
|
||||
;;
|
||||
|
||||
PRE-INSTALL|POST-DEINSTALL)
|
||||
exit 0
|
||||
;;
|
||||
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
exit
|
||||
|
@ -1,6 +1,6 @@
|
||||
@comment $FreeBSD$
|
||||
bin/op
|
||||
etc/op.access.sample
|
||||
%%PORTDOCS%%%%DOCDIR%%/README
|
||||
%%PORTDOCS%%%%DOCDIR%%/op.paper
|
||||
%%PORTDOCS%%@dirrm %%DOCDIR%%
|
||||
%%PORTDOCS%%share/doc/op/README
|
||||
%%PORTDOCS%%share/doc/op/op.paper
|
||||
%%PORTDOCS%%@dirrm share/doc/op
|
||||
|
Loading…
Reference in New Issue
Block a user