This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (62 loc) · 1.84 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
VERSION=0.0.0
BUILD=1
build:
go-bindata admin_http_assets
go build
all:
deb: build
install -d debian/usr/bin debian/usr/share/man/man1
install carbon-relay-ng debian/usr/bin
install man/man1/carbon-relay-ng.1 debian/usr/share/man/man1
gzip debian/usr/share/man/man1/carbon-relay-ng.1
fpm \
-s dir \
-t deb \
-n carbon-relay-ng \
-v $(VERSION)-$(BUILD) \
-a amd64 \
-m "Richard Crowley <r@rcrowley.org>" \
--description "Route traffic to Graphite's carbon-cache.py." \
--license BSD \
--url https://github.com/rcrowley/carbon-relay-ng \
-C debian .
rm -rf debian
rpm: build
install -d redhat/usr/bin redhat/usr/share/man/man1
install carbon-relay-ng redhat/usr/bin
install man/man1/carbon-relay-ng.1 redhat/usr/share/man/man1
gzip redhat/usr/share/man/man1/carbon-relay-ng.1
fpm \
-s dir \
-t rpm \
-n carbon-relay-ng \
-v $(VERSION) \
--epoch $(BUILD) \
-a amd64 \
-m "Richard Crowley <r@rcrowley.org>" \
--description "Route traffic to Graphite's carbon-cache.py." \
--license BSD \
--url https://github.com/rcrowley/carbon-relay-ng \
-C redhat .
rm -rf redhat
deploy:
scp carbon-relay-ng_$(VERSION)-$(BUILD)_amd64.deb freight@packages.rcrowley.org:
ssh -t freight@packages.rcrowley.org "freight add carbon-relay-ng_$(VERSION)-$(BUILD)_amd64.deb apt/precise && rm carbon-relay-ng_$(VERSION)-$(BUILD)_amd64.deb && freight cache apt/precise"
gh-pages: man
mkdir -p gh-pages
find man -name \*.html | xargs -I__ mv __ gh-pages/
git checkout -q gh-pages
cp -R gh-pages/* ./
rm -rf gh-pages
git add .
git commit -m "Rebuilt manual."
git push origin gh-pages
git checkout -q master
install: build
go-bindata admin_http_assets
go install
man:
find man -name \*.ronn | xargs -n1 ronn --manual=carbon-relay-ng --style=toc
run: build
./carbon-relay-ng carbon-relay-ng.ini
.PHONY: all deb gh-pages install man