mirror of
https://github.com/ivabus/pantry
synced 2024-11-14 04:25:08 +03:00
52 lines
985 B
YAML
52 lines
985 B
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:
|
|
gnu.org/gmp: '*'
|
|
gnu.org/m4: '*'
|
|
script: |
|
|
./configure --prefix={{ prefix }}
|
|
make --jobs {{ hw.concurrency }} install
|
|
|
|
test:
|
|
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
|