Skip to content

Instantly share code, notes, and snippets.

@KAllan357
Last active June 15, 2016 21:08
Show Gist options
  • Save KAllan357/4a4d4946faf9637148120d430fc251fc to your computer and use it in GitHub Desktop.
Save KAllan357/4a4d4946faf9637148120d430fc251fc to your computer and use it in GitHub Desktop.
pkg_origin=kallan357
pkg_name=tutorial
pkg_version=0.0.1
pkg_maintainer="Your Name <your email address>"
pkg_license=()
pkg_source=https://github.com/KAllan357/answering-machine/archive/master.zip
pkg_shasum=73d350f84257527ca804cb5abe464447d1e4d86bac61b0461440230607671c25
pkg_deps=(core/go)
#pkg_build_deps=()
pkg_bin_dirs=(bin)
pkg_include_dirs=(include)
pkg_lib_dirs=(lib)
pkg_expose=(8080)
do_build() {
cd /hab/cache/src/answering-machine-master
go build main.go
}
do_install() {
# Move the binary?
cp /hab/cache/src/answering-machine-master/main ${pkg_prefix}
}
# run
#!/bin/sh
#
./{{pkg.prefix}}/main
@smith
Copy link

smith commented Jun 15, 2016

cd /hab/cache/src/answering-machine-master

Use $HAB_CACHE_SRC_PATH here

cp /hab/cache/src/answering-machine-master/main ${pkg_prefix}

and also here. By convention you should put executables in ${pkg_prefix}/bin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment