Bug 229766 - [NEW PORT] finance/cointop: A lightweight terminal UI that shows cryptocurrency values in realtime
Summary: [NEW PORT] finance/cointop: A lightweight terminal UI that shows cryptocurren...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-14 06:29 UTC by Nathan
Modified: 2018-08-22 19:44 UTC (History)
3 users (show)

See Also:


Attachments
Cointop new diff (2.73 KB, text/plain)
2018-07-14 07:04 UTC, Nathan
no flags Details
New port for finance/cointop (2.73 KB, text/plain)
2018-07-14 17:26 UTC, Nathan
no flags Details
Patch to create the port (3.27 KB, text/plain)
2018-07-15 16:29 UTC, Nathan
no flags Details
Patch to update (3.27 KB, patch)
2018-07-22 01:09 UTC, Nathan
no flags Details | Diff
svn diff that works for me (3.27 KB, patch)
2018-07-22 02:06 UTC, Vidar Karlsen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan 2018-07-14 06:29:26 UTC
Listed in https://wiki.freebsd.org/WantedPorts
is cointop. This is a package to to fullfil the request

It may be listed in the wrong category
Comment 1 Nathan 2018-07-14 07:04:32 UTC
Created attachment 195124 [details]
Cointop new diff
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2018-07-14 12:12:53 UTC
Give this PR a better Summary.
Comment 3 Nathan 2018-07-14 15:53:03 UTC
(In reply to Mark Linimon from comment #2)
Updated PR summary
Comment 4 Nathan 2018-07-14 17:26:16 UTC
Created attachment 195127 [details]
New port for finance/cointop
Comment 5 Nathan 2018-07-14 17:26:53 UTC
Changed attachment due to adding different email to control possible spam in future
Comment 6 Nathan 2018-07-15 16:28:22 UTC
Comment on attachment 195127 [details]
New port for finance/cointop

>Index: finance/cointop/Makefile
>===================================================================
>--- finance/cointop/Makefile	(nonexistent)
>+++ finance/cointop/Makefile	(working copy)
>@@ -0,0 +1,31 @@
>+# $FreeBSD$
>+
>+PORTNAME=	cointop
>+PORTVERSION=	1.0.6
>+CATEGORIES=	finance
>+
>+MAINTAINER=	ndowens.fbsd@yandex.com
>+COMMENT=	Light cryptocurrency coin stats
>+
>+LICENSE=	APACHE20
>+LICENSE_FILE=	${WRKSRC}/LICENSE.md
>+
>+USES=		go
>+USE_GITHUB=	yes
>+GH_ACCOUNT=	miguelmota
>+GH_PROJECT=	cointop
>+
>+PLIST=		bin/cointop
>+
>+do-build:
>+	 	@${MKDIR} ${WRKSRC}/github.com/${GH_ACCOUNT}
>+		@${RLN} ${WRKSRC} ${WRKSRC}/github.com/${GH_ACCOUNT}/${PORTNAME}
>+		@${RLN} ${WRKSRC} ${WRKSRC}/src
>+		cd ${WRKSRC} && \
>+			${SETENV} ${MAKE_ENV} ${GO_ENV} CGO_ENABLED=0 GOPATH=${WRKSRC} \
>+			${GO_CMD} build -ldflags "-X main.Version=${DISTVERSION}" -o bin/${PORTNAME}
>+
>+do-install:
>+		${INSTALL_PROGRAM} ${WRKSRC}/bin/cointop ${DESTDIR}/${PREFIX}/bin/
>+
>+.include <bsd.port.mk>
>
>Property changes on: finance/cointop/Makefile
>___________________________________________________________________
>Added: svn:eol-style
>## -0,0 +1 ##
>+native
>\ No newline at end of property
>Added: svn:keywords
>## -0,0 +1 ##
>+FreeBSD=%H
>\ No newline at end of property
>Added: svn:mime-type
>## -0,0 +1 ##
>+text/plain
>\ No newline at end of property
>Index: finance/cointop/distinfo
>===================================================================
>--- finance/cointop/distinfo	(nonexistent)
>+++ finance/cointop/distinfo	(working copy)
>@@ -0,0 +1,3 @@
>+TIMESTAMP = 1531543729
>+SHA256 (miguelmota-cointop-1.0.6_GH0.tar.gz) = 6188f21e7fcdfe686324a30a5ccc89a684e2a9acd81f2b042309ec0b28c26272
>+SIZE (miguelmota-cointop-1.0.6_GH0.tar.gz) = 3988031
>
>Property changes on: finance/cointop/distinfo
>___________________________________________________________________
>Added: fbsd:nokeywords
>## -0,0 +1 ##
>+yes
>\ No newline at end of property
>Added: svn:eol-style
>## -0,0 +1 ##
>+native
>\ No newline at end of property
>Added: svn:mime-type
>## -0,0 +1 ##
>+text/plain
>\ No newline at end of property
>Index: finance/cointop/pkg-descr
>===================================================================
>--- finance/cointop/pkg-descr	(nonexistent)
>+++ finance/cointop/pkg-descr	(working copy)
>@@ -0,0 +1,5 @@
>+WWW: https://github.com/miguelmota/cointop
>+
>+Fast and lightweight terminal based UI application
>+for tracking and monitoring cryptocurrency coins
>+in real-time; inspired by htop with vim-inspired keys
>
>Property changes on: finance/cointop/pkg-descr
>___________________________________________________________________
>Added: fbsd:nokeywords
>## -0,0 +1 ##
>+yes
>\ No newline at end of property
>Added: svn:eol-style
>## -0,0 +1 ##
>+native
>\ No newline at end of property
>Added: svn:mime-type
>## -0,0 +1 ##
>+text/plain
>\ No newline at end of property
Comment 7 Nathan 2018-07-15 16:28:36 UTC
Comment on attachment 195127 [details]
New port for finance/cointop

>Index: finance/cointop/Makefile
>===================================================================
>--- finance/cointop/Makefile	(nonexistent)
>+++ finance/cointop/Makefile	(working copy)
>@@ -0,0 +1,31 @@
>+# $FreeBSD$
>+
>+PORTNAME=	cointop
>+PORTVERSION=	1.0.6
>+CATEGORIES=	finance
>+
>+MAINTAINER=	ndowens.fbsd@yandex.com
>+COMMENT=	Light cryptocurrency coin stats
>+
>+LICENSE=	APACHE20
>+LICENSE_FILE=	${WRKSRC}/LICENSE.md
>+
>+USES=		go
>+USE_GITHUB=	yes
>+GH_ACCOUNT=	miguelmota
>+GH_PROJECT=	cointop
>+
>+PLIST=		bin/cointop
>+
>+do-build:
>+	 	@${MKDIR} ${WRKSRC}/github.com/${GH_ACCOUNT}
>+		@${RLN} ${WRKSRC} ${WRKSRC}/github.com/${GH_ACCOUNT}/${PORTNAME}
>+		@${RLN} ${WRKSRC} ${WRKSRC}/src
>+		cd ${WRKSRC} && \
>+			${SETENV} ${MAKE_ENV} ${GO_ENV} CGO_ENABLED=0 GOPATH=${WRKSRC} \
>+			${GO_CMD} build -ldflags "-X main.Version=${DISTVERSION}" -o bin/${PORTNAME}
>+
>+do-install:
>+		${INSTALL_PROGRAM} ${WRKSRC}/bin/cointop ${DESTDIR}/${PREFIX}/bin/
>+
>+.include <bsd.port.mk>
>
>Property changes on: finance/cointop/Makefile
>___________________________________________________________________
>Added: svn:eol-style
>## -0,0 +1 ##
>+native
>\ No newline at end of property
>Added: svn:keywords
>## -0,0 +1 ##
>+FreeBSD=%H
>\ No newline at end of property
>Added: svn:mime-type
>## -0,0 +1 ##
>+text/plain
>\ No newline at end of property
>Index: finance/cointop/distinfo
>===================================================================
>--- finance/cointop/distinfo	(nonexistent)
>+++ finance/cointop/distinfo	(working copy)
>@@ -0,0 +1,3 @@
>+TIMESTAMP = 1531543729
>+SHA256 (miguelmota-cointop-1.0.6_GH0.tar.gz) = 6188f21e7fcdfe686324a30a5ccc89a684e2a9acd81f2b042309ec0b28c26272
>+SIZE (miguelmota-cointop-1.0.6_GH0.tar.gz) = 3988031
>
>Property changes on: finance/cointop/distinfo
>___________________________________________________________________
>Added: fbsd:nokeywords
>## -0,0 +1 ##
>+yes
>\ No newline at end of property
>Added: svn:eol-style
>## -0,0 +1 ##
>+native
>\ No newline at end of property
>Added: svn:mime-type
>## -0,0 +1 ##
>+text/plain
>\ No newline at end of property
>Index: finance/cointop/pkg-descr
>===================================================================
>--- finance/cointop/pkg-descr	(nonexistent)
>+++ finance/cointop/pkg-descr	(working copy)
>@@ -0,0 +1,5 @@
>+WWW: https://github.com/miguelmota/cointop
>+
>+Fast and lightweight terminal based UI application
>+for tracking and monitoring cryptocurrency coins
>+in real-time; inspired by htop with vim-inspired keys
>
>Property changes on: finance/cointop/pkg-descr
>___________________________________________________________________
>Added: fbsd:nokeywords
>## -0,0 +1 ##
>+yes
>\ No newline at end of property
>Added: svn:eol-style
>## -0,0 +1 ##
>+native
>\ No newline at end of property
>Added: svn:mime-type
>## -0,0 +1 ##
>+text/plain
>\ No newline at end of property
Comment 8 Nathan 2018-07-15 16:29:17 UTC
Created attachment 195155 [details]
Patch to create the port
Comment 9 Vidar Karlsen 2018-07-22 00:24:51 UTC
The patch doesn't apply cleanly. I get the following message:
> patch: **** malformed patch at line 49: @@ -0,0 +1, @@
and pkg-plist ends up being empty.

I populated it by hand and it then builds fine on the following versions (poudriere testport):
10.4: amd64, i386
11.1: amd64, i386 
11.2: amd64, i386

It won't run inside my poudriere jails, it just throws this message:
> 2018/07/21 21:30:56 failed to ping

I haven't looked into why this happens, but it runs and works fine outside the jails (only tested on 11.2).
Comment 10 Nathan 2018-07-22 01:09:38 UTC
Created attachment 195351 [details]
Patch to update
Comment 11 Nathan 2018-07-22 01:10:37 UTC
(In reply to Vidar Karlsen from comment #9)
See if this patch causes you issues or not. I deleted my finance/cointop after creating it and it seems to patch fine, for some reason there is *.orig files there?
Comment 12 Vidar Karlsen 2018-07-22 02:04:30 UTC
(In reply to Nathan from comment #11)
pkg-plist still doesn't get created properly here. How was the patch created?
This is what happens when I apply the patch from attachment 195351 [details]:

root@desk /ports# svn patch /tmp/att195351.patch
A         finance/cointop
A         finance/cointop/Makefile
A         finance/cointop/distinfo
A         finance/cointop/pkg-descr
root@desk /ports#

I'll attach one that seems to work:
root@desk /ports# svn patch /tmp/finance_cointop.svn_diff
A         finance/cointop
A         finance/cointop/Makefile
A         finance/cointop/distinfo
A         finance/cointop/pkg-descr
A         finance/cointop/pkg-plist
root@desk /ports#

I checked out a fresh and clean ports tree to make sure the problem wasn't something I had fubared on my box.
Comment 13 Vidar Karlsen 2018-07-22 02:06:24 UTC
Created attachment 195354 [details]
svn diff that works for me

This patch works for me
Comment 14 Nathan 2018-07-22 02:09:50 UTC
(In reply to Vidar Karlsen from comment #13)
What i do is make sure I'm in the /usr/port root dir, after running svn add . inside the new port, and do svn diff finance/cointop > /home/..../name.diff
Comment 15 Vidar Karlsen 2018-07-22 02:13:36 UTC
(In reply to Nathan from comment #14)
Ok, this is weird.
Those two patches are identical.
I just noticed that clicking the attachment name gives the literal attachment, but clicking "Diff" and then "Raw Unified" (which points to https://bz-attachments.freebsd.org/attachment.cgi?id=195351&action=diff&format=raw&headers=1 ) gives a somewhat processed (mangled or cropped) version of the patch, which in this case doesn't work properly.
Comment 16 Nathan 2018-07-22 02:18:45 UTC
(In reply to Vidar Karlsen from comment #15)
Do Diff then select view. That's how my diff file looks and should work for ya then. If you do the way ya said it won't work as the diff isn't the same as I sent
Comment 17 commit-hook freebsd_committer freebsd_triage 2018-08-22 19:43:33 UTC
A commit references this bug:

Author: swills
Date: Wed Aug 22 19:42:49 UTC 2018
New revision: 477816
URL: https://svnweb.freebsd.org/changeset/ports/477816

Log:
  finance/cointop: terminal UI showing cryptocurrency values in realtime

  PR:		229766
  Submitted by:	Nathan <ndowens@yahoo.com>

Changes:
  head/finance/Makefile
  head/finance/cointop/
  head/finance/cointop/Makefile
  head/finance/cointop/distinfo
  head/finance/cointop/pkg-descr
Comment 18 Steve Wills freebsd_committer freebsd_triage 2018-08-22 19:44:02 UTC
Committed, thanks!