git: 38c1efb47083 - main - devel/athens: Refactor
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Mar 2025 09:18:14 UTC
The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=38c1efb470830e8c41c97360a479094085a02db3 commit 38c1efb470830e8c41c97360a479094085a02db3 Author: Einar Bjarni Halldórsson <einar@isnic.is> AuthorDate: 2025-03-25 12:03:58 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2025-03-27 09:17:13 +0000 devel/athens: Refactor - Add rc script - Add sample config file PR: 285628 --- devel/athens/Makefile | 11 +++++++---- devel/athens/files/athens.in | 33 +++++++++++++++++++++++++++++++++ devel/athens/pkg-plist | 2 ++ 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/devel/athens/Makefile b/devel/athens/Makefile index e4b357c64945..2f48f08852d7 100644 --- a/devel/athens/Makefile +++ b/devel/athens/Makefile @@ -1,7 +1,7 @@ PORTNAME= athens DISTVERSION= 0.15.4 DISTVERSIONPREFIX= v -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MAINTAINER= bofh@FreeBSD.org @@ -12,8 +12,9 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:1.22,modules +USE_RC_SUBR= ${PORTNAME} -BUILD_DATE= 2024-11-04-00:00:00-UTC +BUILD_DATE= 2025-03-27-00:00:00-UTC GO_MODULE= github.com/gomods/${PORTNAME} GO_TARGET= ./cmd/proxy @@ -21,9 +22,11 @@ GO_BUILDFLAGS= -ldflags " \ -X github.com/gomods/${PORTNAME}/pkg/build.version=${DISTVERSION} \ -X github.com/gomods/${PORTNAME}/pkg/build.buildDate=${BUILD_DATE}" -PLIST_FILES= bin/${PORTNAME} - do-install: ${INSTALL_PROGRAM} ${WRKDIR}/bin/proxy ${STAGEDIR}${PREFIX}/bin/${PORTNAME} +post-install: + ${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${BUILD_WRKSRC}/config.dev.toml ${STAGEDIR}${ETCDIR}/athens.toml.sample + .include <bsd.port.mk> diff --git a/devel/athens/files/athens.in b/devel/athens/files/athens.in new file mode 100644 index 000000000000..2c59b63c0f91 --- /dev/null +++ b/devel/athens/files/athens.in @@ -0,0 +1,33 @@ +#!/bin/sh +# +# PROVIDE: athens +# REQUIRE: networking +# KEYWORD: shutdown +# +# athens_enable (bool): +# Default value: "NO" +# Flag that determines whether athens is enabled +# +# athens_config (string) +# Default value %%ETCDIR%%/athens.toml +# Path to the athens configuration file +# + +. /etc/rc.subr + +: ${athens_enable:="NO"} +: ${athens_config:="%%ETCDIR%%/athens.toml"} + +name=athens +rcvar=athens_enable +athens_command="%%PREFIX%%/bin/athens -config_file ${athens_config}" +command="/usr/sbin/daemon" +command_args="-S ${athens_command}" + +PATH="${PATH}:%%PREFIX%%/bin" + +load_rc_config $name + +required_files="${athens_config}" + +run_rc_command "$1" diff --git a/devel/athens/pkg-plist b/devel/athens/pkg-plist new file mode 100644 index 000000000000..0c718f334d49 --- /dev/null +++ b/devel/athens/pkg-plist @@ -0,0 +1,2 @@ +@sample %%ETCDIR%%/athens.toml.sample +bin/athens