summaryrefslogtreecommitdiff
path: root/textproc/moor/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/moor/Makefile')
-rw-r--r--textproc/moor/Makefile43
1 files changed, 43 insertions, 0 deletions
diff --git a/textproc/moor/Makefile b/textproc/moor/Makefile
new file mode 100644
index 000000000000..ad9560168c00
--- /dev/null
+++ b/textproc/moor/Makefile
@@ -0,0 +1,43 @@
+PORTNAME= moor
+DISTVERSIONPREFIX= v
+DISTVERSION= 2.5.1
+PORTREVISION= 1
+CATEGORIES= textproc
+
+MAINTAINER= nxjoseph@protonmail.com
+COMMENT= Pager designed to do the right thing without any configuration
+WWW= https://github.com/walles/moor
+
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= go:modules
+
+GO_MODULE= github.com/walles/${PORTNAME}/v2
+GO_TARGET= ./cmd/${PORTNAME}
+GO_BUILDFLAGS= -ldflags="-s -w -X main.versionString=${DISTVERSIONFULL}"
+
+PLIST_FILES= bin/${PORTNAME} \
+ share/man/man1/${PORTNAME}.1.gz
+PORTEXAMPLES= *
+
+OPTIONS_DEFINE= EXAMPLES
+OPTIONS_SUB= yes
+
+post-extract:
+ @cd ${WRKSRC}/sample-files && \
+ ${LN} -s compressed.txt.zst compressed.txt.zstd
+
+post-patch:
+ @${REINPLACE_CMD} -e '22s,".*","${WRKSRC}/sample-files",g' \
+ ${WRKSRC}/internal/reader/reader_test.go
+
+post-install:
+ ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 \
+ ${STAGEDIR}${MANDIRS}/man1
+
+post-install-EXAMPLES-on:
+ @cd ${WRKSRC}/sample-files && \
+ ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>