pantry/projects/crates.io/rustls-ffi/package.yml

45 lines
977 B
YAML
Raw Normal View History

distributable:
url: https://codeload.github.com/rustls/rustls-ffi/tar.gz/refs/tags/v{{version}}
strip-components: 1
versions:
github: rustls/rustls-ffi/tags
strip: /v/
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
rust-lang.org/cargo: '*'
script: |
cargo install cbindgen
make DESTDIR={{prefix}}
make DESTDIR={{prefix}} install
test:
dependencies:
tea.xyz/gx/cc: c99
curl.se: '*'
env:
ARGS:
- -lrustls
linux:
ARGS:
- -Wl,--gc-sections
- -lpthread
- -ldl
darwin:
ARGS:
- -Wl,-dead_strip
- -framework Security
- -framework Foundation
TESTFILES:
- client.c
- common.c
- common.h
script: |
for file in $TESTFILES; do
curl -O https://raw.githubusercontent.com/rustls/rustls-ffi/v{{ version }}/tests/$file
done
cc client.c common.c -o client $ARGS
CA_FILE=$SSL_CERT_FILE ./client tea.xyz 443 /