Changeset View
Standalone View
games/runelite/Makefile
- This file was added.
# Created by: Alexander Vereeken <Alexander88207@protonmail.com> | |||||||||
PORTNAME= runelite | |||||||||
PORTVERSION= 2.2.0 | |||||||||
CATEGORIES= games java | |||||||||
MASTER_SITES+= https://github.com/runelite/launcher/releases/download/${PORTVERSION}/:game \ | |||||||||
https://raw.githubusercontent.com/runelite/launcher/${PORTVERSION}/appimage/:icon \ | |||||||||
https://raw.githubusercontent.com/runelite/launcher/${PORTVERSION}/:license | |||||||||
DISTFILES= RuneLite.jar:game \ | |||||||||
runelite.png:icon \ | |||||||||
LICENSE:license | |||||||||
DIST_SUBDIR= ${PORTNAME}/${PORTVERSION} | |||||||||
EXTRACT_ONLY= | |||||||||
MAINTAINER= Alexander88207@protonmail.com | |||||||||
COMMENT= Open source Old School RuneScape client | |||||||||
LICENSE= BSD2CLAUSE | |||||||||
LICENSE_FILE= ${DISTDIR}/${DIST_SUBDIR}/LICENSE | |||||||||
USE_JAVA= yes | |||||||||
JAVA_VERSION= 11 | |||||||||
DESKTOP_ENTRIES="RuneLite" \ | |||||||||
"Old School RuneScape client" \ | |||||||||
"${PREFIX}/share/pixmaps/runelite.png" \ | |||||||||
"${PORTNAME}" \ | |||||||||
"Game;Java;" \ | |||||||||
false | |||||||||
NO_ARCH= yes | |||||||||
NO_BUILD= yes | |||||||||
NO_WRKSUBDIR= yes | |||||||||
do-install: | |||||||||
@${MKDIR} ${STAGEDIR}${DATADIR} | |||||||||
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/RuneLite.jar \ | |||||||||
${STAGEDIR}${DATADIR}/RuneLite.jar | |||||||||
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/runelite.png \ | |||||||||
${STAGEDIR}${PREFIX}/share/pixmaps/runelite.png | |||||||||
${ECHO} "exec ${JAVA} -jar ${DATADIR}/RuneLite.jar" >> ${WRKDIR}/runelite | |||||||||
${INSTALL_SCRIPT} ${WRKDIR}/runelite ${STAGEDIR}${PREFIX}/bin | |||||||||
arrowd: `${LOCALBASE}` instead of `/usr/local` | |||||||||
Not Done Inline ActionsI believe the recommendation is PREFIX koobs: I believe the recommendation is PREFIX | |||||||||
Done Inline ActionsYou install into PREFIX, but call stuff from LOCALBASE. Actually, doesn't USE_JAVA=yes provide some sort of JAVA_CMD? arrowd: You install into `PREFIX`, but call stuff from `LOCALBASE`.
Actually, doesn't `USE_JAVA=yes`… | |||||||||
Not Done Inline ActionsIs Java different such that the recommendation in PH doesn't apply? https://docs.freebsd.org/en/books/porters-handbook/testing/#porting-prefix koobs: Is Java different such that the recommendation in PH doesn't apply?
https://docs.freebsd. | |||||||||
Not Done Inline ActionsWhat recommendation, exactly? The section you linked says the same thing as me:
This port doesn't install bin/java, but uses it. So it should look for it in LOCALBASE. arrowd: What recommendation, exactly? The section you linked says the same thing as me:
> Refer to… | |||||||||
Not Done Inline ActionsAvoiding hard-coded /usr/local paths in the source makes the port much more flexible and able to cater to the needs of other sites. Often, this can be accomplished by replacing occurrences of /usr/local in the port’s various Makefiles with ${PREFIX}. This variable is automatically passed down to every stage of the build and install processes. Make sure the application is not installing things in /usr/local instead of PREFIX. koobs: ```
Avoiding hard-coded /usr/local paths in the source makes the port much more flexible and… | |||||||||
Not Done Inline ActionsThat paragraph talks about different thing. Let me explain on example of this port. The user uses official FreeBSD packages, which are installed into /usr/local. However, for some reason the user want to install this port into a different PREFIX. At the same time, the bin/java executable is still located under LOCALBASE. The PREFIX is the location where we install this port, while LOCALBASE is where it should look for other things. This line creates a script that calls bin/java. The script itself is installed into PREFIX, but its contents should reference LOCALBASE. arrowd: That paragraph talks about different thing.
Let me explain on example of this port. The user… | |||||||||
Not Done Inline ActionsYep, I didn't grok the context of the (ECHO) entry. Carry on! koobs: Yep, I didn't grok the context of the (ECHO) entry.
Carry on! | |||||||||
Done Inline Actions
Still wrong. Maybe this? arrowd: Still wrong. Maybe this? | |||||||||
PLIST_FILES= bin/runelite \ | |||||||||
share/pixmaps/runelite.png \ | |||||||||
share/runelite/RuneLite.jar | |||||||||
.include <bsd.port.mk> |
${LOCALBASE} instead of /usr/local