From dbebd471caf7dbeb1294ad96efb73e6cd819d566 Mon Sep 17 00:00:00 2001 From: Wesley Shields Date: Mon, 5 Jul 2010 23:51:16 +0000 Subject: Make modification of /etc/shells optional (default to on). No need to bump PORTREVISION for this as there is no functional change. PR: ports/146605 Submitted by: Alex Kozlov Feature safe: yes --- devel/git/Makefile | 14 +++++++++++--- devel/git/pkg-plist | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'devel') diff --git a/devel/git/Makefile b/devel/git/Makefile index 1c81df4998c0..acb9c5054518 100644 --- a/devel/git/Makefile +++ b/devel/git/Makefile @@ -180,8 +180,6 @@ USE_OPENSSL= yes USE_RC_SUBR= git_daemon WANT_PERL= yes -SHELLS= /etc/shells - OPTIONS= GUI "Enable building of GUI tools" off \ SVN "Enable required dependencies for SVN tools" off \ GITWEB "Install gitweb" off \ @@ -191,7 +189,8 @@ OPTIONS= GUI "Enable building of GUI tools" off \ HTMLDOCS "Install additional documentation" off \ PERL "Build perl based git tools" on \ ICONV "Support for multiple character encodings" on \ - CURL "Support HTTP push and pull" on + CURL "Support HTTP push and pull" on \ + ETCSHELLS "Modify /etc/shells" on .include @@ -307,6 +306,13 @@ RMMAN1+= git-cvsimport.1 git-cvsexportcommit.1 git-cvsserver.1 RMMAN7+= gitcvs-migration.7 .endif +.ifdef (WITH_ETCSHELLS) +SHELLS= /etc/shells +PLIST_SUB+= ETCSHELLS="" +.else +PLIST_SUB+= ETCSHELLS="@comment " +.endif + .if defined(MAINTAINER_MODE) DISTFILES+= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}.sign \ ${PORTNAME}-manpages-${PORTVERSION}${EXTRACT_SUFX}.sign @@ -396,11 +402,13 @@ post-install: ${INSTALL_SCRIPT} ${WRKSRC}/contrib/p4import/git-p4import ${PREFIX}/bin/ ${INSTALL_SCRIPT} ${WRKSRC}/contrib/fast-import/git-p4 ${PREFIX}/bin/ .endif +.ifdef (WITH_ETCSHELLS) @${ECHO_MSG} "===> Updating ${SHELLS}" @${CP} ${SHELLS} ${SHELLS}.bak @(${GREP} -v ${PREFIX}/libexec/git-core/git-shell ${SHELLS}.bak; \ ${ECHO_CMD} ${PREFIX}/libexec/git-core/git-shell) > ${SHELLS} @${RM} ${SHELLS}.bak +.endif .ifdef (WITH_GITWEB) || defined (WITH_CONTRIB) @${CAT} ${PKGMESSAGE} .endif diff --git a/devel/git/pkg-plist b/devel/git/pkg-plist index a0beded58198..7a072982cf91 100644 --- a/devel/git/pkg-plist +++ b/devel/git/pkg-plist @@ -140,8 +140,8 @@ libexec/git-core/git-send-pack libexec/git-core/git-sh-setup libexec/git-core/git-shell libexec/git-core/git-stage -@exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak -@unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak +%%ETCSHELLS%%@exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak +%%ETCSHELLS%%@unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak libexec/git-core/git-shortlog libexec/git-core/git-show libexec/git-core/git-show-branch -- cgit v1.2.3