# FIXME: gocheck errors: # symbol lookup error: nvml.test: undefined symbol: nvmlGpuInstanceGetComputeInstanceProfileInfoV # with __golang_extldflags -Wl,-z,lazy: # symbol lookup error: nvml.test: undefined symbol: nvmlShutdown %bcond_without check %global debug_package %{nil} %bcond_with kmod %global __golang_extldflags -Wl,-z,lazy -Wl,--export-dynamic # https://github.com/NVIDIA/go-nvml %global goipath github.com/NVIDIA/go-nvml %global tag v0.12.0-3 %gometa -L -f %global common_description %{expand: Go Bindings for the NVIDIA Management Library (NVML).} %global golicenses LICENSE %global godocs examples CONTRIBUTING.md README.md Name: %{goname} Version: 0.12.0.3 Release: %autorelease Summary: Go Bindings for the NVIDIA Management Library (NVML) License: Apache-2.0 URL: %{gourl} Source: %{gosource} %description %{common_description} %gopkg %prep %goprep %autopatch -p1 %generate_buildrequires %go_generate_buildrequires %install %gopkginstall %if %{with check} %check # Don't test the following: # gen/: directory to house any code used in the generation of the final Go bindings # we are only using the existing generated bindings, not re-generating them # pkg/dl: code used to dynamically load the libnvidia-ml.so code from a host system # pkg/nvml: tests require dynamically linking in libnvidia-ml.so code from a host system # and this is not available in the buildsys, tests manually checked with: # pushd pkg/nvml; go test .; popd # or: '--with kmod' and correctly configured drivers in the build environment %if %{with kmod} %gocheck -r gen/.* -r pkg/dl.* %else %gocheck -r gen/.* -r pkg/dl.* -r pkg/nvml.* %endif %endif %gopkgfiles %changelog %autochangelog