Skip to content

Instantly share code, notes, and snippets.

@johnfitzpatrick
Created March 22, 2019 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnfitzpatrick/6b9cedf88c43394b24c0f7ab58aba677 to your computer and use it in GitHub Desktop.
Save johnfitzpatrick/6b9cedf88c43394b24c0f7ab58aba677 to your computer and use it in GitHub Desktop.
pkg_name=national-parks
pkg_origin=myorigin
pkg_version="6.3.0"
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_license=("Apache-2.0")
pkg_deps=(core/tomcat8 core/jre8)
pkg_build_deps=(core/jdk8/8u131 core/maven)
pkg_svc_user="root"
do_prepare(){ export JAVA_HOME=$(hab pkg path core/jdk8) ; }
do_build()
{
cp -r $PLAN_CONTEXT/../ $HAB_CACHE_SRC_PATH/$pkg_dirname
cd ${HAB_CACHE_SRC_PATH}/${pkg_dirname}
mvn package
}
do_install()
{
mkdir ${PREFIX}/config
cp ${HAB_CACHE_SRC_PATH}/${pkg_dirname}/target/${pkg_name}.war ${PREFIX}/
cp $(hab pkg path core/tomcat8)/config/conf_server.xml ${PREFIX}/config/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment