svn commit: r385855 - in head/shells/shell-include: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Sat May 9 02:10:11 UTC 2015
Author: amdmi3
Date: Sat May 9 02:10:09 2015
New Revision: 385855
URL: https://svnweb.freebsd.org/changeset/ports/385855
Log:
- Fix stagedir referenced from installed files:
Error: 'bin/bash-include' is referring to /wrkdirs/usr/ports/shells/shell-include/work/stage
Error: 'bin/sh-include' is referring to /wrkdirs/usr/ports/shells/shell-include/work/stage
- Don't use random and don't use /tmp for temporary files. It's unsafe, and netstat spews warnings from the jail:
netstat: kvm not available: /dev/mem: No such file or directory
- Depend on perl as pod2man is used during build
- Fix path to pod2man
PR: 199645
Submitted by: amdmi3
Approved by: maintainer timeout
Added:
head/shells/shell-include/files/
head/shells/shell-include/files/patch-install (contents, props changed)
Modified:
head/shells/shell-include/Makefile
Modified: head/shells/shell-include/Makefile
==============================================================================
--- head/shells/shell-include/Makefile Sat May 9 02:06:43 2015 (r385854)
+++ head/shells/shell-include/Makefile Sat May 9 02:10:09 2015 (r385855)
@@ -3,6 +3,7 @@
PORTNAME= shell-include
PORTVERSION= 0.1.2
+PORTREVISION= 1
CATEGORIES= shells devel
MASTER_SITES= http://vvelox.net/src/shell-include/
@@ -11,12 +12,16 @@ COMMENT= Include system for shell script
USES= perl5
-WRKSRC= ${WRKDIR}/${DISTNAME}
-
-USES= tar:tgz
+USES= perl5 tar:tgz
+USE_PERL5= build
NO_BUILD= yes
+post-patch:
+ @${REINPLACE_CMD} -e 's|/usr/local/bin/pod2man|${LOCALBASE}/bin/pod2man|' \
+ ${WRKSRC}/install
+
do-install:
- cd ${WRKSRC}/ ; ${SH} ${WRKSRC}/install ${STAGEDIR}${PREFIX}
+ cd ${WRKSRC}/ ; ${SETENV} DESTDIR=${STAGEDIR} \
+ ${SH} ${WRKSRC}/install ${PREFIX}
.include <bsd.port.mk>
Added: head/shells/shell-include/files/patch-install
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/shells/shell-include/files/patch-install Sat May 9 02:10:09 2015 (r385855)
@@ -0,0 +1,105 @@
+--- install.orig 2009-11-08 21:53:11 UTC
++++ install
+@@ -36,12 +36,12 @@ manInstall(){
+ #$3 = VERSION
+
+ #makes the man dir if it does not exist
+- if /bin/[ ! -d "$1/man" ]; then
+- /bin/mkdir "$1/man"
+- /bin/chmod 755 "$1/man"
++ if /bin/[ ! -d "${DESTDIR}$1/man" ]; then
++ /bin/mkdir "${DESTDIR}$1/man"
++ /bin/chmod 755 "${DESTDIR}$1/man"
+ fi
+
+- manInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom`
++ manInstallTMPfile=_tmpfile
+ /usr/bin/touch $manInstallTMPfile
+ /bin/chmod go-rwx $manInstallTMPfile
+
+@@ -72,9 +72,9 @@ manInstall(){
+
+
+ #makes the man section dir if it does not exist
+- if /bin/[ ! -d $1/man/man$manInstallMANsection ]; then
+- /bin/mkdir "$1/man/man$manInstallMANsection"
+- /bin/chmod 755 "$1/man/man$manInstallMANsection"
++ if /bin/[ ! -d ${DESTDIR}$1/man/man$manInstallMANsection ]; then
++ /bin/mkdir "${DESTDIR}$1/man/man$manInstallMANsection"
++ /bin/chmod 755 "${DESTDIR}$1/man/man$manInstallMANsection"
+ fi
+
+ #echo $line
+@@ -82,7 +82,7 @@ manInstall(){
+ #echo $MANsection
+ #echo $MANcenter
+
+- manInstallMANfile=`echo $1/man/man$manInstallMANsection/$manInstallMANname.$manInstallMANsection.gz | sed 's/\/\//\//g'`
++ manInstallMANfile=`echo ${DESTDIR}$1/man/man$manInstallMANsection/$manInstallMANname.$manInstallMANsection.gz | sed 's/\/\//\//g'`
+
+ /usr/local/bin/pod2man --section="$manInstallMANsection" --release="$3" --name="$manInstallMANname" --center="$manInstallMANcenter" "$manInstallLine" | /usr/bin/gzip > "$manInstallMANfile"
+
+@@ -97,17 +97,17 @@ manInstall(){
+ binInstall(){
+ #$1 = prefix
+
+- if /bin/[ ! -d "$1/bin" ]; then
+- /bin/mkdir "$1/bin"
+- if /bin/[ ! -d $1/bin ]; then
+- echo "$1/bin does not a dir or does not exist and could not be created"
++ if /bin/[ ! -d "${DESTDIR}$1/bin" ]; then
++ /bin/mkdir "${DESTDIR}$1/bin"
++ if /bin/[ ! -d ${DESTDIR}$1/bin ]; then
++ echo "${DESTDIR}$1/bin does not a dir or does not exist and could not be created"
+ exit 1;
+ fi
+- /bin/chmod u+rwx "$1/bin"
++ /bin/chmod u+rwx "${DESTDIR}$1/bin"
+
+ fi
+
+- binInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom`
++ binInstallTMPfile=_tmpfile
+ /usr/bin/touch $binInstallTMPfile
+ /bin/chmod go-rwx $binInstallTMPfile
+
+@@ -119,9 +119,9 @@ binInstall(){
+ while /bin/[ $binInstallCL -le $binInstallNOL ]; do
+ binInstallLine=`getline $binInstallTMPfile $binInstallCL`
+
+- /bin/cat "./bin/$binInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "$1/bin/$binInstallLine"
++ /bin/cat "./bin/$binInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "${DESTDIR}$1/bin/$binInstallLine"
+
+- /bin/chmod 755 "$1/bin/$binInstallLine"
++ /bin/chmod 755 "${DESTDIR}$1/bin/$binInstallLine"
+
+ binInstallCL=`/bin/expr $binInstallCL + 1`
+ done
+@@ -132,7 +132,7 @@ binInstall(){
+ includeInstall(){
+ #$1 = prefix
+
+- includeInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom`
++ includeInstallTMPfile=_tmpfile
+ /usr/bin/touch $includeInstallTMPfile
+ /bin/chmod go-rwx $includeInstallTMPfile
+
+@@ -145,13 +145,13 @@ includeInstall(){
+ includeInstallLine=`getline $includeInstallTMPfile $includeInstallCL`
+
+ if /bin/[ -d $includeInstallLine ]; then
+- if /bin/[ ! -d "$1/$includeInstallLine" ]; then
+- mkdir "$1/$includeInstallLine"
+- chmod 755 "$1/$includeInstallLine"
++ if /bin/[ ! -d "${DESTDIR}$1/$includeInstallLine" ]; then
++ mkdir "${DESTDIR}$1/$includeInstallLine"
++ chmod 755 "${DESTDIR}$1/$includeInstallLine"
+ fi
+ else
+- cat "$includeInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "$1/$includeInstallLine"
+- /bin/chmod 644 "$1/$includeInstallLine"
++ cat "$includeInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "${DESTDIR}$1/$includeInstallLine"
++ /bin/chmod 644 "${DESTDIR}$1/$includeInstallLine"
+ fi
+
+ includeInstallCL=`/bin/expr $includeInstallCL + 1`
More information about the svn-ports-all
mailing list