Add AppImage recipe

pull/113/head
Miguel Mota 3 years ago
parent 2b6b7b629b
commit 1fb26e2918
No known key found for this signature in database
GPG Key ID: 67EC1161588A00F9

@ -0,0 +1,23 @@
app: cointop
ingredients:
script:
- LOGO_URL="https://raw.githubusercontent.com/miguelmota/cointop/master/assets/logos/cointop_icon.png"
- TAR_URL=$(wget -q "https://api.github.com/repos/miguelmota/cointop/releases/latest" -O - | grep -E "https.*cointop.*linux_amd64.tar.gz" | cut -d'"' -f4)
- wget -c $TAR_URL
- echo $TAR_URL | cut -d/ -f8 > VERSION
- tar zxvf cointop*tar.gz
- wget $LOGO_URL -O cointop.png
script:
- cp ../cointop usr/bin
- cp ../cointop.png .
- cat > cointop.desktop <<EOF
- [Desktop Entry]
- Type=Application
- Name=cointop
- Icon=cointop
- Exec=cointop %u
- Categories=Utility
- Comment=An interactive terminal based UI application for tracking cryptocurrencies
- EOF

4
.gitignore vendored

@ -55,6 +55,10 @@ build-dir
# do not ignore .rpm
# do not ignore .copr
# AppImage
*.AppImage
.appimage_workspace
todo.txt
docs/public

@ -236,7 +236,7 @@ docker-push:
docker-build-and-push: docker-build docker-push
docker-run-ssh:
docker run -p 2222:22 -v ~/.ssh/demo:/keys --entrypoint cointop -it cointop/cointop server -k /keys/id_rsa
docker run -p 2222:22 -v ~/.ssh/demo:/keys -v ~/.cache/cointop:/tmp/cointop_config --entrypoint cointop -it cointop/cointop server -k /keys/id_rsa
ssh-server:
go run cmd/cointop/cointop.go server -p 2222
@ -246,3 +246,26 @@ ssh-client:
mp3:
cat <(printf "package notifier\nfunc Mp3() string {\nreturn \`" "") <(xxd -p media/notification.mp3 | tr -d "\n") <(printf "\`\n}" "") > pkg/notifier/mp3.go
pkg2appimage-install:
wget -c https://github.com/$(wget -q https://github.com/AppImage/pkg2appimage/releases -O - | grep "pkg2appimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x pkg2appimage-*.AppImage
appimage-clean-workspace:
rm -rf .appimage_workspace
appimage-clean: appimage-clean-workspace
rm -rf *.AppImage
.PHONY: appimage
appimage: appimage-clean-workspace
( \
mkdir -p .appimage_workspace && \
mkdir -p dist/appimage && \
cd .appimage_workspace && \
../pkg2appimage-*.AppImage ../.appimage/cointop.yml && \
cp out/cointop-*.AppImage ../dist/appimage/ \
)
appimage-run:
./dist/appimage/cointop-*.AppImage

Loading…
Cancel
Save