1 # Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
5 pkgdesc="A wicked fast source browser."
6 url="http://hub.opensolaris.org/bin/view/Project+opengrok/"
9 depends=('tomcat' 'jre' 'ctags' 'sh')
12 "http://hub.opensolaris.org/bin/download/Project+opengrok/files/${pkgname}-${pkgver}.tar.gz"
15 'b25fba90b2b521f58e802d03e7f498d4'
16 'abef99ea9922f52fd09956ef8d579787')
25 cd "${srcdir}/${pkgname}-${pkgver}"
27 # OpenGrok script in /usr/bin
28 mkdir -p "${pkgdir}/usr/bin" || return 1
29 ln -s /opt/opengrok/bin/OpenGrok "${pkgdir}/usr/bin/OpenGrok"
32 mkdir -p "${pkgdir}/opt/opengrok" || return 1
33 cp -R * "${pkgdir}/opt/opengrok" || return 1
34 msg "Patching OpenGrok binary for Arch Linux..."
36 # - ctags command is ctags
37 # - Tomcat is installed into /opt/tomcat
38 # - need to pretend that the script is in /opt/opengrok
40 -e 's#SCRIPT_DIRECTORY=.*dirname.*#SCRIPT_DIRECTORY="/opt/opengrok/bin"#' \
41 -e '/Linux/s:commandName="ctags-exuberant":commandName="ctags":' \
42 -e '/DetermineWarDirectoryTomcat[(]/,/^[ \t]*}[ \t]*$/s#.*OPENGROK_TOMCAT_BASE.*#\t/opt/tomcat \\\n&#' \
43 -e '/StdInvocation/,/^\}/s/"\${@}"/${OPENGROK_EXTRA_PARAMS} &/' \
44 -i "${pkgdir}/opt/opengrok/bin/OpenGrok"
46 install -m0755 "${srcdir}/deploy.sh" "${pkgdir}/opt/opengrok/bin/tomcat-deploy-helper"