mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
www/opengist: New Port: Self-hosted Pastebin powered by Git
Self-hosted pastebin powered by Git, open-source alternative to Github Gist. WWW: https://opengist.io/
This commit is contained in:
parent
c7d4e37965
commit
b60b3ff7ca
8 changed files with 7482 additions and 0 deletions
|
@ -498,6 +498,7 @@
|
|||
SUBDIR += onlyoffice-documentserver
|
||||
SUBDIR += opencart
|
||||
SUBDIR += openemr
|
||||
SUBDIR += opengist
|
||||
SUBDIR += openresty
|
||||
SUBDIR += orangehrm
|
||||
SUBDIR += osrm-backend
|
||||
|
|
61
www/opengist/Makefile
Normal file
61
www/opengist/Makefile
Normal file
|
@ -0,0 +1,61 @@
|
|||
PORTNAME= opengist
|
||||
PORTVERSION= 1.8.1
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= www textproc
|
||||
MASTER_SITES= LOCAL/fox/:js
|
||||
DISTFILES= opengist-${DISTVERSION}-node_modules.tgz:js
|
||||
|
||||
MAINTAINER= fox@FreeBSD.org
|
||||
COMMENT= Self-hosted pastebin powered by Git, open-source alternative to Github Gist.
|
||||
WWW= https://opengist.io/
|
||||
|
||||
LICENSE= AGPLv3
|
||||
|
||||
BUILD_DEPENDS= npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX}
|
||||
RUN_DEPENDS= git:devel/git
|
||||
|
||||
USES= go:modules nodejs:20,build
|
||||
USE_RC_SUBR= opengist
|
||||
|
||||
USE_GITHUB= nodefault
|
||||
GH_ACCOUNT= thomiceli
|
||||
GH_PROJECT= opengist
|
||||
|
||||
GO_MODULE= github.com/thomiceli/opengist
|
||||
GO_TARGET= .
|
||||
GO_BUILDFLAGS= -tags fs_embed \
|
||||
-ldflags="-X github.com/thomiceli/opengist/internal/config.OpengistVersion=v${DISTVERSION}"
|
||||
|
||||
post-extract:
|
||||
@${RLN} ${WRKDIR}/node_modules ${WRKSRC}/node_modules
|
||||
|
||||
pre-build:
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} npx --offline vite -c public/vite.config.js build
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
|
||||
EMBED=1 npx --offline postcss 'public/assets/embed-*.css' -c public/postcss.config.js --replace
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
|
||||
${INSTALL_DATA} ${WRKSRC}/config.yml ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/config.yml.sample
|
||||
${MKDIR} ${STAGEDIR}/var/run/${PORTNAME}
|
||||
${MKDIR} ${STAGEDIR}${WWWDIR}/assets
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} public/assets/* ${STAGEDIR}${WWWDIR}/assets
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} public/manifest.json ${STAGEDIR}${WWWDIR}
|
||||
|
||||
#
|
||||
# To update the opengist-${DISTVERSION}-node_modules.tgz archive:
|
||||
# 1. Comment out the DISTFILES and post-extract lines
|
||||
# 2. Run 'make makesum regenerate-node_modules-distfile clean'
|
||||
# 3. Upload the archive
|
||||
# 4. Uncomment the lines from step #1
|
||||
# 5. Run 'make makesum'
|
||||
#
|
||||
|
||||
regenerate-node_modules-distfile: patch
|
||||
cd ${WRKSRC} && \
|
||||
${RM} -r node_modules && \
|
||||
${MAKE_ENV} npm install --prefix ${WRKSRC} && \
|
||||
${TAR} czf ${DISTDIR}/opengist-${DISTVERSION}-node_modules.tgz node_modules && \
|
||||
${ECHO} "Please upload the file ${DISTDIR}/opengist-${DISTVERSION}-node_modules.tgz"
|
||||
|
||||
.include <bsd.port.mk>
|
7
www/opengist/distinfo
Normal file
7
www/opengist/distinfo
Normal file
|
@ -0,0 +1,7 @@
|
|||
TIMESTAMP = 1731775790
|
||||
SHA256 (go/www_opengist/opengist-v1.8.1/opengist-1.8.1-node_modules.tgz) = e42cb24f3fe6c12cfdad2de2ac3ad829108cdcb99a988197177c924b65b8a885
|
||||
SIZE (go/www_opengist/opengist-v1.8.1/opengist-1.8.1-node_modules.tgz) = 22842430
|
||||
SHA256 (go/www_opengist/opengist-v1.8.1/v1.8.1.mod) = 5d7a604b4ac7fd4d6e52fcc87e825b75f6c8b7c5ea531111437e74304b9edc36
|
||||
SIZE (go/www_opengist/opengist-v1.8.1/v1.8.1.mod) = 5058
|
||||
SHA256 (go/www_opengist/opengist-v1.8.1/v1.8.1.zip) = f097bab3a178016af715e73f2e5008c4e89b9806456022141573ce19c454f7d8
|
||||
SIZE (go/www_opengist/opengist-v1.8.1/v1.8.1.zip) = 1610649
|
58
www/opengist/files/opengist.in
Normal file
58
www/opengist/files/opengist.in
Normal file
|
@ -0,0 +1,58 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: opengist
|
||||
# REQUIRE: LOGIN NETWORKING
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=opengist
|
||||
rcvar=opengist_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${opengist_enable:="NO"}
|
||||
: ${opengist_home:="%%WWWDIR%%"}
|
||||
: ${opengist_config_file:="%%PREFIX%%/etc/${name}/config.yml"}
|
||||
: ${opengist_syslog_output_enable:="NO"}
|
||||
: ${opengist_syslog_output_priority:="info"}
|
||||
: ${opengist_syslog_output_facility:="daemon"}
|
||||
|
||||
if checkyesno opengist_syslog_output_enable; then
|
||||
opengist_syslog_output_flags="-t ${name} -T ${name}"
|
||||
|
||||
if [ -n "${opengist_syslog_output_priority}" ]; then
|
||||
opengist_syslog_output_flags="${opengist_syslog_output_flags} -s ${opengist_syslog_output_priority}"
|
||||
fi
|
||||
|
||||
if [ -n "${opengist_syslog_output_facility}" ]; then
|
||||
opengist_syslog_output_flags="${opengist_syslog_output_flags} -l ${opengist_syslog_output_facility}"
|
||||
fi
|
||||
fi
|
||||
|
||||
pidfile=/var/run/opengist/${name}.pid
|
||||
procname="%%PREFIX%%/bin/${name}"
|
||||
|
||||
start_cmd="${name}_start"
|
||||
start_precmd="${name}_precmd"
|
||||
|
||||
opengist_precmd()
|
||||
{
|
||||
if [ ! -f ${opengist_config_file} ]
|
||||
then
|
||||
echo ${opengist_config_file} missing.
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
opengist_start() {
|
||||
/usr/sbin/daemon -f ${opengist_syslog_output_flags} -p ${pidfile} \
|
||||
/usr/bin/env -i \
|
||||
"PATH=%%PREFIX%%/bin:${PATH}" \
|
||||
${procname} -c ${opengist_config_file}
|
||||
}
|
||||
|
||||
cd ${opengist_home}
|
||||
|
||||
run_rc_command "$1"
|
7322
www/opengist/files/patch-package-lock.json
generated
Normal file
7322
www/opengist/files/patch-package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
13
www/opengist/files/patch-package.json
Normal file
13
www/opengist/files/patch-package.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- package.json.orig 1979-11-30 00:00:00 UTC
|
||||
+++ package.json
|
||||
@@ -34,5 +34,10 @@
|
||||
"sugarss": "^4.0.1",
|
||||
"tailwindcss": "^3.2.7",
|
||||
"vite": "^4.5.3"
|
||||
+ },
|
||||
+ "overrides": {
|
||||
+ "vite": {
|
||||
+ "rollup": "npm:@rollup/wasm-node"
|
||||
+ }
|
||||
}
|
||||
}
|
4
www/opengist/pkg-descr
Normal file
4
www/opengist/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
|||
Opengist is a self-hosted Pastebin powered by Git. All snippets are
|
||||
stored in a Git repository and can be read and/or modified using
|
||||
standard Git commands, or with the web interface. It is similar to
|
||||
GitHub Gist, but open-source and could be self-hosted.
|
16
www/opengist/pkg-plist
Normal file
16
www/opengist/pkg-plist
Normal file
|
@ -0,0 +1,16 @@
|
|||
bin/opengist
|
||||
%%ETCDIR%%/config.yml.sample
|
||||
etc/rc.d/opengist
|
||||
%%WWWDIR%%/assets/admin-f49fd6c0.js
|
||||
%%WWWDIR%%/assets/default-f34219fc.png
|
||||
%%WWWDIR%%/assets/editor-dd91ca8c.js
|
||||
%%WWWDIR%%/assets/embed-3b762c54.css
|
||||
%%WWWDIR%%/assets/embed-ba879bc1.js
|
||||
%%WWWDIR%%/assets/favicon-32-5d82ace6.png
|
||||
%%WWWDIR%%/assets/gist-bdaf8125.js
|
||||
%%WWWDIR%%/assets/main-4eb45586.js
|
||||
%%WWWDIR%%/assets/main-54c7a69f.css
|
||||
%%WWWDIR%%/assets/opengist-85b89b9c.svg
|
||||
%%WWWDIR%%/assets/webauthn-da047c6d.js
|
||||
%%WWWDIR%%/manifest.json
|
||||
@dir /var/run/opengist
|
Loading…
Add table
Reference in a new issue