mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
60d1a83c2a
- Replace ${MASTER_SITE_FOO} with FOO. - Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9% of the time.) - Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and no hint of what it should be was present. - Fix some logic. - And generally, make things more simple and easy to understand. While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and SAMBA macros. Also, replace some EXTRACT_SUFX occurences with USES=tar:*. Checked by: make fetch-urlall-list With hat: portmgr Sponsored by: Absolight
101 lines
2.6 KiB
Makefile
101 lines
2.6 KiB
Makefile
# Created by: Nicola Vitale <nivit@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= sahi
|
|
PORTVERSION= 3.5.${SAHI_BUILD}
|
|
#PORTREVISION= 0
|
|
PORTREVISION= 1
|
|
CATEGORIES= www
|
|
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-v${PORTVERSION:R:R:R:S,.,,}/${SAHI_BUILD:S,.,,g}/
|
|
DISTNAME= ${PORTNAME}_${SAHI_BUILD:S,.,,g}
|
|
|
|
MAINTAINER= nivit@FreeBSD.org
|
|
COMMENT= Web automation and testing tool
|
|
|
|
LICENSE= APACHE20 MPL
|
|
LICENSE_COMB= multi
|
|
|
|
RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils
|
|
|
|
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
|
|
|
|
JAVA_VERSION= 1.6+
|
|
JAVA_OS= native
|
|
JAVA_RUN= yes
|
|
|
|
NO_BUILD= yes
|
|
|
|
OPTIONS_DEFINE= DOCS
|
|
OPTIONS_DEFAULT= CHROME
|
|
OPTIONS_SINGLE= BROWSER
|
|
OPTIONS_SINGLE_BROWSER= CHROME FIREFOX OPERA
|
|
|
|
CHROME_DESC= Use Chrome as default browser
|
|
FIREFOX_DESC= Use Firefox as default browser
|
|
OPERA_DESC= Use Opera as default browser
|
|
|
|
USES= dos2unix zip
|
|
DOS2UNIX_GLOB= linux.xml os.properties sahi.properties
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
SAHI_BUILD= 2011.07.19
|
|
|
|
USE_JAVA= yes
|
|
|
|
WRKSRC= ${WRKDIR}/sahi
|
|
|
|
REINPLACE_ARGS= -i '' -E \
|
|
-e 's,%%CHROME%%,${LOCALBASE}/bin/chrome,g' \
|
|
-e 's,%%DATADIR%%,${DATADIR},g' \
|
|
-e 's,%%FIREFOX%%,${LOCALBASE}/bin/firefox,g' \
|
|
-e 's,%%JAVA%%,${JAVA},g' \
|
|
-e 's,%%JAVA_KEYTOOL%%,${JAVA_KEYTOOL},g' \
|
|
-e 's,%%OPERA%%,${LOCALBASE}/bin/opera,g' \
|
|
-e 's,(SAHI_HOME=).*$$,\1${DATADIR},g' \
|
|
-e 's,(export (SAHI_)?USERDATA_DIR=).*$$,if [ -z "$${SAHI_USERDATA_DIR}" ]; then \1\$${HOME}/.sahi; fi,g' \
|
|
-e 's,^(\#!/bin/)ba(sh)$$,\1\2,g'
|
|
|
|
SUB_FILES= ${PORTNAME}.sh
|
|
SUB_LIST= BROWSER=${BROWSER} JAVA_HOME=${JAVA_HOME}
|
|
|
|
post-patch:
|
|
@${FIND} ${WRKSRC} -type f \( -name "*.orig" -or -name "*.bat" \) -delete
|
|
@${FIND} ${WRKSRC} -type f \( -name "*.sh" -or -name "linux.xml" \
|
|
-or -name "sahi.properties" \) -print0 \
|
|
| ${XARGS} -0 ${REINPLACE_CMD}
|
|
|
|
do-install:
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
|
@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}
|
|
|
|
post-install:
|
|
@${CP} ${STAGEDIR}${DATADIR}/config/browser_types/linux.xml ${STAGEDIR}${DATADIR}/userdata/config/browser_types.xml
|
|
.for d in bin userdata/bin
|
|
@${CHMOD} ${BINMODE} ${STAGEDIR}${DATADIR}/${d}/*
|
|
.endfor
|
|
.if ${PORT_OPTIONS:MDOCS}
|
|
@${MV} ${STAGEDIR}${DATADIR}/docs ${STAGEDIR}${DOCSDIR}
|
|
.else
|
|
@${RM} -r ${STAGEDIR}${DATADIR}/docs
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${PORT_OPTIONS:MCHROME}
|
|
BROWSER= chrome
|
|
RUN_DEPENDS+= chrome:${PORTSDIR}/www/chromium
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MFIREFOX}
|
|
BROWSER= firefox
|
|
RUN_DEPENDS+= firefox:${PORTSDIR}/www/firefox
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MOPERA}
|
|
BROWSER= opera
|
|
RUN_DEPENDS+= opera:${PORTSDIR}/www/opera
|
|
.endif
|
|
|
|
.include <bsd.port.post.mk>
|