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 spruce
Last active
July 29, 2017 07:13
-
-
Save drnic/89ae726a0d411c6fc941ba7514549132 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
spruce* |
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=spruce | |
VERSION=1.11.0 | |
LICENSE=MIT | |
DESCRIPTION="spruce - general purpose YAML & JSON merging tool" | |
URL=https://github.com/geofffranks/spruce | |
MAINTAINERS=https://github.com/geofffranks/spruce/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/geofffranks/spruce/releases/download/v$(VERSION)/spruce-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 \ | |
spruce-$(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