a53e9c2
%global commit 172d101e103ae1dd6e1ed52aa708b65ba63e386d
a53e9c2
%global shortcommit %(c=%{commit}; echo ${c:0:7})
a53e9c2
fedb63e
Name:           hsakmt
a53e9c2
Version:        1.0.6
9a4f454
Release:        5.20171026git%{shortcommit}%{?dist}
2ed2aee
Summary:        AMD's HSA thunk library
2ed2aee
a53e9c2
License:        MIT
a53e9c2
URL:            https://github.com/RadeonOpenCompute/ROCm
015263e
Source0:        https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/archive/%{commit}/lib%{name}-%{shortcommit}.tar.gz
a53e9c2
Patch0:         0001-Fix-install-targets.patch
a53e9c2
Patch1:         0001-CMakeLists-Set-the-correct-default-version.patch
386d4f2
Patch2:         0001-Fix-build-with-gcc-8.patch
73c90ee
Patch3:         0001-Use-CFLAGS-and-LDFLAGS-specified-in-environment-vari.patch
2ed2aee
2f05c8a
ExclusiveArch: x86_64 aarch64
a53e9c2
BuildRequires: cmake
a53e9c2
BuildRequires: pciutils-devel
c37408e
9a4f454
%if 0%{?epel} == 7
9a4f454
# We still the original cmake package on epel, because it provides the
9a4f454
# %%cmake macro.
9a4f454
BuildRequires: cmake3
9a4f454
%global __cmake %{_bindir}/cmake3
9a4f454
%endif
9a4f454
2ed2aee
%description
a53e9c2
This package includes the libhsakmt (Thunk) libraries
a53e9c2
for AMD KFD
a53e9c2
2ed2aee
2ed2aee
%package devel
2ed2aee
Summary: AMD HSA thunk library development package
a53e9c2
Requires: %{name}%{?_isa} = %{version}-%{release}
2ed2aee
2ed2aee
%description devel
2ed2aee
Development library for hsakmt.
2ed2aee
2ed2aee
%prep
a53e9c2
%autosetup -n  ROCT-Thunk-Interface-%{commit} -p1
2ed2aee
2ed2aee
%build
a53e9c2
mkdir build
a53e9c2
cd build
2ed2aee
a53e9c2
%cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
a53e9c2
%make_build
2ed2aee
2ed2aee
%install
a53e9c2
cd build
a53e9c2
%make_install
2ed2aee
2ed2aee
%post -p /sbin/ldconfig
2ed2aee
%postun -p /sbin/ldconfig
2ed2aee
2ed2aee
%files
a53e9c2
%doc README.md
a53e9c2
%license LICENSE.md
a53e9c2
%{_libdir}/libhsakmt.so.%{version}
a53e9c2
%{_libdir}/libhsakmt.so.1
2ed2aee
2ed2aee
%files devel
a53e9c2
%{_libdir}/libhsakmt.so
a53e9c2
%{_includedir}/libhsakmt/hsakmt.h
a53e9c2
%{_includedir}/libhsakmt/hsakmttypes.h
a53e9c2
%{_includedir}/libhsakmt/linux/kfd_ioctl.h
2ed2aee
2ed2aee
%changelog
9a4f454
* Fri Feb 23 2018 Tom Stellard <tstellar@redhat.com> - 1.0.6-5.20171026git172d101
9a4f454
- Fix build for epel7
9a4f454
73c90ee
* Mon Feb 12 2018 Tom Stellard <tstellar@redhat.com> - 1.0.6-4.20171026git172d101
73c90ee
- Fix build flag injection
73c90ee
- rhbz#1543787
73c90ee
2f05c8a
* Fri Feb 09 2018 Tom Stellard <tstellar@redhat.com> - 1.0.6-3.20171026git172d101
2f05c8a
- Build for aarch64
2f05c8a
386d4f2
* Mon Feb 05 2018 Tom Stellard <tstellar@redhat.com> - 1.0.6-2.20171026git172d101
386d4f2
- Fix build with gcc 8
386d4f2
a53e9c2
* Thu Oct 26 2017 Tom Stellard <tstellar@redhat.com> - 1.0.6-1.20171026git172d101
a53e9c2
- Update with latest code from https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface
a53e9c2
c37408e
* Fri Nov 13 2015 Oded Gabbay <oded.gabbay@gmail.com> 1.0.0-6
c37408e
- Don't declare variable in for loop
c37408e
7e55b92
* Fri Nov 13 2015 Oded Gabbay <oded.gabbay@gmail.com> 1.0.0-5
7e55b92
- Don't build for arm and i686
7e55b92
fedb63e
* Fri Nov 13 2015 Oded Gabbay <oded.gabbay@gmail.com> 1.0.0-4
fedb63e
- Rename package back to hsakmt
fedb63e
2ed2aee
* Sun Nov 1 2015 Oded Gabbay <oded.gabbay@gmail.com> 1.0.0-3
2ed2aee
- Rename package to libhsakmt
2ed2aee
2ed2aee
* Thu Oct 29 2015 Oded Gabbay <oded.gabbay@gmail.com> 1.0.0-2
2ed2aee
- Changed doc to license
2ed2aee
- Added GPLv2 to license
2ed2aee
- Changed RPM_BUILD_ROOT to {buildroot}
2ed2aee
2ed2aee
* Sat Oct 24 2015 Oded Gabbay <oded.gabbay@gmail.com> 1.0.0-1
2ed2aee
- Initial release of hsakmt, ver. 1.0.0
a53e9c2