1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

Fix the pkg-install script to create the haldaemon user/group even when

PACKAGE_BUILDING is defined.  This is consistent with how other ports do
things, and it fixes hal's package installation through sysinstall.
This commit is contained in:
Joe Marcus Clarke 2008-04-21 06:38:07 +00:00
parent 8a3b3da500
commit 342637c34c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=211699
2 changed files with 18 additions and 15 deletions

View File

@ -8,7 +8,7 @@
PORTNAME= hal
DISTVERSION= 0.5.11rc2
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= sysutils
MASTER_SITES= http://hal.freedesktop.org/releases/
@ -105,11 +105,13 @@ post-install:
${MKDIR} ${PREFIX}/share/hal/fdi/policy/10osvendor
${INSTALL_DATA} ${FILESDIR}/10-mouse-sysmouse.fdi \
${PREFIX}/share/hal/fdi/policy/10osvendor
@${SETENV} PKG_PREFIX=${PREFIX} PACKAGE_BUILDING=${PACKAGE_BUILDING} \
.if !defined(PACKAGE_BUILDING)
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.if !defined(PACKAGE_BUILDING) && defined(NEEDS_MEDIA)
.if defined(NEEDS_MEDIA)
${MKDIR} /media
.endif
.endif
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/hald/freebsd/README \

View File

@ -1,8 +1,7 @@
#!/bin/sh
[ "$2" != POST-INSTALL ] && exit 0
if [ -z "${PACKAGE_BUILDING}" ]; then
case $2 in
POST-INSTALL)
USER=haldaemon
GROUP=${USER}
UID=560
@ -36,14 +35,16 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
/usr/bin/install -d -o ${USER} -g ${GROUP} /var/run/hald
/usr/bin/install -d -o ${USER} -g ${GROUP} /var/cache/hald
/usr/bin/install -d -o ${USER} -g ${GROUP} /var/lib/hal
fi
for pair in %%RC_FILES%%; do
file=`echo $pair | cut -f 1 -d :`
destdir=`echo $pair | cut -f 2 -d :`
for pair in %%RC_FILES%%; do
file=`echo $pair | cut -f 1 -d :`
destdir=`echo $pair | cut -f 2 -d :`
if [ ! -f $destdir/$file ]; then
mkdir -p $destdir
cp -p %%DATADIR%%/dist/$file $destdir/$file
fi
done
if [ ! -f $destdir/$file ]; then
mkdir -p $destdir
cp -p %%DATADIR%%/dist/$file $destdir/$file
fi
done
exit 0
;;
esac