forked from contentauth/c2pa-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (24 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.PHONY: all
all: rust types go
.PHONY: rust
rust:
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.1+v0.25.0
cargo build --release
.PHONY: types
types:
go install github.com/atombender/go-jsonschema@latest
cargo install --git https://github.com/aquareum-tv/c2pa-rs export_schema
export_schema
go-jsonschema --only-models -p manifeststore ./target/schema/ManifestStore.schema.json -o pkg/c2pa/generated/manifeststore/manifeststore.go
go-jsonschema --only-models -p manifestdefinition ./target/schema/ManifestDefinition.schema.json -o pkg/c2pa/generated/manifestdefinition/manifestdefinition.go
go-jsonschema --only-models -p settings ./target/schema/Settings.schema.json -o pkg/c2pa/generated/settings/settings.go
.PHONY: go
go:
mkdir -p dist
uniffi-bindgen-go src/c2pa.udl --out-dir pkg/c2pa/generated
go build -a -o ./dist/go-demo ./pkg/c2pa/demo/...
# need es256k-enabled c2patool
.PHONY: test
test:
cargo install --git https://git.stream.place/aquareum-tv/c2patool.git
go test ./pkg/...