aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroki Tagato <tagattie@FreeBSD.org>2025-09-17 02:10:15 +0000
committerHiroki Tagato <tagattie@FreeBSD.org>2025-09-17 02:14:53 +0000
commit69c6b53b77126e6cac417511f43971452663c41e (patch)
tree9894ea384f2cda314458d667c672f56f7d79f0da
parent5d2875bfdd1385fdc179d0b3ff9d357d029ba5a4 (diff)
sysutils/elephant: add port: Powerful data provider service and backend for application launchers
Elephant - cuz it's phat - is a powerful data provider service and backend for building custom application launchers and desktop utilities. It provides various data sources and actions through a plugin-based architecture, communicating via Unix sockets and Protocol Buffers. Elephant acts as a unified backend service that aggregates data from various sources (desktop applications, files, clipboard history, etc.) and provides a consistent interface for frontend applications like custom launchers, productivity tools, or desktop widgets. WWW: https://github.com/abenz1267/elephant
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/elephant/Makefile90
-rw-r--r--sysutils/elephant/distinfo5
-rw-r--r--sysutils/elephant/pkg-descr10
4 files changed, 106 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 3594a72a0159..a1b45d449a73 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -352,6 +352,7 @@
SUBDIR += egress-monitor
SUBDIR += eject
SUBDIR += eksctl
+ SUBDIR += elephant
SUBDIR += elfx86exts
SUBDIR += endian
SUBDIR += enteruser
diff --git a/sysutils/elephant/Makefile b/sysutils/elephant/Makefile
new file mode 100644
index 000000000000..a5090ec297f0
--- /dev/null
+++ b/sysutils/elephant/Makefile
@@ -0,0 +1,90 @@
+PORTNAME= elephant
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.0.4
+CATEGORIES= sysutils
+
+MAINTAINER= tagattie@FreeBSD.org
+COMMENT= Powerful data provider service and backend for application launchers
+WWW= https://github.com/abenz1267/elephant
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+NOT_FOR_ARCHS= i386
+NOT_FOR_ARCHS_REASON= -buildmode=plugin not supported on freebsd/386
+
+USES= go:1.25,modules
+
+GO_MODULE= github.com/abenz1267/elephant
+GO_TARGET= ./cmd/elephant
+
+PLIST_FILES= bin/${PORTNAME}
+PORTDOCS= README.md
+
+OPTIONS_DEFINE= DOCS
+OPTIONS_DEFAULT= ${OPTIONS_GROUP_PROVIDERS}
+OPTIONS_GROUP= PROVIDERS
+OPTIONS_GROUP_PROVIDERS=CALC CLIPBOARD DESKTOPAPPLICATIONS FILES MENUS \
+ PROVIDERLIST RUNNER SYMBOLS TODO UNICODE WEBSEARCH
+
+PROVIDERS_DESC= Enabled providers
+CALC_DESC= Perform calculation and unit-conversions
+CLIPBOARD_DESC= Store clipboard history
+DESKTOPAPPLICATIONS_DESC=Run installed desktop applications
+FILES_DESC= Find files/folders
+MENUS_DESC= Create custom menus
+PROVIDERLIST_DESC= Lists all providers and configured menus
+RUNNER_DESC= Execute everything installed in your PATH
+SYMBOLS_DESC= Search for emojis and symbols
+TODO_DESC= Basic Todolist
+UNICODE_DESC= Search for unicode symbols
+WEBSEARCH_DESC= Search web with custom defined search engines
+
+CALC_RUN_DEPENDS= qalc:math/libqalculate \
+ wl-copy:x11/wl-clipboard
+CALC_PLIST_FILES= etc/xdg/elephant/providers/calc.so
+CLIPBOARD_RUN_DEPENDS= wl-copy:x11/wl-clipboard
+CLIPBOARD_PLIST_FILES= etc/xdg/elephant/providers/clipboard.so
+DESKTOPAPPLICATIONS_PLIST_FILES=etc/xdg/elephant/providers/desktopapplications.so
+FILES_RUN_DEPENDS= fd:sysutils/fd
+FILES_PLIST_FILES= etc/xdg/elephant/providers/files.so
+MENUS_PLIST_FILES= etc/xdg/elephant/providers/menus.so
+PROVIDERLIST_PLIST_FILES=etc/xdg/elephant/providers/providerlist.so
+RUNNER_PLIST_FILES= etc/xdg/elephant/providers/runner.so
+SYMBOLS_RUN_DEPENDS= wl-copy:x11/wl-clipboard
+SYMBOLS_PLIST_FILES= etc/xdg/elephant/providers/symbols.so
+TODO_RUN_DEPENDS= notify-send:devel/libnotify
+TODO_PLIST_FILES= etc/xdg/elephant/providers/todo.so
+UNICODE_RUN_DEPENDS= wl-copy:x11/wl-clipboard
+UNICODE_PLIST_FILES= etc/xdg/elephant/providers/unicode.so
+WEBSEARCH_PLIST_FILES= etc/xdg/elephant/providers/websearch.so
+
+.include <bsd.port.options.mk>
+
+ENABLED_PROVIDERS= ${SELECTED_OPTIONS:NDOCS:tl}
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|' \
+ ${GO_WRKSRC}/internal/providers/load.go
+
+post-build:
+.for provider in ${ENABLED_PROVIDERS}
+ @${ECHO_MSG} "===> Building ${provider} from ./internal/providers/${provider}"
+ @cd ${GO_WRKSRC} && \
+ ${SETENV} ${MAKE_ENV} ${GO_ENV} \
+ GOMAXPROCS=${MAKE_JOBS_NUMBER} GOPROXY=off \
+ ${GO_CMD} build ${GO_BUILDFLAGS:C/-buildmode=.*//} -buildmode=plugin \
+ -o ${GO_WRKDIR_BIN}/${provider}.so \
+ ./internal/providers/${provider}
+.endfor
+
+post-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg/elephant/providers
+ ${INSTALL_LIB} ${GO_WRKDIR_BIN}/*.so \
+ ${STAGEDIR}${PREFIX}/etc/xdg/elephant/providers
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/sysutils/elephant/distinfo b/sysutils/elephant/distinfo
new file mode 100644
index 000000000000..0359848b7674
--- /dev/null
+++ b/sysutils/elephant/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1758052477
+SHA256 (go/sysutils_elephant/elephant-v1.0.4/v1.0.4.mod) = 272874130a90b2beac5b65820bf759b9a1f2b29dbd9d4347aaf0410dfddf5a76
+SIZE (go/sysutils_elephant/elephant-v1.0.4/v1.0.4.mod) = 965
+SHA256 (go/sysutils_elephant/elephant-v1.0.4/v1.0.4.zip) = da41467c6ad118f79cca9bd37793bb7e01bb5e99354c2b9676cef46f57585aae
+SIZE (go/sysutils_elephant/elephant-v1.0.4/v1.0.4.zip) = 7127553
diff --git a/sysutils/elephant/pkg-descr b/sysutils/elephant/pkg-descr
new file mode 100644
index 000000000000..d37a763ebae8
--- /dev/null
+++ b/sysutils/elephant/pkg-descr
@@ -0,0 +1,10 @@
+Elephant - cuz it's phat - is a powerful data provider service and
+backend for building custom application launchers and desktop
+utilities. It provides various data sources and actions through a
+plugin-based architecture, communicating via Unix sockets and Protocol
+Buffers.
+
+Elephant acts as a unified backend service that aggregates data from
+various sources (desktop applications, files, clipboard history, etc.)
+and provides a consistent interface for frontend applications like
+custom launchers, productivity tools, or desktop widgets.