- Stagify.

- Fix plist now that we care about /var .
This commit is contained in:
Juergen Lock 2014-03-01 15:53:33 +00:00
parent 1235a7b4c9
commit c2ec085934
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=346636
3 changed files with 76 additions and 16 deletions

View file

@ -30,7 +30,6 @@ PATCH_STRIP= -p1
USE_BZIP2= yes
WRKSRC= ${WRKDIR}/${PORTNAME:S/_/-/}-${DISTVERSION}
NO_BUILD= yes
MAN8= vdradmind.8
USE_RC_SUBR= vdradmind
VIDEODIR= /video
@ -54,20 +53,18 @@ USERS= ${VDR_USER}
GROUPS= ${VDR_GROUP}
PLIST_SUB= VDR_USER=${VDR_USER}
PLIST_SUB+= VDR_GROUP=${VDR_GROUP}
PLIST_SUB+= PREFIX=${PREFIX}
NO_STAGE= yes
post-patch:
@${REINPLACE_CMD} 1s-^#!/bin/bash-#!${LOCALBASE}/bin/bash- \
${WRKSRC}/install.sh ${WRKSRC}/make.sh
do-install:
@${INSTALL} -o ${VDR_USER} -g ${VDR_GROUP} -d ${ETCDIR}
@${INSTALL_DATA} -m 644 ${FILESDIR}/vdradmind.conf ${ETCDIR}/vdradmind.conf.sample
@if [ ! -f ${ETCDIR}/vdradmind.conf ]; then \
${INSTALL_DATA} -o ${VDR_USER} -g ${VDR_GROUP} -m 644 ${FILESDIR}/vdradmind.conf ${ETCDIR}; \
fi
@${INSTALL} -o ${VDR_USER} -g ${VDR_GROUP} -d /var/cache/${PORTNAME} \
/var/log/${PORTNAME} /var/run/${PORTNAME}
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./install.sh)
${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} -m 644 ${FILESDIR}/vdradmind.conf ${STAGEDIR}${ETCDIR}/vdradmind.conf.sample
${MKDIR} ${STAGEDIR}/var/cache/${PORTNAME} \
${STAGEDIR}/var/log/${PORTNAME} ${STAGEDIR}/var/run/${PORTNAME}
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} DESTDIR=${STAGEDIR} \
./install.sh)
.include <bsd.port.mk>

View file

@ -1,11 +1,67 @@
--- a/install.sh
+++ b/install.sh
@@ -148,7 +148,7 @@ function doInstall()
@@ -146,27 +146,27 @@ function doInstall()
makeDir $LIBDIR 1 && cp -r template lib $LIBDIR || exit 1
makeDir $BINDIR || exit 1
perlModules
- makeDir $LIBDIR 1 && cp -r template lib $LIBDIR || exit 1
- makeDir $BINDIR || exit 1
- makeDir $DOCDIR && cp -r contrib COPYING CREDITS HISTORY INSTALL LGPL.txt README* REQUIREMENTS FAQ $DOCDIR || exit 1
+ [ -n $NOPORTDOCS ] && makeDir $DOCDIR && cp -r contrib COPYING CREDITS HISTORY INSTALL LGPL.txt README* REQUIREMENTS FAQ $DOCDIR || exit 1
makeDir $MANDIR/man8 && cp vdradmind.pl.1 $MANDIR/man8/vdradmind.8 || exit 1
- makeDir $MANDIR/man8 && cp vdradmind.pl.1 $MANDIR/man8/vdradmind.8 || exit 1
+ makeDir $DESTDIR$LIBDIR 1 && cp -r template lib $DESTDIR$LIBDIR || exit 1
+ makeDir $DESTDIR$BINDIR || exit 1
+ [ -n $NOPORTDOCS ] && makeDir $DESTDIR$DOCDIR && cp -r contrib COPYING CREDITS HISTORY INSTALL LGPL.txt README* REQUIREMENTS FAQ $DESTDIR$DOCDIR || exit 1
+ makeDir $DESTDIR$MANDIR/man8 && cp vdradmind.pl.1 $DESTDIR$MANDIR/man8/vdradmind.8 || exit 1
(
cd locale
for lang in *
do
- makeDir $LOCDIR/$lang/LC_MESSAGES/ && install -m 644 $lang/LC_MESSAGES/vdradmin.mo $LOCDIR/$lang/LC_MESSAGES/vdradmin.mo || exit 1
+ makeDir $DESTDIR$LOCDIR/$lang/LC_MESSAGES/ && install -m 644 $lang/LC_MESSAGES/vdradmin.mo $DESTDIR$LOCDIR/$lang/LC_MESSAGES/vdradmin.mo || exit 1
done
)
local RESTART=
- if [ -d $BINDIR ]; then
+ if [ -d $DESTDIR$BINDIR ]; then
killRunningVDRAdmin
if [ $? -ne 0 ] ; then
RESTART=1
echo "Killed running VDRAdmin-AM..."
fi
- sed <vdradmind.pl >$BINDIR/vdradmind \
+ sed <vdradmind.pl >$DESTDIR$BINDIR/vdradmind \
-e "s/^\(my \$SEARCH_FILES_IN_SYSTEM *=\) 0;/\1 1;/" \
-e "s:/usr/share/vdradmin/lib:${LIBDIR}/lib:" \
-e "s:/usr/share/vdradmin/template:${LIBDIR}/template:" \
@@ -179,7 +179,7 @@ function doInstall()
-e "s:\(\$CONFIG{EPGIMAGES} *= \)\"\$CONFIG{VIDEODIR}/epgimages\";:\1\"${EPGIMAGES}\";:" \
-e "s:\(\$CONFIG{VDRCONFDIR} *= \)\"\$CONFIG{VIDEODIR}\";:\1\"${VDRCONF}\";:"
- chmod a+x $BINDIR/vdradmind
+ chmod a+x $DESTDIR$BINDIR/vdradmind
if [ "$CONFIG" ]; then
echo "Configuring VDRAdmin-AM..."
@@ -192,14 +192,14 @@ function doInstall()
fi
echo ""
- if [ -e $BINDIR/vdradmind.pl ]; then
- echo "Removing ancient $BINDIR/vdradmind.pl"
- rm -f $BINDIR/vdradmind.pl
+ if [ -e $DESTDIR$BINDIR/vdradmind.pl ]; then
+ echo "Removing ancient $DESTDIR$BINDIR/vdradmind.pl"
+ rm -f $DESTDIR$BINDIR/vdradmind.pl
fi
for man in man1/vdradmind.pl.1 man1/vdradmind.1; do
- if [ -e $MANDIR/$man ]; then
- echo "Removing ancient $MANDIR/$man"
- rm -f $MANDIR/$man
+ if [ -e $DESTDIR$MANDIR/$man ]; then
+ echo "Removing ancient $DESTDIR$MANDIR/$man"
+ rm -f $DESTDIR$MANDIR/$man
fi
done
else

View file

@ -1,8 +1,10 @@
bin/vdradmind
@exec /usr/bin/install -o %%VDR_USER%% -g %%VDR_GROUP%% -d %%ETCDIR%%
@exec /usr/bin/install -o %%VDR_USER%% -g %%VDR_GROUP%% -d %D/%%ETCDIR%%
@unexec if cmp -s %D/etc/vdradmin-am/vdradmind.conf.sample %D/etc/vdradmin-am/vdradmind.conf; then rm -f %D/etc/vdradmin-am/vdradmind.conf; fi
%%ETCDIR%%/vdradmind.conf.sample
@exec if [ ! -f %D/etc/vdradmin-am/vdradmind.conf ] ; then cp -p %D/%F %B/vdradmind.conf; chown %%VDR_USER%%:%%VDR_GROUP%% %B/vdradmind.conf; fi
@exec chown -R %%VDR_USER%%:%%VDR_GROUP%% %D/%%ETCDIR%%
man/man8/vdradmind.8.gz
share/vdradmin-am/lib/MIME/Base64.pm
share/vdradmin-am/lib/Template/Plugin/Date.pm
share/vdradmin-am/lib/Template/Plugin/HTML.pm
@ -177,3 +179,8 @@ share/locale/ru/LC_MESSAGES/vdradmin.mo
@dirrm share/vdradmin-am
%%PORTDOCS%%@dirrm %%DOCSDIR%%/contrib
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@cwd /
@dirrmtry var/cache/vdradmin-am
@dirrmtry var/log/vdradmin-am
@dirrmtry var/run/vdradmin-am
@cwd %%PREFIX%%