Summary: NVML package Name: nvml Version: 9.1 Release: 3 Source0: nvml.h Source1: libnvidia-ml.so BuildArch: x86_64 Group: Applications/System License: MIT BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description NVML package %package devel Summary: Development files for the NVML package Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains files needed to develop applications using NVML. %prep %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_libdir}/nvml mkdir -p $RPM_BUILD_ROOT%{_includedir}/nvml for key in %{SOURCE0}; do install -D -m 644 "${key}" $RPM_BUILD_ROOT%{_includedir}/nvml/ done for key in %{SOURCE1}; do install -D -m 755 "${key}" $RPM_BUILD_ROOT%{_libdir}/nvml done cd $RPM_BUILD_ROOT%{_libdir}/nvml ln -sfn libnvidia-ml.so libnvidia-ml.so.1 cd - %files %{_libdir}/nvml/* %files devel %{_includedir}/nvml/* %changelog