cat > /etc/apt/sources.list.d/myrepo.list << EOF
deb [trusted=yes] https://starkandwayne-debian-apt.s3.amazonaws.com stable main
EOF
apt-get update
apt-get install vault
Last active
July 30, 2017 11:43
-
-
Save drnic/c03bf5929c7da3421e3978058845512b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vault* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME=vault | |
BINNAME=vault | |
VERSION=0.7.3 | |
LICENSE="Mozilla Public License 2.0" | |
DESCRIPTION="BOSH CLI - Interact with BOSH director" | |
URL=https://www.vaultproject.io | |
MAINTAINERS=https://github.com/hashicorp/vault/graphs/contributors | |
VENDOR="Hashicorp" | |
UBUNTU=frodenas/ubuntu | |
ALPINE=alpine | |
RELEASE_BUCKET=apt.starkandwayne.com | |
all: docker-test-deb docker-test-apk | |
$(NAME)-$(VERSION): | |
rm -f $(NAME)-$(VERSION) | |
curl -L https://releases.hashicorp.com/vault/$(VERSION)/vault_$(VERSION)_linux_amd64.zip -o $(NAME)-$(VERSION).zip | |
unzip $(NAME)-$(VERSION).zip | |
mv vault $(NAME)-$(VERSION) | |
chmod +x $(NAME)-$(VERSION) | |
$(NAME)_$(VERSION)_amd64.deb: $(NAME)-$(VERSION) | |
rm -f $(NAME)*.deb | |
fpm -s dir -t deb -n $(NAME) -v $(VERSION) \ | |
--provides $(NAME) \ | |
--vendor $(VENDOR) --license $(LICENSE) -m $(MAINTAINERS) --description $(DESCRIPTION) --url $(URL) \ | |
--deb-use-file-permissions \ | |
--deb-no-default-config-files \ | |
$(NAME)-$(VERSION)=/usr/bin/$(BINNAME) | |
$(NAME)_$(VERSION)_noarch.apk: $(NAME)-$(VERSION) | |
rm -f $(NAME)*.deb | |
fpm -s dir -t apk -n $(NAME) -v $(VERSION) \ | |
--provides $(NAME) \ | |
--vendor $(VENDOR) --license $(LICENSE) -m $(MAINTAINERS) --description $(DESCRIPTION) --url $(URL) \ | |
$(NAME)-$(VERSION)=/usr/bin/$(BINNAME) | |
.PHONY: docker-test | |
docker-test-deb: $(NAME)_$(VERSION)_amd64.deb | |
docker run -ti -v ${CURDIR}:/packages $(UBUNTU) \ | |
sh -c "dpkg -i /packages/$(NAME)_$(VERSION)_amd64.deb && $(BINNAME) -v" | |
docker-test-apk: $(NAME)_$(VERSION)_noarch.apk | |
docker run -ti -v ${CURDIR}:/packages $(ALPINE) \ | |
sh -c "apk update && apk add --allow-untrusted /packages/$(NAME)_$(VERSION)_noarch.apk && $(BINNAME) -v" | |
release: $(NAME)_$(VERSION)_amd64.deb | |
deb-s3 upload $(NAME)_$(VERSION)_amd64.deb --bucket $(RELEASE_BUCKET) | |
clean: | |
rm -f $(NAME)* | |
dependencies: | |
gem install fpm deb-s3 --no-ri --no-rdoc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment