forked from lmas/feedloggr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
91 lines (72 loc) · 2.97 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
90
91
GO111MODULE=on
REPO_NAME=feedloggr
USER_GH=eyedeekay
VERSION=0.0.48
PWD=`pwd`
ARG=-v -tags netgo,osusergo -ldflags '-w -s -extldflags "-static"'
CGO=0
all: plugins winplugin linplugin
plugins: clean index
winplugin: plugins
GOOS=windows GOARCH=amd64 make windows feedloggr-plugin
linplugin: plugins
GOOS=linux GOARCH=amd64 make feedloggr feedloggr-plugin
clean:
rm -frv proxy proxy.exe feedloggr feedloggr.exe feedloggr-windows feedloggr-windows.exe $(REPO_NAME) $(REPO_NAME).exe plugin feedloggr-zip feedloggr-zip-win *.su3 *.zip
find . -name '*.go' -exec gofmt -w -s {} \;
feedloggr:
go build $(ARG) -o feedloggr-$(GOOS) ./cmd/feedloggr
rb:
/usr/lib/go-1.16/bin/go build $(ARG) -o feedloggr-$(GOOS) ./cmd/feedloggr
windows:
GOOS=windows GOARCH=amd64 make feedloggr
SIGNER_DIR=$(HOME)/i2p-go-keys/
feedloggr-plugin: res
i2p.plugin.native -name=feedloggr-$(GOOS) \
-signer=hankhill19580@gmail.com \
-signer-dir=$(SIGNER_DIR) \
-version="$(VERSION)" \
-author=hankhill19580@gmail.com \
-autostart=true \
-clientname=feedloggr-$(GOOS) \
-consolename="feedloggr RSS feed" \
-consoleurl="http://127.0.0.1:7681" \
-icondata="icon/icon.png" \
-delaystart="1" \
-desc="`cat desc`" \
-exename=feedloggr-$(GOOS) \
-website="http://idk.i2p/feedloggr/" \
-updateurl=http://idk.i2p/feedloggr/feedloggr-$(GOOS).su3 \
-command="feedloggr-$(GOOS) -config \$$PLUGIN/anon-feedloggr.conf -dir \$$I2P/eepsite/docroot/rss" \
-license=MIT \
-res=tmp/
unzip -o feedloggr-$(GOOS).zip -d feedloggr-$(GOOS)-zip
res:
mkdir -p tmp
cp anon-feedloggr.conf tmp/anon-feedloggr.conf
cp LICENSE tmp/LICENSE
index:
@echo "<!DOCTYPE html>" > index.html
@echo "<html>" >> index.html
@echo "<head>" >> index.html
@echo " <title>$(REPO_NAME)</title>" >> index.html
@echo " <link rel=\"stylesheet\" type=\"text/css\" href =\"home.css\" />" >> index.html
@echo "</head>" >> index.html
@echo "<body>" >> index.html
markdown README.md | tee -a index.html
@echo "</body>" >> index.html
@echo "</html>" >> index.html
export sumsflinux=`sha256sum "./feedloggr-linux.su3"`
export sumsfwindows=`sha256sum "./feedloggr-windows.su3"`
export sumsflinuxbin=`sha256sum "./feedloggr-linux"`
export sumsfwindowsbin=`sha256sum "./feedloggr-windows.exe"`
release: all version upload-plugins
version:
cat README.md | gothub release -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(REPO_NAME) -t v$(VERSION) -d -; true
download-su3s:
upload-su3s: upload-plugins
upload-plugins:
gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t v$(VERSION) -l "$(sumsflinux)" -n "feedloggr-linux.su3" -f "./feedloggr-linux.su3"
gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t v$(VERSION) -l "$(sumsfwindows)" -n "feedloggr-windows.su3" -f "./feedloggr-windows.su3"
gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t v$(VERSION) -l "$(sumsfwindowsbin)" -n "feedloggr-windows.exe" -f "./feedloggr-windows.exe"
gothub upload -R -u $(USER_GH) -r "$(REPO_NAME)" -t v$(VERSION) -l "$(sumsflinuxbin)" -n "feedloggr-linux" -f "./feedloggr-windows"