mirror of
https://github.com/ivabus/pantry
synced 2024-11-25 18:05:07 +03:00
56 lines
1.1 KiB
YAML
56 lines
1.1 KiB
YAML
distributable:
|
|
url: https://ftp.gnu.org/gnu/nettle/nettle-{{version}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
github: gnutls/nettle/tags
|
|
strip:
|
|
- /^nettle_/
|
|
- /_release_\d+/
|
|
|
|
build:
|
|
dependencies:
|
|
tea.xyz/gx/cc: c99
|
|
tea.xyz/gx/make: '*'
|
|
gnu.org/gmp: '*'
|
|
gnu.org/m4: '*'
|
|
script: |
|
|
./configure --prefix={{ prefix }}
|
|
make --jobs {{ hw.concurrency }} install
|
|
|
|
test:
|
|
dependencies:
|
|
tea.xyz/gx/cc: c99
|
|
script: |
|
|
mv $FIXTURE test.c
|
|
cc -lnettle -o test test.c
|
|
./test
|
|
fixture: |
|
|
#include <nettle/sha1.h>
|
|
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
struct sha1_ctx ctx;
|
|
uint8_t digest[SHA1_DIGEST_SIZE];
|
|
unsigned i;
|
|
|
|
sha1_init(&ctx);
|
|
sha1_update(&ctx, 4, "test");
|
|
sha1_digest(&ctx, SHA1_DIGEST_SIZE, digest);
|
|
|
|
printf("SHA1(test)=");
|
|
|
|
for (i = 0; i<SHA1_DIGEST_SIZE; i++)
|
|
printf("%02x", digest[i]);
|
|
|
|
printf("\\n");
|
|
return 0;
|
|
}
|
|
|
|
provides:
|
|
- bin/nettle-hash
|
|
- bin/nettle-lfib-stream
|
|
- bin/nettle-pbkdf2
|
|
- bin/pkcs1-conv
|
|
- bin/sexp-conv
|