new file: projects/people.redhat.com/sgrubb/libcap-ng/package.yml

new file:   projects/people.redhat.com/sgrubb/libcap-ng/test.c
This commit is contained in:
Andrii Riabchenko 2023-11-22 18:25:43 +02:00 committed by Jacob Heider
parent c20baabb1a
commit 1245af6a42
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,31 @@
distributable:
url: https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-{{version}}.tar.gz
strip-components: 1
display-name: libcap-ng
versions:
url: https://people.redhat.com/sgrubb/libcap-ng/
match: /libcap-ng-\d+\.\d+\.\d+\.tar\.gz/
strip:
- /^libcap-ng-/
- /\.tar\.gz/
platforms:
- linux
build:
script:
- ./configure $CONFIGURE_ARGS
- make --jobs {{ hw.concurrency }}
- make --jobs {{ hw.concurrency }} install
env:
CONFIGURE_ARGS:
- --disable-dependency-tracking
- --prefix="{{prefix}}"
- --libdir="{{prefix}}/lib"
- --disable-silent-rules
provides:
- bin/captest
- bin/filecap
- bin/netcap
- bin/pscap
test:
- cc test.c -lcap-ng -o test
- ./test | grep ok

View file

@ -0,0 +1,8 @@
#include <stdio.h>
#include <cap-ng.h>
int main(int argc, char *argv[])
{
if(capng_have_permitted_capabilities() > -1)
printf("ok");
}