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 safe
Last active
July 29, 2017 07:13
-
-
Save drnic/f47caa6f9e88c7b8cd180b23603b3e99 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
safe* |
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=safe | |
VERSION=0.2.1 | |
LICENSE=MIT | |
DESCRIPTION="safe - Vault CLI" | |
URL=https://github.com/starkandwayne/safe | |
MAINTAINERS=https://github.com/starkandwayne/safe/graphs/contributors | |
VENDOR="Stark & Wayne LLC" | |
UBUNTU=frodenas/ubuntu | |
RELEASE_BUCKET=starkandwayne-debian-apt | |
all: docker-test-deb | |
$(NAME)-$(VERSION): | |
rm -f $(NAME)-$(VERSION) | |
curl -L https://github.com/starkandwayne/safe/releases/download/v$(VERSION)/safe-linux-amd64 -o $(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 \ | |
safe-$(VERSION)=/usr/bin/$(NAME) | |
.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 && $(NAME) -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