mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-19 08:13:21 +00:00
devel/laminar: New port
Laminar is a lightweight client-server CI service written in C++ and configured by environment variables. It comes with a built-in webserver and uses simple .run shell scripts as jobs. PR: 273827 Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D42877
This commit is contained in:
parent
e5c42c9d0e
commit
181bdf41a3
@ -1129,6 +1129,7 @@
|
||||
SUBDIR += kyua
|
||||
SUBDIR += lab
|
||||
SUBDIR += lager
|
||||
SUBDIR += laminar
|
||||
SUBDIR += lasi
|
||||
SUBDIR += lattice-ice40-examples-hx1k
|
||||
SUBDIR += lattice-ice40-examples-hx8k
|
||||
|
72
devel/laminar/Makefile
Normal file
72
devel/laminar/Makefile
Normal file
@ -0,0 +1,72 @@
|
||||
PORTNAME= laminar
|
||||
DISTVERSION= 1.3
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= GH \
|
||||
https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/:vue \
|
||||
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/:chart \
|
||||
https://raw.githubusercontent.com/drudru/ansi_up/v4.0.4/:ansi
|
||||
DISTFILES= ansi_up.js:ansi \
|
||||
vue.min.js:vue \
|
||||
chart.min.js:chart
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
EXTRACT_ONLY= ${GH_ACCOUNT}-${PORTNAME}-${DISTVERSION}-${GH_TAGNAME}_GH0${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= cingel.marian@gmail.com
|
||||
COMMENT= Lightweight CI service
|
||||
WWW= https://laminar.ohwg.net/
|
||||
|
||||
LICENSE= GPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
ONLY_FOR_ARCHS= aarch64 amd64 armv7 powerpc64 powerpc64le
|
||||
ONLY_FOR_ARCHS_REASON= "Requires to translate 'uname -m' to linker '-m' flag in CMakeLists.txt"
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/include/boost/multi_index_container.hpp:devel/boost-libs \
|
||||
${LOCALBASE}/include/rapidjson/rapidjson.h:devel/rapidjson
|
||||
LIB_DEPENDS= libcapnp.so:devel/capnproto \
|
||||
libinotify.so:devel/libinotify
|
||||
|
||||
USES= cmake pkgconfig sqlite
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= ohwgiles
|
||||
GH_TAGNAME= 277a59f1cba75fa763e5838b3443f11686dd5ebb
|
||||
|
||||
USERS= ${WWWOWN}
|
||||
GROUPS= ${WWWGRP}
|
||||
HOMEDIR= /var/db/${PORTNAME}
|
||||
LAMINARD= laminard
|
||||
|
||||
USE_RC_SUBR= laminard
|
||||
SUB_FILES= laminard.env
|
||||
|
||||
SUB_LIST= HOMEDIR=${HOMEDIR} \
|
||||
LAMINARD=${LAMINARD} \
|
||||
PORTNAME=${PORTNAME} \
|
||||
USERS=${USERS}
|
||||
|
||||
PLIST_SUB= GROUPS=${GROUPS} \
|
||||
HOMEDIR=${HOMEDIR} \
|
||||
LAMINARD=${LAMINARD} \
|
||||
PORTNAME=${PORTNAME} \
|
||||
USERS=${USERS}
|
||||
|
||||
post-extract:
|
||||
${CP} ${DISTDIR}/${DIST_SUBDIR}/ansi_up.js ${WRKDIR}/
|
||||
${CP} ${DISTDIR}/${DIST_SUBDIR}/vue.min.js ${WRKDIR}/
|
||||
${CP} ${DISTDIR}/${DIST_SUBDIR}/chart.min.js ${WRKDIR}/Chart.min.js
|
||||
|
||||
pre-configure:
|
||||
${MKDIR} ${CONFIGURE_WRKSRC}/js
|
||||
${CP} ${WRKDIR}/ansi_up.js ${CONFIGURE_WRKSRC}/js/
|
||||
${CP} ${WRKDIR}/Chart.min.js ${CONFIGURE_WRKSRC}/js/
|
||||
${CP} ${WRKDIR}/vue.min.js ${CONFIGURE_WRKSRC}/js/
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}${HOMEDIR} \
|
||||
${STAGEDIR}${HOMEDIR}/cfg \
|
||||
${STAGEDIR}${HOMEDIR}/cfg/jobs \
|
||||
${STAGEDIR}${PREFIX}/etc/${PORTNAME}
|
||||
${INSTALL_DATA} ${WRKDIR}/laminard.env ${STAGEDIR}${ETCDIR}/${LAMINARD}.env.sample
|
||||
|
||||
.include <bsd.port.mk>
|
9
devel/laminar/distinfo
Normal file
9
devel/laminar/distinfo
Normal file
@ -0,0 +1,9 @@
|
||||
TIMESTAMP = 1699395718
|
||||
SHA256 (laminar/ansi_up.js) = 996608ae1a80c64fb2b41e07f3ef1c4fc7ec437746c03867000de98686e5a8b7
|
||||
SIZE (laminar/ansi_up.js) = 22159
|
||||
SHA256 (laminar/vue.min.js) = 29296ccacaa9ed35ed168fc51e36f54fd6f8db9c7786bbf38cc59a27229ba5c2
|
||||
SIZE (laminar/vue.min.js) = 93670
|
||||
SHA256 (laminar/chart.min.js) = fbc45926e6b46845a0f905552a0e0b1331049bff1115ecf94dbe0904d895e710
|
||||
SIZE (laminar/chart.min.js) = 199560
|
||||
SHA256 (laminar/ohwgiles-laminar-1.3-277a59f1cba75fa763e5838b3443f11686dd5ebb_GH0.tar.gz) = 61fa0b17e2515aace7e98ed1f020314163cbbc6212a1fa94437229a78fcaa62f
|
||||
SIZE (laminar/ohwgiles-laminar-1.3-277a59f1cba75fa763e5838b3443f11686dd5ebb_GH0.tar.gz) = 104295
|
64
devel/laminar/files/laminard.env.in
Normal file
64
devel/laminar/files/laminard.env.in
Normal file
@ -0,0 +1,64 @@
|
||||
###
|
||||
### LAMINAR_HOME
|
||||
###
|
||||
### Root location containing laminar configuration, database,
|
||||
### build workspaces and archive.
|
||||
###
|
||||
### Default: /var/lib/laminar
|
||||
###
|
||||
LAMINAR_HOME=%%HOMEDIR%%
|
||||
|
||||
### LAMINAR_BIND_HTTP
|
||||
###
|
||||
### Interface on which laminard will bind to serve the Web UI.
|
||||
### May be of the form IP:PORT, unix:PATH/TO/SOCKET or unix-abstract:NAME
|
||||
###
|
||||
### Default: *:8080
|
||||
###
|
||||
LAMINAR_BIND_HTTP="*:8080"
|
||||
|
||||
### LAMINAR_BIND_RPC
|
||||
###
|
||||
### Interface on which laminard will bind to accept RPC from laminarc.
|
||||
### May be of the form IP:PORT, unix:PATH/TO/SOCKET or unix-abstract:NAME
|
||||
###
|
||||
### Default: unix-abstract:laminar
|
||||
LAMINAR_BIND_RPC="*:8081"
|
||||
|
||||
###
|
||||
### LAMINAR_TITLE
|
||||
###
|
||||
### Page title to show in web frontend
|
||||
###
|
||||
# LAMINAR_TITLE=""
|
||||
|
||||
###
|
||||
### LAMINAR_KEEP_RUNDIRS
|
||||
###
|
||||
### Setting this prevents the immediate deletion of job rundirs
|
||||
### $LAMINAR_HOME/run/$JOB/$RUN. Value should be an integer represeting
|
||||
### the number of rundirs to keep.
|
||||
###
|
||||
### Default: 0
|
||||
###
|
||||
# LAMINAR_KEEP_RUNDIRS=0
|
||||
|
||||
###
|
||||
### LAMINAR_BASE_URL
|
||||
###
|
||||
### Base url for the frontend. This affects the <base href> tag and needs
|
||||
### to be set if Laminar runs behind a reverse-proxy that hosts Laminar
|
||||
### within a subfolder (rather than at a subdomain root)
|
||||
###
|
||||
# LAMINAR_BASE_URL="/""
|
||||
|
||||
###
|
||||
### LAMINAR_ARCHIVE_URL
|
||||
###
|
||||
### Base url used to request artifacts. Laminar can serve build
|
||||
### artifacts (and it will if you leave this unset), but it
|
||||
### uses a very naive and inefficient method. Best to let a real
|
||||
### webserver handle serving those requests.
|
||||
###
|
||||
# LAMINAR_ARCHIVE_URL="http://backbone.example.com/ci/archive/"
|
||||
|
32
devel/laminar/files/laminard.in
Executable file
32
devel/laminar/files/laminard.in
Executable file
@ -0,0 +1,32 @@
|
||||
#! /bin/sh
|
||||
|
||||
# PROVIDE: %%LAMINARD%%
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable git_daemon:
|
||||
#
|
||||
#laminard_enable="YES"
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="%%LAMINARD%%"
|
||||
rcvar="%%LAMINARD%%_enable"
|
||||
|
||||
pidfile="/var/run/${name}.pid"
|
||||
logfile="/var/log/${name}.log"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${%%PORTNAME%%d_enable:=NO}
|
||||
: ${%%PORTNAME%%d_env_file:=%%ETCDIR%%/%%LAMINARD%%.env}
|
||||
|
||||
laminard_cmd=%%PREFIX%%/sbin/${name}
|
||||
procname=${laminard_cmd}
|
||||
#laminard_args="-v"
|
||||
command=/usr/sbin/daemon
|
||||
command_args="-f -o ${logfile} -p ${pidfile} -u %%USERS%% ${laminard_cmd} ${laminard_args}"
|
||||
|
||||
run_rc_command "$1"
|
||||
|
5
devel/laminar/pkg-descr
Normal file
5
devel/laminar/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
Laminar is a lightweight client-server CI service written in C++ and
|
||||
configured by environment variables. It comes with a built-in webserver
|
||||
and uses simple .run shell scripts as jobs.
|
||||
|
||||
The client-server communication uses the Cap'n Proto format over sockets.
|
10
devel/laminar/pkg-plist
Normal file
10
devel/laminar/pkg-plist
Normal file
@ -0,0 +1,10 @@
|
||||
bin/laminarc
|
||||
@sample %%ETCDIR%%/%%LAMINARD%%.env.sample
|
||||
sbin/laminard
|
||||
share/man/man1/laminarc.1.gz
|
||||
share/man/man8/laminard.8.gz
|
||||
usr/share/bash-completion/completions/laminarc
|
||||
usr/share/zsh/site-functions/_laminarc
|
||||
@dir(%%USERS%%,%%GROUPS%%) %%HOMEDIR%%/cfg/jobs
|
||||
@dir(%%USERS%%,%%GROUPS%%) %%HOMEDIR%%/cfg
|
||||
@dir(%%USERS%%,%%GROUPS%%) %%HOMEDIR%%
|
Loading…
Reference in New Issue
Block a user