First commit epics meta modules

This commit is contained in:
2025-05-23 14:14:10 +02:00
parent 47ab283745
commit 0809eb5858
4 changed files with 78 additions and 1 deletions

View File

@ -1,3 +1,33 @@
# epics-module-meta
Meta repository with references to third party modules and tags to build them
Meta repository with references to third party modules and tags to build them.
This is very barebones, please improve as you see fit.
This at least allows us to pin down the versions for when we need to rebuild everything
## How to
Create a module yaml file in the `modules` directory, the most common case we build an already tagged version from GFS.
```
$ cat modules/autosave.yaml
module: autosave
repo: git@git.psi.ch:epics_driver_modules/autosave.git
tag: 5.7.18
```
Build with:
```
./build modules/autosave.yaml
```
Install with:
```
./build modules/autosave.yaml install
```
If you have your modules directory in a non-standard location:
```
export EPICS_MODULES=/path/to/your/modules
```
in beforehand.

39
build.sh Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/bash
set -eo pipefail
WORKDIR=${WORKDIR:-workdir}
MODULEYAML=$1
if [ ! -f "$MODULEYAML" ]; then
echo "Module yaml description $MODULEYAML not found"
exit -1
fi
if [ ! -d "$WORKDIR" ]; then
mkdir $WORKDIR
fi
module=$(yq e '.module' $MODULEYAML)
repo=$(yq e '.repo' $MODULEYAML)
tag=$(yq e '.tag' $MODULEYAML)
builddir="$WORKDIR/$module"
if [ ! -d "${builddir}" ]; then
echo je
if [ ! "$tag" = "null" ]; then
# prioritize tags
git clone $repo $builddir -b $tag
else
# use commit
branch=$(yq e '.branch' $MODULEYAML)
commit=$(yq e '.commit' $MODULEYAML)
if [ -z "$commit" ]; then
echo "Error no tag or commit specified"
exit -1
fi
git clone $repo $builddir -b $branch
git -C $builddir checkout $commit
fi
fi
ARCH_FILTER="RHEL8%" make -C $builddir $2

3
modules/motorSim.yaml Normal file
View File

@ -0,0 +1,3 @@
module: motorSim
repo: git@git.psi.ch:epics_driver_modules/motorMotorSim.git
tag: 1.2.0

5
modules/require.yaml Normal file
View File

@ -0,0 +1,5 @@
# For now and example, just to prove that we can build from commits
module: require
repo: git@git.psi.ch:epics_driver_modules/require.git
branch: master
commit: e2da39ec956c7e6db348f071faa0f6fc4234abf9