From dc02e6a1c09fdd79866095f2f1d5f58b59a3f373 Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Mon, 21 May 2018 01:23:39 -0700 Subject: [PATCH] project pages + copr install --- .../com.github.miguelmota.Cointop.appdata.xml | 0 .../com.github.miguelmota.Cointop.desktop | 0 .../com.github.miguelmota.Cointop.json | 0 .gitignore | 3 ++ .rpm/cointop.spec | 37 +++++++++++++++++++ Makefile | 17 +++++++++ README.md | 8 +++- 7 files changed, 63 insertions(+), 2 deletions(-) rename {flathub => .flathub}/com.github.miguelmota.Cointop.appdata.xml (100%) rename {flathub => .flathub}/com.github.miguelmota.Cointop.desktop (100%) rename {flathub => .flathub}/com.github.miguelmota.Cointop.json (100%) create mode 100644 .rpm/cointop.spec diff --git a/flathub/com.github.miguelmota.Cointop.appdata.xml b/.flathub/com.github.miguelmota.Cointop.appdata.xml similarity index 100% rename from flathub/com.github.miguelmota.Cointop.appdata.xml rename to .flathub/com.github.miguelmota.Cointop.appdata.xml diff --git a/flathub/com.github.miguelmota.Cointop.desktop b/.flathub/com.github.miguelmota.Cointop.desktop similarity index 100% rename from flathub/com.github.miguelmota.Cointop.desktop rename to .flathub/com.github.miguelmota.Cointop.desktop diff --git a/flathub/com.github.miguelmota.Cointop.json b/.flathub/com.github.miguelmota.Cointop.json similarity index 100% rename from flathub/com.github.miguelmota.Cointop.json rename to .flathub/com.github.miguelmota.Cointop.json diff --git a/.gitignore b/.gitignore index fe1cfb1..e8af3a9 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ bin .flatpak-builder build-dir #repo +# do not ignore .flathub +# do not ignore .rpm +# do not ignore .copr diff --git a/.rpm/cointop.spec b/.rpm/cointop.spec new file mode 100644 index 0000000..57f405f --- /dev/null +++ b/.rpm/cointop.spec @@ -0,0 +1,37 @@ +%global commit cf0ad3b8a1cd8bc11d2eb59c3790785d6509fdf8 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: cointop +Version: 1.0.5 +Release: 6%{?dist} +Summary: Terminal based application for tracking cryptocurrencies +License: Apache-2.0 +URL: https://cointop.sh +Source0: https://github.com/miguelmota/%{cointop}/archive/%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: golang >= 1.9-10 + +%description +cointop is a fast and lightweight interactive terminal based UI application for tracking and monitoring cryptocurrency coin stats in real-time. + +%prep +%setup -q -n %{name}-%{version} + +%build +mkdir -p ./_build/src/github.com/miguelmota +ln -s $(pwd) ./_build/src/github.com/miguelmota/%{name} + +export GOPATH=$(pwd)/_build:%{gopath} +go build -ldflags=-linkmode=external -o x . + +%install +install -d %{buildroot}%{_bindir} +install -p -m 0755 ./x %{buildroot}%{_bindir}/%{name} + +%files +%defattr(-,root,root,-) +%doc LICENSE.md README.md +%{_bindir}/%{name} + +%changelog diff --git a/Makefile b/Makefile index aad477f..8759133 100644 --- a/Makefile +++ b/Makefile @@ -73,6 +73,23 @@ flatpak/install: flatpak/run: flatpak run com.github.miguelmota.Cointop +rpm/deps: + sudo dnf install copr-cli + sudo dnf install rpm-build + sudo dnf install dnf-plugins-core + +rpm/build: + rpmbuild -ba cointop.spec + +copr/create-project: + copr-cli create cointop --chroot fedora-rawhide-x86_64 + +copr/build: + rm -rf ~/rpmbuild/SRPMS/cointop-*.rpm + copr-cli build cointop ~/rpmbuild/SRPMS/cointop-*.rpm + +copr/publish: + brew/clean: brew/remove brew cleanup --force cointop brew prune diff --git a/README.md b/README.md index 60ce533..d1ddb2d 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,8 @@ Run cointop flatpak flatpak run com.github.miguelmota.Cointop ``` - + +cointop copr [project page](https://copr.fedorainfracloud.org/coprs/miguelmota/cointop/). ### Snap (Ubuntu) @@ -124,6 +126,8 @@ Running snap: sudo snap run cointop ``` +cointop snapcraft [project page](https://snapcraft.io/cointop). + Note: snaps don't work in Windows WSL. See this [issue thread](https://forum.snapcraft.io/t/windows-subsystem-for-linux/216). ### Windows WSL (Windows)