Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # $OpenBSD: Makefile,v 1.11 2017/05/27 19:57:08 ajacoutot Exp $
  2. COMMENT= tool for managing events and logs
  3. V= 2.4.0
  4. DISTNAME= logstash-$V
  5. PKGNAME= logstash-${V:S/-/./}
  6. EPOCH= 0
  7. REVISION= 1
  8. CATEGORIES= sysutils
  9. HOMEPAGE= https://www.elastic.co/products/logstash
  10. MAINTAINER= Jasper Lievisse Adriaanse <jasper@openbsd.org>
  11. # Apache2
  12. PERMIT_PACKAGE_CDROM= Yes
  13. MASTER_SITES= https://download.elastic.co/logstash/logstash/
  14. MODULES= java
  15. MODJAVA_VER= 1.8+
  16. MODJAVA_JRERUN= Yes
  17. RUN_DEPENDS= java/javaPathHelper \
  18. lang/jruby \
  19. shells/bash
  20. NO_TEST= Yes
  21. LS_BASE= ${PREFIX}/logstash/
  22. JFFI_ARCH= ${MACHINE_ARCH:S/amd64/x86_64/}-OpenBSD
  23. SUBST_VARS= JFFI_ARCH
  24. # with NO_BUILD defined JAVA_HOME won't get set, so this is as close as we'll
  25. # get to "building". Wipe the jruby vendor directory as we'll later link to
  26. # the system jruby.
  27. do-build:
  28. -rm -rf ${WRKSRC}/vendor/bundle/jruby/1.9/gems/childprocess-0.5.9/lib/childprocess/unix/platform
  29. -rm -r ${WRKSRC}/vendor/jruby/lib/jni
  30. -rm -rf ${WRKSRC}/vendor/jruby/lib/ruby/shared/ffi/platform/i386-{darwin,freebsd,linux,solaris,windows}
  31. -rm -rf ${WRKSRC}/vendor/jruby/lib/ruby/shared/ffi/platform/{i486-gnu,mips*}
  32. -rm -rf ${WRKSRC}/vendor/jruby/lib/ruby/shared/ffi/platform/powerpc-{aix,darwin,linux}
  33. -rm -rf ${WRKSRC}/vendor/jruby/lib/ruby/shared/ffi/platform/{ppc*,s390*,sparc*}
  34. -rm -rf ${WRKSRC}/vendor/jruby/lib/ruby/shared/ffi/platform/x86_64-{darwin,freebsd,linux,solaris,windows}
  35. ${SUBST_CMD} ${WRKSRC}/bin/logstash.lib.sh
  36. @# apply hammer to fixup weird modes
  37. find ${WRKSRC}/vendor/ -type f -exec chmod 0644 {} \;
  38. find ${WRKSRC} -name '*.orig' -print0 | xargs -0r rm
  39. chmod 755 ${WRKSRC}/vendor/jruby/bin/*
  40. do-install:
  41. ${INSTALL_DATA_DIR} ${LS_BASE}/{bin,lib,vendor}/
  42. ${INSTALL_DATA} ${WRKSRC}/Gemfile* ${LS_BASE}
  43. .for b in logstash logstash-plugin logstash.lib.sh plugin
  44. ${INSTALL_SCRIPT} ${WRKSRC}/bin/$b ${LS_BASE}/bin/
  45. .endfor
  46. cd ${WRKSRC} && cp -R lib vendor ${LS_BASE}
  47. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/logstash/
  48. ${SUBST_CMD} -m 0644 -c ${FILESDIR}/logstash.conf \
  49. ${PREFIX}/share/examples/logstash/logstash.conf
  50. .include <bsd.port.mk>