diff --git a/www/opengist/Makefile b/www/opengist/Makefile index 90a5d7771069..822dc6069053 100644 --- a/www/opengist/Makefile +++ b/www/opengist/Makefile @@ -1,89 +1,87 @@ PORTNAME= opengist PORTVERSION= 1.11.1 DISTVERSIONPREFIX= v -PORTREVISION= 2 +PORTREVISION= 3 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 BROKEN_i386= fails to build ONLY_FOR_ARCHS= aarch64 amd64 BUILD_DEPENDS= npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX} RUN_DEPENDS= git:devel/git USES= go:modules nodejs:20,build USE_GITHUB= nodefault GH_ACCOUNT= thomiceli GH_PROJECT= opengist USE_RC_SUBR= opengist GO_MODULE= github.com/thomiceli/opengist GO_ENV+= GOTOOLCHAIN=local+path GO_TARGET= . GO_BUILDFLAGS= -tags fs_embed \ -ldflags="-X github.com/thomiceli/opengist/internal/config.OpengistVersion=v${DISTVERSION}" GROUPS= opengist USERS= opengist post-extract: @${RLN} ${WRKDIR}/node_modules ${WRKSRC}/node_modules post-patch: @${REINPLACE_CMD} -e 's|opengist.db|file:/var/db/${PORTNAME}/opengist.db|g' \ ${WRKSRC}/config.yml 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/db/${PORTNAME} - ${CHOWN} opengist:opengist ${STAGEDIR}/var/db/${PORTNAME} ${MKDIR} ${STAGEDIR}/var/run/${PORTNAME} - ${CHOWN} opengist:opengist ${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} --os freebsd --cpu \ arm64 esbuild@0.18.20 && \ ${MAKE_ENV} npm install --prefix ${WRKSRC} --os freebsd --cpu \ amd64 esbuild@0.18.20 && \ ${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 diff --git a/www/opengist/files/opengist.in b/www/opengist/files/opengist.in index be31988b3d7a..3045dc3fa511 100644 --- a/www/opengist/files/opengist.in +++ b/www/opengist/files/opengist.in @@ -1,72 +1,75 @@ #!/bin/sh # PROVIDE: opengist # REQUIRE: LOGIN NETWORKING # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to run opengist: # # opengist_enable (bool): Set it to "YES" to enable opengist server. # Default is "NO". # opengist_home (str): Set the home directory for opengist server. # Default is "%%WWWDIR%%". # opengist_user (str): Set the user for running opengist server. # Default is "opengist". +# opengist_group (str): Set the group for running opengist server. +# Default is "opengist". # opengist_config_file (str): Set config file location for opengist server. # Default is "%%PREFIX%%/etc/${name}/config.yml". # opengist_syslog_output_enable (bool): Set it to "YES" for enabling output to syslogd(8) # Default is "NO" # opengist_syslog_output_priority (str): Set logging priority. # Default is "info" # opengist_syslog_output_facility (str): Set logging facility # Default is "daemon" . /etc/rc.subr name=opengist rcvar=opengist_enable load_rc_config ${name} : ${opengist_enable:="NO"} : ${opengist_user:="opengist"} +: ${opengist_group:="opengist"} : ${opengist_files:="/var/db/opengist/"} : ${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_precmd="${name}_precmd" opengist_precmd() { if [ ! -f ${opengist_config_file} ]; then echo ${opengist_config_file} missing. return 1 fi } command="/usr/sbin/daemon" command_args="-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" diff --git a/www/opengist/pkg-plist b/www/opengist/pkg-plist index 4d729612ce64..0f00cfe6d149 100644 --- a/www/opengist/pkg-plist +++ b/www/opengist/pkg-plist @@ -1,77 +1,77 @@ bin/opengist %%ETCDIR%%/config.yml.sample %%WWWDIR%%/assets/KaTeX_AMS-Regular-0cdd387c.woff2 %%WWWDIR%%/assets/KaTeX_AMS-Regular-30da91e8.woff %%WWWDIR%%/assets/KaTeX_AMS-Regular-68534840.ttf %%WWWDIR%%/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf %%WWWDIR%%/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff %%WWWDIR%%/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2 %%WWWDIR%%/assets/KaTeX_Caligraphic-Regular-3398dd02.woff %%WWWDIR%%/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2 %%WWWDIR%%/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf %%WWWDIR%%/assets/KaTeX_Fraktur-Bold-74444efd.woff2 %%WWWDIR%%/assets/KaTeX_Fraktur-Bold-9163df9c.ttf %%WWWDIR%%/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff %%WWWDIR%%/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf %%WWWDIR%%/assets/KaTeX_Fraktur-Regular-51814d27.woff2 %%WWWDIR%%/assets/KaTeX_Fraktur-Regular-5e28753b.woff %%WWWDIR%%/assets/KaTeX_Main-Bold-0f60d1b8.woff2 %%WWWDIR%%/assets/KaTeX_Main-Bold-138ac28d.ttf %%WWWDIR%%/assets/KaTeX_Main-Bold-c76c5d69.woff %%WWWDIR%%/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf %%WWWDIR%%/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2 %%WWWDIR%%/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff %%WWWDIR%%/assets/KaTeX_Main-Italic-0d85ae7c.ttf %%WWWDIR%%/assets/KaTeX_Main-Italic-97479ca6.woff2 %%WWWDIR%%/assets/KaTeX_Main-Italic-f1d6ef86.woff %%WWWDIR%%/assets/KaTeX_Main-Regular-c2342cd8.woff2 %%WWWDIR%%/assets/KaTeX_Main-Regular-c6368d87.woff %%WWWDIR%%/assets/KaTeX_Main-Regular-d0332f52.ttf %%WWWDIR%%/assets/KaTeX_Math-BoldItalic-850c0af5.woff %%WWWDIR%%/assets/KaTeX_Math-BoldItalic-dc47344d.woff2 %%WWWDIR%%/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf %%WWWDIR%%/assets/KaTeX_Math-Italic-08ce98e5.ttf %%WWWDIR%%/assets/KaTeX_Math-Italic-7af58c5e.woff2 %%WWWDIR%%/assets/KaTeX_Math-Italic-8a8d2445.woff %%WWWDIR%%/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf %%WWWDIR%%/assets/KaTeX_SansSerif-Bold-e99ae511.woff2 %%WWWDIR%%/assets/KaTeX_SansSerif-Bold-ece03cfd.woff %%WWWDIR%%/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2 %%WWWDIR%%/assets/KaTeX_SansSerif-Italic-3931dd81.ttf %%WWWDIR%%/assets/KaTeX_SansSerif-Italic-91ee6750.woff %%WWWDIR%%/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff %%WWWDIR%%/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2 %%WWWDIR%%/assets/KaTeX_SansSerif-Regular-f36ea897.ttf %%WWWDIR%%/assets/KaTeX_Script-Regular-036d4e95.woff2 %%WWWDIR%%/assets/KaTeX_Script-Regular-1c67f068.ttf %%WWWDIR%%/assets/KaTeX_Script-Regular-d96cdf2b.woff %%WWWDIR%%/assets/KaTeX_Size1-Regular-6b47c401.woff2 %%WWWDIR%%/assets/KaTeX_Size1-Regular-95b6d2f1.ttf %%WWWDIR%%/assets/KaTeX_Size1-Regular-c943cc98.woff %%WWWDIR%%/assets/KaTeX_Size2-Regular-2014c523.woff %%WWWDIR%%/assets/KaTeX_Size2-Regular-a6b2099f.ttf %%WWWDIR%%/assets/KaTeX_Size2-Regular-d04c5421.woff2 %%WWWDIR%%/assets/KaTeX_Size3-Regular-500e04d5.ttf %%WWWDIR%%/assets/KaTeX_Size3-Regular-6ab6b62e.woff %%WWWDIR%%/assets/KaTeX_Size3-Regular-73d59127.woff2 %%WWWDIR%%/assets/KaTeX_Size4-Regular-99f9c675.woff %%WWWDIR%%/assets/KaTeX_Size4-Regular-a4af7d41.woff2 %%WWWDIR%%/assets/KaTeX_Size4-Regular-c647367d.ttf %%WWWDIR%%/assets/KaTeX_Typewriter-Regular-71d517d6.woff2 %%WWWDIR%%/assets/KaTeX_Typewriter-Regular-e14fed02.woff %%WWWDIR%%/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf %%WWWDIR%%/assets/_commonjsHelpers-725317a4.js %%WWWDIR%%/assets/admin-f49fd6c0.js %%WWWDIR%%/assets/editor-61bea3d7.js %%WWWDIR%%/assets/embed-80b40d30.js %%WWWDIR%%/assets/embed-ecec9fcb.css %%WWWDIR%%/assets/favicon-32-5d82ace6.png %%WWWDIR%%/assets/gist-e6a5436c.js %%WWWDIR%%/assets/main-230cd4e3.js %%WWWDIR%%/assets/main-41bc6569.css %%WWWDIR%%/assets/opengist-85b89b9c.svg %%WWWDIR%%/assets/style_preferences-1f030604.js %%WWWDIR%%/assets/webauthn-93328862.js %%WWWDIR%%/manifest.json -@dir(opengist,opengist,640) /var/db/opengist -@dir(opengist,opengist,600) /var/run/opengist +@dir(opengist,opengist,750) /var/db/opengist +@dir(opengist,opengist,750) /var/run/opengist