mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
Respect PREFIX
Add SHA256 PR: 89938 Submitted by: Loren M. Lang <lorenl@alzatex.com> (maintainer)
This commit is contained in:
parent
44cb6996ae
commit
da691b0818
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=150397
@ -24,9 +24,30 @@ MAN8= dirvish.8 dirvish-expire.8 dirvish-locate.8 dirvish-runall.8
|
||||
NO_BUILD= yes
|
||||
USE_PERL5_RUN= yes
|
||||
|
||||
MAN5= dirvish.conf.5
|
||||
MAN8= dirvish.8 dirvish-expire.8 dirvish-locate.8 dirvish-runall.8
|
||||
|
||||
EXECUTABLES= dirvish dirvish-expire dirvish-locate dirvish-runall
|
||||
|
||||
do-patch:
|
||||
@${SED} -e 's:%%CONFDIR%%:${PREFIX}/etc/dirvish:' -e 's:%%PERL%%:${PERL5}:' \
|
||||
${FILESDIR}/header.pl > ${WRKDIR}/header.pl
|
||||
.for _E in ${EXECUTABLES}
|
||||
@(cd ${WRKSRC} && ${CAT} ${WRKDIR}/header.pl ${_E}.pl loadconfig.pl \
|
||||
> ${_E} && ${CHMOD} 755 ${_E})
|
||||
.endfor
|
||||
|
||||
do-install:
|
||||
@(cd ${INSTALL_WRKSRC} && ${SH} install.sh < /dev/null)
|
||||
${MKDIR} ${PREFIX}/etc/dirvish
|
||||
.for _E in ${EXECUTABLES}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/${_E} ${PREFIX}/sbin
|
||||
.endfor
|
||||
.for _M in ${MAN5}
|
||||
${INSTALL_MAN} ${WRKSRC}/${_M} ${PREFIX}/man/man5
|
||||
.endfor
|
||||
.for _M in ${MAN8}
|
||||
${INSTALL_MAN} ${WRKSRC}/${_M} ${PREFIX}/man/man8
|
||||
.endfor
|
||||
${INSTALL_DATA} ${FILESDIR}/master.conf.dist ${PREFIX}/etc/dirvish
|
||||
${INSTALL_DATA} ${FILESDIR}/default.conf.dist ${PREFIX}/etc/dirvish
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
MD5 (dirvish-1.2.1.tgz) = 51dd3f38f0bddb45b67d69b29af333c0
|
||||
SHA256 (dirvish-1.2.1.tgz) = d6068b0644f9302fb1ec676928f60145877ac316b5aa29d5a5a0204c59935527
|
||||
SIZE (dirvish-1.2.1.tgz) = 49132
|
||||
|
4
sysutils/dirvish/files/header.pl
Normal file
4
sysutils/dirvish/files/header.pl
Normal file
@ -0,0 +1,4 @@
|
||||
#!%%PERL%%
|
||||
|
||||
$CONFDIR = "%%CONFDIR%%";
|
||||
|
@ -1,68 +0,0 @@
|
||||
--- install.sh.orig Fri Feb 18 16:56:13 2005
|
||||
+++ install.sh Thu Jun 16 14:17:32 2005
|
||||
@@ -9,6 +9,8 @@ case `echo "testing\c"; echo 1,2,3`,`ech
|
||||
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
|
||||
esac
|
||||
|
||||
+ECHO_N=
|
||||
+
|
||||
EXECUTABLES="dirvish dirvish-runall dirvish-expire dirvish-locate"
|
||||
MANPAGES="dirvish.8 dirvish-runall.8 dirvish-expire.8 dirvish-locate.8"
|
||||
MANPAGES="$MANPAGES dirvish.conf.5"
|
||||
@@ -29,6 +31,7 @@ do
|
||||
|
||||
until [ -n "$PREFIX_OK" ]
|
||||
do
|
||||
+ PREFIX="/usr/local"
|
||||
EXECDIR="/usr/sbin"
|
||||
CONFDIR="/etc/dirvish"
|
||||
MANDIR="/usr/share/man"
|
||||
@@ -61,9 +64,9 @@ do
|
||||
|
||||
if [ -d "$PREFIX/sbin" ]
|
||||
then
|
||||
- BINDIR=$PREFIX/sbin
|
||||
+ BINDIR="$PREFIX/sbin"
|
||||
else
|
||||
- BINDIR=$PREFIX/bin
|
||||
+ BINDIR="$PREFIX/bin"
|
||||
fi
|
||||
|
||||
if [ -d "$PREFIX/share/man" ]
|
||||
@@ -74,13 +77,16 @@ do
|
||||
MANDIR=$PREFIX/usr/share/man
|
||||
eli [ -d "$PREFIX/usr/man" ]
|
||||
then
|
||||
- MANDIR="$PREFIX/usr/man" ]
|
||||
+ MANDIR="$PREFIX/usr/man"
|
||||
else
|
||||
- MANDIR=$PREFIX/man
|
||||
+ MANDIR="$PREFIX/man"
|
||||
fi
|
||||
if [ `expr "$PREFIX" : '.*dirvish.*'` -gt 0 ]
|
||||
then
|
||||
CONFDIR="$PREFIX/etc"
|
||||
+ elif [ -d "$PREFIX/etc" ]
|
||||
+ then
|
||||
+ CONFDIR="$PREFIX/etc/dirvish"
|
||||
else
|
||||
CONFDIR="/etc/dirvish"
|
||||
fi
|
||||
@@ -124,7 +130,7 @@ EOSTAT
|
||||
if [ `expr "$ans" : '[qQ]'` -ne 0 ]
|
||||
then
|
||||
exit
|
||||
- elif [ `expr "$ans" : '[yY]'` -ne 0 ]
|
||||
+ elif [ `expr "$ans" : '[nN]'` -eq 0 ]
|
||||
then
|
||||
break
|
||||
fi
|
||||
@@ -150,7 +156,7 @@ echo
|
||||
|
||||
echo $ECHO_N "Install executables and manpages? (no/yes) $ECHO_C"
|
||||
read ans
|
||||
-if [ `expr "$ans" : '[yY]'` -ne 0 ]
|
||||
+if [ `expr "$ans" : '[nN]'` -eq 0 ]
|
||||
then
|
||||
echo
|
||||
if [ -n "$CREATE_PREFIX" ]
|
Loading…
Reference in New Issue
Block a user