-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
89 lines (73 loc) · 2.48 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
NAME = tmux-autocomplete
DESCRIPTION = Autocompletion system for tmux multiplexer
RELEASE = $(shell git describe --tags --abbrev=0)
RELEASE = alpha
VERSION = $(shell git describe --tags | sed 's/\-/./g')
FPM := --force \
--url "https://tmux.reconquest.io/" \
--maintainer "[email protected]" \
--input-type dir \
--name tmux-autocomplete \
--version "$(VERSION)" \
--description "$(DESCRIPTION)" \
--log error \
usr/
version:
@echo $(VERSION)
build:
@echo ':: Building version $(VERSION)'
@go build \
-ldflags="-X=main.version=$(VERSION) \
-X main.release=$(RELEASE)" \
$(GCFLAGS)
pkg_tree/linux: build
@rm -rf pkg_tree/linux
@mkdir -p pkg_tree/linux/usr/bin/ pkg_tree/linux/usr/share/tmux-autocomplete/themes/
@cp -r share/themes pkg_tree/linux/usr/share/tmux-autocomplete/
@cp tmux-autocomplete pkg_tree/linux/usr/bin/
@cp tmux-autocomplete pkg_tree/linux/usr/bin/
@cp share/tmux-autocomplete-url pkg_tree/linux/usr/bin/
pkg_tree/osx: build
@rm -rf pkg_tree/osx
@mkdir -p pkg_tree/osx/usr/local/bin/ pkg_tree/osx/usr/local/share/tmux-autocomplete/themes/
@cp -r share/themes pkg_tree/osx/usr/local/share/tmux-autocomplete/
@cp tmux-autocomplete pkg_tree/osx/usr/local/bin/
@cp share/tmux-autocomplete-url pkg_tree/osx/usr/local/bin/
pkg_arch: pkg_tree/linux
@echo ':: Building Arch Linux package'
@mkdir -p pkg/arch/
@fpm -t pacman -p pkg/arch/tmux-autocomplete_$(VERSION).pkg.tar.xz -C pkg_tree/linux $(FPM)
pkg_deb: pkg_tree/linux
@echo ':: Building Debian package'
@mkdir -p pkg/deb/
@fpm -t deb -p pkg/deb/tmux-autocomplete_$(VERSION).deb -C pkg_tree/linux $(FPM)
pkg_rpm: pkg_tree/linux
@echo ':: Building RPM package'
@mkdir -p pkg/rpm/
@fpm -t rpm -p pkg/rpm/tmux-autocomplete_$(VERSION).rpm -C pkg_tree/linux $(FPM)
pkg_tar: pkg_tree/linux
@echo ':: Building TAR package'
@mkdir -p pkg/tar/
@fpm -t tar -p pkg/tar/tmux-autocomplete_$(VERSION).tar -C pkg_tree/linux $(FPM)
pkg_osx: pkg_tree/osx
@echo ':: Building OSX package'
@mkdir -p pkg/osx/
@fpm -t osxpkg -p pkg/osx/tmux-autocomplete_$(VERSION).pkg \
--osxpkg-identifier-prefix com.gitlab.reconquest \
-C pkg_tree/osx \
$(FPM)
.PHONY: pkg
pkg: pkg_arch pkg_deb pkg_rpm pkg_tar
release: pkg
@echo ":: Building && installing package on OSX"
./osx-install
@echo ":: Downloading OSX package to local directory"
./osx-package
@echo ":: Uploading new archives to remote host"
@./upload
clean:
rm -rf pkg/ tmux-autocomplete
.PHONY: upload
upload:
@echo ":: Uploading new archives to remote host"
@./upload