Don't install non-executable files into bin/.

Don't install distfiles directly (they might have their file flags set
on BSD systems).
Don't make the wrapper script more complicated than necessary.
Call the correct Java VM.
This commit is contained in:
Roland Illig 2008-01-03 23:08:57 +00:00 committed by Thomas Klausner
parent f650a653c2
commit 5746aa29d3
2 changed files with 9 additions and 14 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.8 2005/11/02 18:00:25 thomasklausner Exp $
# $NetBSD: Makefile,v 1.9 2008/01/03 23:08:57 rillig Exp $
#
DISTNAME= pizza-1.1
PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pizzacompiler/}
EXTRACT_SUFX= .jar
@ -11,21 +12,15 @@ HOMEPAGE= http://pizzacompiler.sourceforge.net/
COMMENT= Pizza language is an extension to Java
WRKSRC= ${WRKDIR}
do-extract:
AUTO_MKDIRS= yes
USE_TOOLS+= printf
do-build:
printf "#! ${SH}\\nexec ${JAVA_BINPREFIX}-java -jar ${PREFIX}/lib/java/${DISTNAME}.jar \"\$$@\"\\n" > ${WRKSRC}/pizza.sh
do-install:
${INSTALL_DATA} ${DISTDIR}/${DISTNAME}.jar \
${PREFIX}/bin/pizza.jar
${ECHO} "#!/bin/sh" > ${PREFIX}/bin/pizza
${ECHO} "if [ \"\" = \"\`echo \$$CLASSPATH|grep pizza.jar\`\" ];then" >> ${PREFIX}/bin/pizza
${ECHO} "echo \"WARNING: You must add ${PREFIX}/bin/pizza.jar to CLASSPATH\"" >> ${PREFIX}/bin/pizza
${ECHO} "fi" >> ${PREFIX}/bin/pizza
${ECHO} "CLASSPATH=${PREFIX}/bin/pizza.jar:${CLASSPATH}" >> ${PREFIX}/bin/pizza
${ECHO} "java -jar ${PREFIX}/bin/pizza.jar \$$*" >> ${PREFIX}/bin/pizza
${CHMOD} +x ${PREFIX}/bin/pizza
${INSTALL_SCRIPT} ${WRKSRC}/pizza.sh ${PREFIX}/bin/pizza
${INSTALL_DATA} ${WRKSRC}/${DISTNAME}.jar ${PREFIX}/lib/java/
.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,3 +1,3 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2004/03/21 00:01:24 poppnk Exp $
@comment $NetBSD: PLIST,v 1.2 2008/01/03 23:08:57 rillig Exp $
bin/pizza
bin/pizza.jar
lib/java/pizza-1.1.jar