<commit_before>################################################################################
#
# confd
#
################################################################################

CONFD_VERSION = v0.7.1
CONFD_SITE    = https://github.com/kelseyhightower/confd.git
CONFD_SITE_METHOD = git
CONFD_LICENSE_FILES = LICENSE
CONFD_DEPENDENCIES += etcd

GOPATH=$(O)/tmp/GOPATH

define CONFD_BUILD_CMDS
	(cd $(CONFD_DIR) && \
		export PATH=$(GOROOT)/bin:$(PATH) && \
		export GOROOT=$(GOROOT) && \
		export GOPATH=$(GOPATH) && \
		go get github.com/kelseyhightower/confd && \
		go build -x) 
endef

define CONFD_INSTALL_TARGET_CMDS
	$(INSTALL) -m 755 -D $(CONFD_DIR)/confd-$(CONFD_VERSION) \
		$(TARGET_DIR)/usr/sbin/confd
endef

$(eval $(generic-package))
<commit_msg>Make confd package build against correct imports<commit_after>################################################################################
#
# confd
#
################################################################################

CONFD_VERSION = v0.7.1
CONFD_SITE    = https://github.com/kelseyhightower/confd.git
CONFD_SITE_METHOD = git
CONFD_LICENSE_FILES = LICENSE
CONFD_DEPENDENCIES += etcd

GOPATH = $(O)/tmp/GOPATH
CONFD_GOSRC = $(GOPATH)/src/github.com/kelseyhightower/confd

define CONFD_BUILD_CMDS
	# GO apparently wants the install path to be independent of the
	# build path. Use a temporary directory to do the build.
	mkdir -p $(CONFD_GOSRC)
	rsync -av --exclude .git $(@D)/* $(CONFD_GOSRC)

	cd $(CONFD_GOSRC) && \
		GOROOT=$(GOROOT) \
		PATH=$(GOROOT)/bin:$(PATH) \
		GOPATH=$(GOPATH) \
		go get -v ./...

	cd $(CONFD_GOSRC) && \
		GOROOT=$(GOROOT) \
		PATH=$(GOROOT)/bin:$(PATH) \
		GOPATH=$(GOPATH) \
		go build -x
endef

define CONFD_INSTALL_TARGET_CMDS
	$(INSTALL) -m 755 -D $(CONFD_GOSRC)/confd \
		$(TARGET_DIR)/usr/sbin/confd
endef

$(eval $(generic-package))

{'fraction_non_alphanumeric': 0.2980096826250672, 'fraction_numerical': 0.006455083378160301, 'mean_word_length': 5.118421052631579, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7634873', 'n_tokens_mistral': 706, 'n_tokens_neox': 661, 'n_words': 123}