diff --git a/projects/github.com/json-c/json-c/fixture.c b/projects/github.com/json-c/json-c/fixture.c new file mode 100644 index 00000000..e4defe2b --- /dev/null +++ b/projects/github.com/json-c/json-c/fixture.c @@ -0,0 +1,9 @@ +#include +#include +int main() { + json_object *obj = json_object_new_object(); + json_object *value = json_object_new_string("value"); + json_object_object_add(obj, "key", value); + printf("%s\n", json_object_to_json_string(obj)); + return 0; +} diff --git a/projects/github.com/json-c/json-c/package.yml b/projects/github.com/json-c/json-c/package.yml new file mode 100644 index 00000000..087d4331 --- /dev/null +++ b/projects/github.com/json-c/json-c/package.yml @@ -0,0 +1,26 @@ +distributable: + url: https://s3.amazonaws.com/json-c_releases/releases/json-c-{{ version.raw }}.tar.gz + strip-components: 1 + +versions: + github: json-c/json-c/tags + strip: + - /^json-c-/ + - /-\d{8}/ # calver + +build: + dependencies: + cmake.org: 3 + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + working-directory: build + script: | + cmake .. -DCMAKE_INSTALL_PREFIX="{{prefix}}" -DCMAKE_BUILD_TYPE=Release + make --jobs {{ hw.concurrency }} install + +test: + dependencies: + tea.xyz/gx/cc: c99 + script: | + cc fixture.c -ljson-c + ./a.out