anchor.diff:  SRCREV = "cd03e5e7eea8fda73fb2f4009a5d3e9f39a5b833"
   
   PV = "0.0+${SRCPV}"
  -
  -S = "${WORKDIR}/${GO_IMPORT}"
   
   inherit go systemd update-rc.d pkgconfig
   
  
positive.code: UPX ?= "${STAGING_BINDIR_NATIVE}/upx"
  UPX_ARGS ?= "--best -q"
  
  do_configure() {
      mkdir -p ${S}/src
      GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go glide install
  }
  
  do_compile() {
      export CGO_ENABLED=1
      GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go oe_runmake build V=1
  }
  
  do_install() {
      # Copies the binaries to the target directory
      install -d ${D}${bindir}
      find "${S}/bin" ! -type d -print0 | xargs -r0 cp --target-directory="${D}${bindir}"
      chown -R root:root ${D}${bindir}
  
      # UpdateHub server udev rule for USB mounting
      install -Dm 0644 ${S}/cmd/updatehub-server/udev.rules \
                       ${D}${nonarch_base_libdir}/udev/rules.d/99-updatehub.rules
  
      # We don't want this shipped in target
      rm ${D}${bindir}/glide
  
      # Handle init system integration
      if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
  
negative.code: SUMMARY = "A Firmware Over-The-Air agent for Embedded and Industrial Linux-based devices"
  HOMEPAGE = "https://updatehub.io"
  LICENSE = "MIT"
  LIC_FILES_CHKSUM = "file://${S}/src/${GO_IMPORT}/COPYING;md5=ba69bae29a956ebfb5d983fef66a2ea9"
  
  DEPENDS_append = " glide-native libarchive upx-native"
  
  GO_IMPORT = "github.com/UpdateHub/updatehub"
  SRC_URI = " \
      git://${GO_IMPORT} \
      file://updatehub.initd \
      file://updatehub.service \
  "
  