Bläddra i källkod

Makefile for os-specific builds

tags/v0.8.1
Sean Enck 7 år sedan
förälder
incheckning
534854b42b
Inget konto är kopplat till bidragsgivarens mejladress
2 ändrade filer med 68 tillägg och 0 borttagningar
  1. 48
    0
      Makefile
  2. 20
    0
      README.md

+ 48
- 0
Makefile Visa fil

@@ -0,0 +1,48 @@
1
+BUILD=./build/
2
+WIN=$(BUILD)win/
3
+LINUX=$(BUILD)linux/
4
+OSX=$(BUILD)osx/
5
+ARM6=$(BUILD)arm/
6
+SOURCE=oragono.go
7
+VERS=XXX
8
+
9
+.PHONY: all
10
+
11
+add-files = mkdir -p $1; \
12
+	cp oragono.yaml $1; \
13
+	cp oragono.motd $1; \
14
+	cp LICENSE $1; \
15
+	cp ./docs/README $1; \
16
+	mkdir -p $1/docs; \
17
+	cp ./CHANGELOG.md $1/docs/; \
18
+	cp ./docs/logo* $1/docs/;
19
+
20
+all: clean windows osx linux arm6
21
+
22
+clean:
23
+	rm -rf $(BUILD)
24
+	mkdir -p $(BUILD)
25
+
26
+windows:
27
+	GOOS=windows GOARCH=amd64 go build $(SOURCE)
28
+	$(call add-files,$(WIN))
29
+	mv oragono.exe $(WIN)
30
+	cd $(WIN) && zip -r ../oragono-$(VERS)-windows.zip *
31
+
32
+osx:
33
+	GOOS=darwin GOARCH=amd64 go build oragono.go
34
+	$(call add-files,$(OSX))
35
+	mv oragono $(OSX)
36
+	cd $(OSX) && tar -czvf ../oragono-$(VERS)-osx.tgz *
37
+
38
+linux:
39
+	GOOS=linux GOARCH=amd64 go build oragono.go
40
+	$(call add-files,$(LINUX))
41
+	mv oragono $(LINUX)
42
+	cd $(LINUX) && tar -czvf ../oragono-$(VERS)-linux.tgz *
43
+
44
+arm6:
45
+	GOARM=6 GOARCH=arm go build oragono.go
46
+	$(call add-files,$(ARM6))
47
+	mv oragono $(ARM6)
48
+	cd $(ARM6) && tar -czvf ../oragono-$(VERS)-arm.tgz *

+ 20
- 0
README.md Visa fil

@@ -57,6 +57,26 @@ You can also install this repo and use that instead! However, keep some things i
57 57
 
58 58
 The `master` branch _should_ usually be stable, but may contain database changes that either have not been finalised or not had database upgrade code written yet. Don't run `master` on a live production network. If you'd like to, run the latest tagged version in production instead.
59 59
 
60
+from the root folder, run make (for all target systems/release)
61
+```
62
+make
63
+```
64
+
65
+or restrict to a specific target system
66
+```
67
+# for windows
68
+make windows
69
+
70
+# for linux
71
+make linux
72
+
73
+# for osx
74
+make osx
75
+
76
+# for arm6
77
+make arm6
78
+```
79
+
60 80
 ## Configuration
61 81
 
62 82
 The default config file [`oragono.yaml`](oragono.yaml) helps walk you through what each option means and changes. The configuration's intended to be sparse, so if there are options missing it's either because that feature isn't written/configurable yet or because we don't think it should be configurable.

Laddar…
Avbryt
Spara