diff --git a/IMPORT b/IMPORT new file mode 100644 index 0000000..7463e9b --- /dev/null +++ b/IMPORT @@ -0,0 +1,10 @@ +# IMPORT -- where junction comes from (root AGENTS.md, "What belongs where": ext/) + +upstream junction, the project's own repository + https://git.kropa.tech/hiddenbox/junction +version 0.1 (no release tag yet) +archive git archive of the submodule's commit (tools/ext-dist.sh), no tarball upstream +licence CNCL 1.0 (what Makronix wrote itself, root AGENTS.md "Licence") + -- the recipe's LICENSE= names it; SKIP_LICENSE_CHECK is set in + tools/pkgsrc-cross.mk.conf +pkgsrc recipe in pkgsrc/ of this tree; it becomes misc/junction (tools/ext-sync.sh) diff --git a/pkgsrc/DESCR b/pkgsrc/DESCR new file mode 100644 index 0000000..8e5d9e0 --- /dev/null +++ b/pkgsrc/DESCR @@ -0,0 +1,4 @@ +junction is a policy router for OpenAI-compatible model endpoints, C99 and +POSIX: it picks the upstream by policy, budget and health, caches, and +reports. Hooks, example configurations and a status page are installed under +share/junction. https upstreams use the system's libssl. diff --git a/pkgsrc/Makefile b/pkgsrc/Makefile new file mode 100644 index 0000000..8aff79c --- /dev/null +++ b/pkgsrc/Makefile @@ -0,0 +1,37 @@ +# $NetBSD$ +# +# Makronix: junction is one of the project's own programs (ext/src/junction, a git +# submodule; IMPORT). It is built from the archive tools/ext-dist.sh makes of +# the submodule's commit, so there is no MASTER_SITES. + +DISTNAME= junction-0.1 +CATEGORIES= misc +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= lotherk@lother.io +COMMENT= Policy router for OpenAI-compatible model endpoints +LICENSE= cncl-1.0 + +NO_CONFIGURE= yes +NO_BUILDLINK= yes +BUILD_TARGET= all +INSTALL_TARGET= install + +MAKE_FLAGS+= PREFIX=${PREFIX} +MAKE_FLAGS+= DESTDIR=${DESTDIR} + +# junction's Makefile is GNU make (ifeq, $(wildcard)). +USE_TOOLS+= gmake +MAKE_PROGRAM= ${GMAKE} + +# Its own defaults (dialect, _POSIX_C_SOURCE, -pthread) are replaced by a +# variable on the command line, so they are repeated here. TLS: the Makefile +# looks for openssl/ssl.h on the BUILD host, which in a cross build is the +# wrong place; the target's base system has libssl and libcrypto, so J_HAVE_TLS +# and the libraries are given outright. No -Werror. +MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}\ -std=c99\ -pthread +MAKE_FLAGS+= CPPFLAGS=-D_POSIX_C_SOURCE=200809L\ -D_DEFAULT_SOURCE\ -DJ_HAVE_TLS +MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q}\ -pthread +MAKE_FLAGS+= TLS_LIBS=-lssl\ -lcrypto + +.include "../../mk/bsd.pkg.mk" diff --git a/pkgsrc/PLIST b/pkgsrc/PLIST new file mode 100644 index 0000000..6bad9a9 --- /dev/null +++ b/pkgsrc/PLIST @@ -0,0 +1,11 @@ +bin/junction +bin/junction-wol +share/junction/examples/full-reference.conf +share/junction/examples/olivia.conf +share/junction/examples/prices.conf +share/junction/hooks/check-budget.sh +share/junction/hooks/check-http.sh +share/junction/hooks/junction-wol +share/junction/hooks/wake-wol.sh +share/junction/junction.conf +share/junction/www/index.html