diff options
Diffstat (limited to 'net/frost')
-rw-r--r-- | net/frost/Makefile | 37 | ||||
-rw-r--r-- | net/frost/files/wrapper.sh | 13 | ||||
-rw-r--r-- | net/frost/pkg-plist | 24 |
3 files changed, 31 insertions, 43 deletions
diff --git a/net/frost/Makefile b/net/frost/Makefile index 310b4bc03dcc..60602346b437 100644 --- a/net/frost/Makefile +++ b/net/frost/Makefile @@ -7,6 +7,7 @@ PORTNAME= frost PORTVERSION= 1.2.0.20040225 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= net java MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} @@ -16,19 +17,20 @@ DISTNAME= ${PORTNAME}-25-Feb-2004 MAINTAINER= lioux@FreeBSD.org COMMENT= File-sharing tool for FreeNet with Usenet like forum support -USE_JAVA= 1.4+ +USE_JAVA= yes +JAVA_VERSION= 1.4+ USE_ZIP= yes NO_BUILD= yes -NO_BUILD_DEPENDS_JAVA= yes #WRKSRC= ${WRKDIR}/${PORTNAME} NO_WRKSUBDIR= yes PLIST_SUB= JAR_DIR=${JAR_DIR} +DATADIR= ${JAVASHAREDIR}/${PORTNAME} + VERSION_DATE= 090603 JAVAVM= ${LOCALBASE}/bin/java -SHARE_DIR= share/${PORTNAME} -JAR_DIR= share/java/jar/${PORTNAME} +JAR_DIR= ${JAVAJARDIR:S,^${PREFIX}/,,}/${PORTNAME} JAR_FILE= frost.jar JAR_FILES= frost.jar lib/fecImpl.jar \ lib/BCastle.jar \ @@ -41,17 +43,32 @@ JAR_FILES= frost.jar lib/fecImpl.jar \ DOC_FILES= doc/Frost.tex doc/authors.txt doc/gpl.txt \ doc/SkinLFLicense.txt \ help/faq.txt help/history.txt +PORTDOCS= ${DOC_FILES:C,^.*/,,} -SHARE_FILES= config/boards.xml.default \ +DATA_FILES= config/boards.xml.default \ themes/themepack.zip +PLIST_FILES= bin/${PORTNAME} + +.for jar in ${JAR_FILES:C,^.*/,,} +PLIST_FILES+= %%JAR_DIR%%/${jar} +.endfor + +.for file in ${DATA_FILES:C,^.*/,,} +PLIST_FILES+= %%DATADIR%%/${file} +.endfor + +PLIST_DIR+= \ + %%JAR_DIR%% \ + %%DATADIR%% + post-patch: @${SED} -e "s|%%PREFIX%%|${PREFIX}|; \ - s|%%JAVA_VERSION%%|${USE_JAVA}|; \ + s|%%JAVA_VERSION%%|${JAVA_VERSION}|; \ s|%%JAVAVM%%|${JAVAVM}|; \ s|%%JAR_DIR%%|${JAR_DIR}|; \ s|%%JAR_FILE%%|${JAR_FILE}|; \ - s|%%SHARE_DIR%%|${SHARE_DIR}|" \ + s|%%DATADIR%%|${DATADIR:S,^${PREFIX}/,,}|" \ ${FILESDIR}/wrapper.sh > ${WRKDIR}/wrapper.sh do-install: @@ -68,9 +85,9 @@ do-install: @${INSTALL_DATA} ${WRKDIR}/${jar} ${PREFIX}/${JAR_DIR} .endfor # default boards - @${MKDIR} ${PREFIX}/${SHARE_DIR} -.for file in ${SHARE_FILES} - @${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/${SHARE_DIR} + @${MKDIR} ${DATADIR} +.for file in ${DATA_FILES} + @${INSTALL_DATA} ${WRKSRC}/${file} ${DATADIR} .endfor # wrapper @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/${PORTNAME:L} diff --git a/net/frost/files/wrapper.sh b/net/frost/files/wrapper.sh index b65c91b447e6..f6e7bd2044af 100644 --- a/net/frost/files/wrapper.sh +++ b/net/frost/files/wrapper.sh @@ -7,7 +7,7 @@ JAVA_VERSION="%%JAVA_VERSION%%" JAVAVM="%%JAVAVM%%" JAR_DIR="%%JAR_DIR%%" JAR_FILE="%%JAR_FILE%%" -SHARE_DIR="%%SHARE_DIR%%" +DATADIR="%%DATADIR%%" HOME_DIR=${HOME}/.frost CLASSPATH="${PREFIX}/${JAR_DIR}/BCastle.jar:${PREFIX}/${JAR_DIR}/fecImpl.jar:${PREFIX}/${JAR_DIR}/frost.jar:${PREFIX}/${JAR_DIR}/genChkImpl.jar:${PREFIX}/${JAR_DIR}/jocache.jar:${PREFIX}/${JAR_DIR}/mailapi.jar:${PREFIX}/${JAR_DIR}/skinlf.jar:${PREFIX}/${JAR_DIR}/skinlfFix.jar:${PREFIX}/${JAR_DIR}/smtp.jar:${PREFIX}/${JAR_DIR}/xercesImpl.jar:${PREFIX}/${JAR_DIR}/xml-apis.jar:$CLASSPATH" @@ -16,20 +16,15 @@ then mkdir -p ${HOME_DIR}/config fi -if [ ! -e ${HOME_DIR}/config/boards.xml.default ] -then - cp ${PREFIX}/${SHARE_DIR}/boards.xml.default ${HOME_DIR}/config/ -fi +ln -sf ${PREFIX}/${DATADIR}/boards.xml.default \ + ${HOME_DIR}/config/boards.xml.default if [ ! -d ${HOME_DIR}/themes ] then mkdir -p ${HOME_DIR}/themes fi -if [ ! -e ${HOME_DIR}/themes/themepack.zip ] -then - cp ${PREFIX}/${SHARE_DIR}/themepack.zip ${HOME_DIR}/themes/ -fi +ln -sf ${PREFIX}/${DATADIR}/themepack.zip ${HOME_DIR}/themes/themepack.zip cd ${HOME_DIR} && exec ${JAVAVM} -cp $CLASSPATH frost.frost "${@}" diff --git a/net/frost/pkg-plist b/net/frost/pkg-plist deleted file mode 100644 index 13eac6753203..000000000000 --- a/net/frost/pkg-plist +++ /dev/null @@ -1,24 +0,0 @@ -bin/frost -%%JAR_DIR%%/BCastle.jar -%%JAR_DIR%%/fecImpl.jar -%%JAR_DIR%%/frost.jar -%%JAR_DIR%%/genChkImpl.jar -%%JAR_DIR%%/jocache.jar -%%JAR_DIR%%/mailapi.jar -%%JAR_DIR%%/skinlf.jar -%%JAR_DIR%%/skinlfFix.jar -%%JAR_DIR%%/smtp.jar -%%JAR_DIR%%/xercesImpl.jar -%%JAR_DIR%%/xml-apis.jar -%%DATADIR%%/boards.xml.default -%%DATADIR%%/themepack.zip -%%PORTDOCS%%%%DOCSDIR%%/Frost.tex -%%PORTDOCS%%%%DOCSDIR%%/SkinLFLicense.txt -%%PORTDOCS%%%%DOCSDIR%%/authors.txt -%%PORTDOCS%%%%DOCSDIR%%/faq.txt -%%PORTDOCS%%%%DOCSDIR%%/gpl.txt -%%PORTDOCS%%%%DOCSDIR%%/history.txt -@dirrm %%JAR_DIR%% -@dirrm %%DATADIR%% -@unexec rmdir %D/share/java/jar 2>/dev/null || true -%%PORTDOCS%%@dirrm %%DOCSDIR%% |