Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
# Check for updates to GitHub Actions every week
interval: "weekly"
3 changes: 2 additions & 1 deletion .github/workflows/dockerpush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/ccache-action@v1
- name: Build containers
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SMIV := 5.2.0
SMIV := 5.1.3
RDMPV := 7.0.12

JARS := ctpanonymiser-1.0.0/CTPAnonymiser-portable-1.0.0.jar smi-nerd-v$(SMIV).jar
Expand All @@ -14,9 +14,9 @@ all: $(BINS)
minidocker: smi/smiinit smi/smiinit.sh smi/CTPAnonymiser-portable-1.0.0.jar smi/smi-nerd-v$(SMIV).jar smi/ctp-whitelist.script smi/eng.traineddata.gz
mkdir -p smi
touch smi/dummy.sh
(cd smi-services-v4.0.0-linux-x64;tar cf - .) | (cd smi ; tar xf -)
$(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/adoptopenjdk/openjdk11:debian-jre))
tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install libicu63"
(cd smi-services-v$(SMIV)-linux-x64 && tar cf - .) | (cd smi && tar xf -)
$(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/eclipse-temurin:11-jre))
tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install -y libicu-dev"
buildah config --cmd "/smi/smiinit.sh" "$(ctr1)"
buildah commit "$(ctr1)" "smidocker"

Expand Down Expand Up @@ -63,7 +63,7 @@ smi/eng.traineddata.gz:
curl -sL https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata | gzip -9 > $@

smi-services-v$(SMIV)-linux-x64/default.yaml:
curl -L https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-services-v$(SMIV)-linux-x64.tgz | tar xzf -
curl -sL https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-services-v$(SMIV)-linux-x64.tgz | tar xzf -
sed -i -e 's:MappingTable'"'"':smi.MappingTable'"'"':' smi-services-v$(SMIV)-linux-x64/default.yaml
sed -i -e 's/CTPAnonymiserOptions:/CTPAnonymiserOptions:\n SRAnonTool: '\''\/smi\/dummy.sh'\''/' smi-services-v$(SMIV)-linux-x64/default.yaml

Expand All @@ -74,7 +74,7 @@ docker: smiinit $(JARS) $(HOME)/rdmp-cli/rdmp ctp-whitelist.script smi-services-
buildah copy "$(ctr1)" smiinit /bin/
buildah copy "$(ctr1)" $(HOME)/rdmp-cli /rdmp-cli
buildah copy "$(ctr1)" $(JARS) ctp-whitelist.script smi-services-v$(SMIV)-linux-x64/ /smi
./eqnames.pl < smi-services-v3.0.2-linux-x64/default.yaml | buildah run "$(ctr1)" -- bash 2>&1 | tee dockerbuild.log
./eqnames.pl < smi-services-v$(SMIV)-linux-x64/default.yaml | buildah run "$(ctr1)" -- bash 2>&1 | tee dockerbuild.log
buildah config --cmd "/bin/smiinit -c /smi -f /smi.yaml" "$(ctr1)"
buildah commit "$(ctr1)" "smifull"

Expand All @@ -83,19 +83,19 @@ $(HOME)/rdmp-cli/rdmp: rdmp-cli-linux-x64.zip
chmod +x $(HOME)/rdmp-cli/rdmp

rdmp-cli-linux-x64.zip:
wget https://github.com/HicServices/RDMP/releases/download/v$(RDMPV)/rdmp-cli-linux-x64.zip
wget -q https://github.com/HicServices/RDMP/releases/download/v$(RDMPV)/rdmp-cli-linux-x64.zip

ctpanonymiser-v$(SMIV).zip:
wget https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/ctpanonymiser-v$(SMIV).zip
wget -q https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/ctpanonymiser-v$(SMIV).zip

ctpanonymiser-1.0.0/CTPAnonymiser-portable-1.0.0.jar: ctpanonymiser-v$(SMIV).zip
[ -e $@ ] || unzip -DD $<

smi-nerd-v$(SMIV).jar:
wget https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-nerd-v$(SMIV).jar
wget -q https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-nerd-v$(SMIV).jar

ctp-whitelist.script:
wget https://raw.githubusercontent.com/SMI/SmiServices/v$(SMIV)/data/ctp/ctp-whitelist.script
wget -q https://raw.githubusercontent.com/SMI/SmiServices/v$(SMIV)/data/ctp/ctp-whitelist.script

smiinit: smiinit.cpp yaml-cpp/build/libyaml-cpp.a
ifeq ($(UNAME), Darwin)
Expand Down