summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-01-13 23:46:38 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-01-14 00:02:37 +0900
commita3068a33d5403bc0630606f3649c9086bd1e9269 (patch)
tree25f5c79a9fe79c82ecb7541fe0cae765646259ea /src
parentb8c4b35415a096d245272556be5231f071404365 (diff)
Update install/build script from Homebrew0.9.0
Diffstat (limited to 'src')
-rw-r--r--src/Makefile27
-rw-r--r--src/README.md2
2 files changed, 16 insertions, 13 deletions
diff --git a/src/Makefile b/src/Makefile
index 2758164f..68067efc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -21,26 +21,29 @@ BINARY64 := fzf-$(GOOS)_amd64
VERSION = $(shell fzf/$(BINARY64) --version)
RELEASE32 = fzf-$(VERSION)-$(GOOS)_386
RELEASE64 = fzf-$(VERSION)-$(GOOS)_amd64
-ARCHIVE64 = fzf-$(VERSION)-$(GOOS)_amd64-archive
+BREW = fzf-$(VERSION)-homebrew.tgz
all: test release
-archive: ../$(ARCHIVE64).tar.gz
+brew: ../$(BREW)
-../$(ARCHIVE64).tar.gz: release
- cd ../ && yes | ./install && \
- git archive HEAD --output=$(ARCHIVE64).tar --prefix fzf-$(VERSION)/ && \
- rm -rf fzf-$(VERSION)/bin && mkdir -p fzf-$(VERSION)/bin && \
- cp -a bin/* fzf-$(VERSION)/bin/ && \
- tar --append --file $(ARCHIVE64).tar fzf-$(VERSION)/bin/* && \
- gzip -f $(ARCHIVE64).tar && rm -rf fzf-$(VERSION) && \
+../$(BREW): release
+ifneq ($(UNAME_S),Darwin)
+$(error brew package must be built on OS X)
+endif
+ mkdir -p ../bin && \
+ cp fzf/$(RELEASE64) fzf/$(RELEASE32) ../bin && \
+ cd .. && ln -sf . fzf-$(VERSION) && \
+ tar -cvzf $(BREW) \
+ fzf-$(VERSION)/{{,un}install,fzf-completion.{ba,z}sh,LICENSE} \
+ fzf-$(VERSION)/{plugin/fzf.vim,bin/{$(RELEASE64),$(RELEASE32)}} && \
+ rm fzf-$(VERSION) && \
openssl sha1 $(notdir $@)
release: build
cd fzf && \
cp $(BINARY32) $(RELEASE32) && tar -czf $(RELEASE32).tgz $(RELEASE32) && \
- cp $(BINARY64) $(RELEASE64) && tar -czf $(RELEASE64).tgz $(RELEASE64) && \
- rm $(RELEASE32) $(RELEASE64)
+ cp $(BINARY64) $(RELEASE64) && tar -czf $(RELEASE64).tgz $(RELEASE64)
build: fzf/$(BINARY32) fzf/$(BINARY64)
@@ -83,4 +86,4 @@ $(DISTRO): docker
docker run -i -t -v $(GOPATH):/go junegunn/$(DISTRO)-sandbox \
sh -c 'cd /go/src/github.com/junegunn/fzf/src; /bin/bash'
-.PHONY: all archive build release test install uninstall clean docker linux $(DISTRO)
+.PHONY: all brew build release test install uninstall clean docker linux $(DISTRO)
diff --git a/src/README.md b/src/README.md
index 915e96ac..a15ab58e 100644
--- a/src/README.md
+++ b/src/README.md
@@ -83,7 +83,7 @@ make install
make linux
# Build tarball for Homebrew release
-make archive
+make brew
```
Contribution