aboutsummaryrefslogtreecommitdiff
path: root/sysutils/frand
diff options
context:
space:
mode:
authorRodrigo Osorio <rodrigo@FreeBSD.org>2019-08-18 10:34:06 +0000
committerRodrigo Osorio <rodrigo@FreeBSD.org>2019-08-18 10:34:06 +0000
commit0b70d2a5dac81c44f8280144357d1a2a67d01ac6 (patch)
tree927c723e3221d7a53ebeccd99d4bb558d467f9b7 /sysutils/frand
parentf08e93892730869795d92878b76fec869dc2c002 (diff)
downloadports-0b70d2a5dac81c44f8280144357d1a2a67d01ac6.tar.gz
ports-0b70d2a5dac81c44f8280144357d1a2a67d01ac6.zip
Add new port sysutils/frand
frand is a command line tool who returns a random file from a given directory using the reservoir sampling algorithm. With reservoir sampling algorithm, directory contents doesn't need to be read in memory then sorted and so will perform much better than find+sort for directories with a large amount of files. PR: 239467 Submitted by: serpent7776@gmail.com
Notes
Notes: svn path=/head/; revision=509198
Diffstat (limited to 'sysutils/frand')
-rw-r--r--sysutils/frand/Makefile25
-rw-r--r--sysutils/frand/distinfo5
-rw-r--r--sysutils/frand/pkg-descr5
-rw-r--r--sysutils/frand/pkg-plist2
4 files changed, 37 insertions, 0 deletions
diff --git a/sysutils/frand/Makefile b/sysutils/frand/Makefile
new file mode 100644
index 000000000000..9c87aff4cac4
--- /dev/null
+++ b/sysutils/frand/Makefile
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+PORTNAME= frand
+PORTVERSION= 0.1
+DISTVERSIONPREFIX= v
+CATEGORIES= sysutils
+
+MAINTAINER= serpent7776@gmail.com
+COMMENT= Selects a random file using reservoir sampling algorithm
+
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs
+
+USES= cmake
+
+USE_GITHUB= yes
+GH_ACCOUNT= serpent7776
+GH_PROJECT= frand StreamSampler:StreamSampler
+GH_TAGNAME= 919a0f1ba6bb3ae63b4708722e9a7d49164ca92d:StreamSampler
+GH_ACCOUNT_StreamSampler= LiorKogan
+GH_SUBDIR_StreamSampler= lib/StreamSampler
+
+.include <bsd.port.mk>
diff --git a/sysutils/frand/distinfo b/sysutils/frand/distinfo
new file mode 100644
index 000000000000..8295bf2a88d5
--- /dev/null
+++ b/sysutils/frand/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1564056505
+SHA256 (serpent7776-frand-v0.1_GH0.tar.gz) = 62a114ad80443b8e3fffa56ca3182e4e7294d1a3ba4b92cdb4e1cbe625794389
+SIZE (serpent7776-frand-v0.1_GH0.tar.gz) = 2225
+SHA256 (LiorKogan-StreamSampler-919a0f1ba6bb3ae63b4708722e9a7d49164ca92d_GH0.tar.gz) = 654ac0c0c0f161ef40c4d3fd4632d71cdf59c9cbe1108b47ba44b7f9f10f1d73
+SIZE (LiorKogan-StreamSampler-919a0f1ba6bb3ae63b4708722e9a7d49164ca92d_GH0.tar.gz) = 36890
diff --git a/sysutils/frand/pkg-descr b/sysutils/frand/pkg-descr
new file mode 100644
index 000000000000..42917ce9aad0
--- /dev/null
+++ b/sysutils/frand/pkg-descr
@@ -0,0 +1,5 @@
+Selects a random file from given directory using reservoir sampling algorithm.
+This means directory contents doesn't need to be read in memory and then sorted
+and so will perform much better than find+sort for big directories.
+
+WWW: https://github.com/serpent7776/frand
diff --git a/sysutils/frand/pkg-plist b/sysutils/frand/pkg-plist
new file mode 100644
index 000000000000..d34420dff9e6
--- /dev/null
+++ b/sysutils/frand/pkg-plist
@@ -0,0 +1,2 @@
+@comment $FreeBSD$
+bin/frand