upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / rocsparse / trunk / PKGBUILD
blob246165ef4508b3d184a4e387b2a34186caa12369
1 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
2 # Contributor: Markus Näther <naetherm@informatik.uni-freiburg.de>
3 pkgname=rocsparse
4 pkgver=5.5.0
5 pkgrel=1
6 pkgdesc='BLAS for sparse computation on top of ROCm'
7 arch=('x86_64')
8 url='https://rocsparse.readthedocs.io/en/master/'
9 license=('MIT')
10 depends=('hip' 'rocprim')
11 makedepends=('rocm-cmake' 'gcc-fortran')
12 _git='https://github.com/ROCmSoftwarePlatform/rocSPARSE'
13 source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
14 sha256sums=('cbee79b637691bc710c1c83fbaa91db7498d38d4df873be23e28ed5617acde72')
15 options=(!lto)
16 _dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
18 build() {
19   # -fcf-protection is not supported by HIP, see
20   # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.5/page/Compiler_Options_and_Features.html#d2e2018
21   CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
22   cmake \
23     -Wno-dev \
24     -B build \
25     -S "$_dirname" \
26     -DCMAKE_BUILD_TYPE=None \
27     -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
28     -DCMAKE_INSTALL_PREFIX=/opt/rocm
29   cmake --build build
32 package() {
33   DESTDIR="$pkgdir" cmake --install build
35   echo '/opt/rocm/rocsparse/lib' > "$pkgname.conf"
36   install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
38   install -Dm644 "$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"