Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # $OpenBSD: Makefile,v 1.4 2017/06/06 14:17:44 sthen Exp $
  2. COMMENT= JVM-based scripting language for web apps (open-source CFML)
  3. V= 5.1.4.19
  4. DISTNAME= lucee-$V
  5. EXTRACT_SUFX= .war
  6. DISTFILES= ${DISTNAME}${EXTRACT_SUFX}{$V}
  7. CATEGORIES= lang www
  8. HOMEPAGE= http://lucee.org/
  9. MAINTAINER = Stuart Henderson <sthen@openbsd.org>
  10. # LGPLv2.1
  11. PERMIT_PACKAGE_CDROM= Yes
  12. MASTER_SITES = http://cdn.lucee.org/rest/update/provider/war/
  13. # doesn't actually need tomcat to build, but listing it here avoids
  14. # wasting time on arch where it's unavailable
  15. BUILD_DEPENDS= archivers/unzip \
  16. ${RUN_DEPENDS}
  17. RUN_DEPENDS= tomcat->=8,<9:www/tomcat/v8
  18. SUBST_VARS= CATALINA_BASE
  19. NO_BUILD= Yes
  20. NO_TEST= Yes
  21. PKG_ARCH= *
  22. CATALINA_BASE= /var/tomcat
  23. PREFIX= ${CATALINA_BASE}
  24. do-extract:
  25. mkdir ${WRKSRC}; cd ${WRKSRC}; unzip ${FULLDISTDIR}/${DISTNAME}${EXTRACT_SUFX}
  26. # Avoid conflicting servlet names with any alternative version of Railo/Lucee
  27. # that's installed via .WAR files. Idea from jamiekrug.com. In pre-patch to
  28. # assist with patch/edit/update-patches cycle. Also strips horizontal
  29. # whitespace at eol.
  30. pre-patch:
  31. perl -pi -e 's,<servlet-name>,<servlet-name>PKG_,g;' \
  32. -e 's,\h*\r*$$,,;' ${WRKSRC}/WEB-INF/web.xml
  33. echo >> ${WRKSRC}/WEB-INF/web.xml
  34. post-patch:
  35. perl -pi -e 's,/var/tomcat/,${CATALINA_BASE}/,g' ${WRKSRC}/WEB-INF/web.xml
  36. do-install:
  37. ${INSTALL_DATA_DIR} ${PREFIX}/{lucee,lib,conf,webapps/lucee-default}
  38. cd ${WRKSRC} && pax -rw * ${PREFIX}/webapps/lucee-default
  39. mv ${PREFIX}/webapps/lucee-default/WEB-INF/lib/* ${PREFIX}/lib/
  40. rm -r ${PREFIX}/webapps/lucee-default/WEB-INF
  41. chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/*
  42. ${INSTALL_DATA} ${WRKSRC}/WEB-INF/web.xml ${PREFIX}/conf/web-lucee.xml.dist
  43. .include <bsd.port.mk>