Files
i2p.plugin.native/Makefile

183 lines
6.4 KiB
Makefile
Raw Normal View History

2021-06-25 19:09:54 -04:00
2021-06-27 17:16:39 -04:00
CGO_ENABLED=0
GOPATH=$(HOME)/go/
2021-06-27 17:16:39 -04:00
VERSION="0.0.001"
2021-06-25 19:09:54 -04:00
all: fmt build readme
build:
go build -o ./scripts/bin/i2p.plugin.native ./scripts/src
readme:
echo "I2P native plugin generation tool" | tee README.md
echo "=================================" | tee -a README.md
echo "" | tee -a README.md
2021-06-25 20:36:14 -04:00
echo "I wrote this way faster than I documented it. Shocking, right?" | tee -a README.md
echo "" | tee -a README.md
echo "This is a handy little tool for assembling I2P plugins when those" | tee -a README.md
echo "plugins don't have a clean way to interface with the JVM, or just don't" | tee -a README.md
echo "need one. Think of it a little like \`checkinstall\` but for I2P Plugins." | tee -a README.md
echo "Right now it mostly works, and it's pretty cleanly put together." | tee -a README.md
echo "" | tee -a README.md
2021-06-25 20:36:56 -04:00
echo "There are some examples in the Makefile for now." | tee -a README.md
echo "" | tee -a README.md
2021-06-25 20:36:14 -04:00
echo "Here's a copy of the usage while I work on a better README.md:" | tee -a README.md
echo "" | tee -a README.md
2021-06-25 22:07:59 -04:00
echo "\`\`\`markdown" | tee -a README.md
2021-06-25 19:09:54 -04:00
./scripts/bin/i2p.plugin.native -h 2>&1 | tee -a README.md
echo "\`\`\`" | tee -a README.md
examples: clean railroad-example brb-example railroad-example-win brb-example-win
railroad-lin:
cp -v $(GOPATH)src/i2pgit.org/idk/railroad/railroad .
2021-06-25 21:50:09 -04:00
railroad-example: all clean railroad-lin
2021-06-25 19:09:54 -04:00
./scripts/bin/i2p.plugin.native -name=railroad \
-signer=hankhill19580@gmail.com \
-version 0.0.031 \
-author=hankhill19580@gmail.com \
-autostart=true \
-clientname=railroad \
-consolename="Railroad Blog" \
-delaystart="1" \
-desc="`cat desc)`" \
2021-06-25 19:09:54 -04:00
-exename=railroad \
2021-06-28 14:15:55 -04:00
-command="\$$PLUGIN/lib/railroad -socksport 8082" \
2021-06-25 20:31:37 -04:00
-license=MIT \
2021-06-25 19:09:54 -04:00
-res=config
cp -v *.su3 ../railroad-linux.su3
unzip -o railroad.zip -d railroad-zip
2021-06-25 20:31:37 -04:00
brb-lin:
cp -v $(GOPATH)src/github.com/eyedeekay/brb/brb .
brb-example: all clean brb-lin
2021-06-25 20:31:37 -04:00
./scripts/bin/i2p.plugin.native -name=brb \
-signer=hankhill19580@gmail.com \
-version 0.0.09 \
-author=hankhill19580@gmail.com \
-autostart=true \
-clientname=brb \
-command="\$$PLUGIN/lib/brb -dir=\$$PLUGIN/lib -eris=true -i2psite=true" \
2021-06-25 20:31:37 -04:00
-consolename="BRB IRC" \
-delaystart="1" \
-desc="`cat ircdesc`" \
2021-06-25 20:31:37 -04:00
-exename=brb \
-license=MIT
cp -v *.su3 ../brb-linux.su3
unzip -o brb.zip -d brb-zip
railroad-win:
cp -v $(GOPATH)src/i2pgit.org/idk/railroad/railroad.exe .
railroad-example-win: all clean railroad-win
./scripts/bin/i2p.plugin.native -name=railroad \
-signer=hankhill19580@gmail.com \
-version 0.0.031 \
-author=hankhill19580@gmail.com \
-autostart=true \
2021-06-25 23:55:40 -04:00
-clientname=railroad.exe \
-consolename="Railroad Blog" \
-delaystart="1" \
-desc="`cat desc)`" \
-exename=railroad.exe \
2021-06-28 14:15:55 -04:00
-command="\$$PLUGIN/lib/railroad -socksport 8082" \
-license=MIT \
-targetos="windows" \
-res=config
cp -v *.su3 ../railroad-windows.su3
2021-06-25 23:55:40 -04:00
unzip -o railroad.zip -d railroad-zip-win
brb-win:
cp -v $(GOPATH)src/github.com/eyedeekay/brb/brb.exe .
brb-example-win: all clean brb-win
./scripts/bin/i2p.plugin.native -name=brb \
-signer=hankhill19580@gmail.com \
-version 0.0.09 \
-author=hankhill19580@gmail.com \
-autostart=true \
2021-06-25 23:55:40 -04:00
-clientname=brb.exe \
-command="\$$PLUGIN/lib/brb.exe -dir=\$$PLUGIN/lib -eris=true -i2psite=true" \
-consolename="BRB IRC" \
-delaystart="1" \
-desc="`cat ircdesc`" \
2021-06-25 23:55:40 -04:00
-exename=brb.exe \
-license=MIT \
-targetos="windows" \
-res=windll
cp -v *.su3 ../brb-windows.su3
2021-06-25 23:55:40 -04:00
unzip -o brb.zip -d brb-zip-win
2021-06-25 20:31:37 -04:00
2021-06-25 21:50:09 -04:00
clean:
rm -rf plugin *.zip *.su3
2021-06-25 19:09:54 -04:00
fmt:
2021-06-27 17:16:39 -04:00
find . -name '*.go' -exec gofmt -w -s {} \;
export sumrrlinux=`sha256sum "../railroad-linux.su3"`
export sumrrwindows=`sha256sum "../railroad-windows.su3"`
export sumbblinux=`sha256sum "../brb-linux.su3"`
export sumbbwindows=`sha256sum "../brb-windows.su3"`
upload:
gothub upload -R -u eyedeekay -r "railroad" -t 0.0.031 -l "$(sumrrlinux)" -n "railroad-linux.su3" -f "../railroad-linux.su3"
gothub upload -R -u eyedeekay -r "railroad" -t 0.0.031 -l "$(sumrrwindows)" -n "railroad-windows.su3" -f "../railroad-windows.su3"
gothub upload -R -u eyedeekay -r "brb" -t v0.0.09 -l "$(sumbblinux)" -n "brb-linux.su3" -f "../brb-linux.su3"
gothub upload -R -u eyedeekay -r "brb" -t v0.0.09 -l "$(sumbbwindows)" -n "brb-windows.su3" -f "../brb-windows.su3"
karens: fmt
GOOS=windows go build -o karen.exe -ldflags "-extldflags -static" -tags netgo ./scripts/src/karen
GOOS=linux go build -o karen -ldflags "-extldflags -static" -tags netgo ./scripts/src/karen
GOOS=darwin go build -o karen-darwin -ldflags "-extldflags -static" -tags netgo ./scripts/src/karen
file karen*
export sumklinux=`sha256sum "karen"`
export sumkwindows=`sha256sum "karen.exe"`
2021-06-27 17:17:45 -04:00
export sumkdarwin=`sha256sum "karen-darwin"`
2021-06-27 17:16:39 -04:00
upload-karens: karens
gothub release -u eyedeekay -r "i2p.plugin.native" -t v$(VERSION) -d "I2P Plugin Generator and Supervisor"
gothub upload -R -u eyedeekay -r "i2p.plugin.native" -t v$(VERSION) -l "$(sumklinux)" -n "karen" -f "karen"
gothub upload -R -u eyedeekay -r "i2p.plugin.native" -t v$(VERSION) -l "$(sumkwindows)" -n "karen.exe" -f "karen.exe"
2021-06-27 17:17:45 -04:00
gothub upload -R -u eyedeekay -r "i2p.plugin.native" -t v$(VERSION) -l "$(sumkdarwin)" -n "karen-darwin" -f "karen-darwin"
snowflake-win:
cp -v $(GOPATH)src/gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/proxy/proxy.exe ./snowflake.exe
snowflake-example-win: all clean snowflake-win
./scripts/bin/i2p.plugin.native -name=snowflake \
-signer=hankhill19580@gmail.com \
-version 0.0.031 \
-author=hankhill19580@gmail.com \
-autostart=true \
-clientname=snowflake.exe \
-consolename="Snowflake Donor" \
-delaystart="1" \
-desc="`cat snowdesc)`" \
-exename=snowflake.exe \
-command="\$$PLUGIN/lib/snowflake.exe -log \$$PLUGIN/lib/snowflake.log" \
-license=MIT \
-targetos="windows"
cp -v *.su3 ../snowflake-windows.su3
unzip -o snowflake.zip -d snowflake-zip-win
snowflake-lin:
cp -v $(GOPATH)src/gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/proxy/proxy ./snowflake
snowflake-example: all clean snowflake-lin
./scripts/bin/i2p.plugin.native -name=snowflake \
-signer=hankhill19580@gmail.com \
-version 0.0.031 \
-author=hankhill19580@gmail.com \
-autostart=true \
-clientname=snowflake \
-consolename="Snowflake Donor" \
-delaystart="1" \
-desc="`cat snowdesc)`" \
-exename=snowflake \
-command="\$$PLUGIN/lib/snowflake -log \$$PLUGIN/lib/snowflake.log" \
-license=MIT
cp -v *.su3 ../snowflake-linux.su3
unzip -o snowflake.zip -d snowflake-zip