This repository has been archived by the owner on Feb 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·46 lines (36 loc) · 1.47 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
install: $(shell find -name "*.go")
go install maunium.net/go/gopacked/cmd/gopacked
go install maunium.net/go/gopacked/cmd/twitchparse
build-all: build-linux build-win
build-linux: $(shell find -name "*.go")
env GOOS=linux go build -o gopacked maunium.net/go/gopacked/cmd/gopacked
env GOOS=linux go build -o twitchparse maunium.net/go/gopacked/cmd/twitchparse
build-win: $(shell find -name "*.go")
env GOOS=windows go build -o gopacked.exe maunium.net/go/gopacked/cmd/gopacked
env GOOS=windows go build -o twitchparse.exe maunium.net/go/gopacked/cmd/twitchparse
build-macos: $(shell find -name "*.go")
env GOOS=darwin go build -o gopacked maunium.net/go/gopacked/cmd/gopacked
env GOOS=darwin go build -o twitchparse maunium.net/go/gopacked/cmd/twitchparse
debian: build-linux
mkdir -p build
mkdir -p package/usr/bin/
cp gopacked package/usr/bin/
cp twitchparse package/usr/bin/
dpkg-deb --build package gopacked.deb
mv gopacked.deb build/
linux: build-linux
mkdir -p build
tar cvfJ gopacked_linux.tar.xz gopacked twitchparse LICENSE README.md
mv gopacked_linux.tar.xz build/
windows: build-win
mkdir -p build
zip -9r gopacked_windows.zip gopacked.exe twitchparse.exe LICENSE README.md
mv gopacked_windows.zip build/
macos: build-macos
mkdir -p build
zip -9r gopacked_macos.zip gopacked twitchparse LICENSE README.md
mv gopacked_macos.zip build/
package: debian linux macos windows
clean:
rm -f gopacked twitchparse gopacked.exe twitchparse.exe
rm -rf build package/usr