Baptiste Daroussin 64f16bafaf Remove the deinstall script that appears to be deleting all the temporary files
created by pkg(8) during upgrades

It happens because the deinstall script tries to clean up the potential manual
VM registration by cleaning out all symlinks to bin/javavm

Given all VM are registring/unregistering themselves this part is not needed

The other thing the script was doing handling the configuration which has been
replaced by @sample.

pkg-install has been modified to drop the handling of the configuration file but
keep the auto registration if all VM found. While this part is not necessary as
well, we keep it because otherwise anyone doing delete/install on javavmwapper
version 2.5 being the installed version would end up with all VM unregistered.

The pkg-install should be removed after EOL of FreeBSD 10.3

PR:		210313
MFH:		2016Q3
2016-07-31 12:30:24 +00:00

55 lines
1.8 KiB
Makefile

# Created by: Maxim Sobolev <sobomax@FreeBSD.org>
# $FreeBSD$
PORTNAME= javavmwrapper
PORTVERSION= 2.5
PORTREVISION= 1
CATEGORIES= java
MASTER_SITES= # none
DISTFILES= # none
MAINTAINER= glewis@FreeBSD.org
COMMENT= Wrapper script for various Java Virtual Machines
NO_BUILD= yes
NO_WRKSUBDIR= yes
PKGINSTALL= ${WRKDIR}/pkg-install
SRC= ${.CURDIR}/src
SCRIPTS= classpath javavmwrapper
# This is normally defined by bsd.java.mk when USE_JAVA is defined, but
# we can't do that here since it would result in a circular dependency
JAVALIBDIR= ${LOCALBASE}/share/java/classes
do-configure:
.for _script in ${SCRIPTS}
${SED} -e 's|%%PREFIX%%|${PREFIX}|;' \
-e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|;' \
${SRC}/${_script}.sh >${WRKSRC}/${_script}.sh
.endfor
${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|;' \
${FILESDIR}/pkg-install.in > ${PKGINSTALL}
.for _man in checkvms.1 javavm.1 manvm.1 registervm.1 javavm_opts.conf.5 javavms.5
${SED} -e 's|%%PREFIX%%|${PREFIX}|;' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|;' \
-e 's|%%PORTSDIR%%|${PORTSDIR}|;' \
${SRC}/${_man} > ${WRKSRC}/${_man}
.endfor
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/classpath.sh ${STAGEDIR}${PREFIX}/bin/classpath
${INSTALL_SCRIPT} ${WRKSRC}/javavmwrapper.sh ${STAGEDIR}${PREFIX}/bin/javavm
${LN} -sf javavm ${STAGEDIR}${PREFIX}/bin/checkvms
${LN} -sf javavm ${STAGEDIR}${PREFIX}/bin/manvm
${LN} -sf javavm ${STAGEDIR}${PREFIX}/bin/registervm
${LN} -sf javavm ${STAGEDIR}${PREFIX}/bin/unregistervm
${INSTALL_MAN} ${WRKSRC}/*.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/registervm.1 \
${STAGEDIR}${MAN1PREFIX}/man/man1/unregistervm.1
${INSTALL_MAN} ${WRKSRC}/*.5 ${STAGEDIR}${MAN5PREFIX}/man/man5
${INSTALL_DATA} ${FILESDIR}/javavm_opts.conf.dist \
${STAGEDIR}${PREFIX}/etc/javavm_opts.conf.dist
.include <bsd.port.mk>