archrelease: copy trunk to community-any
[ArchLinux/community.git] / intel-oneapi-compiler-shared-runtime / trunk / PKGBUILD
blob5574750c564230fefe524b0ec247e52ec5123e7b
1 # Maintainer: Konstantin Gizdov <arch at kge dot pw>
2 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
4 _pkgname='intel-oneapi-compiler-shared'
5 pkgbase="${_pkgname}-runtime"
6 pkgname=("${_pkgname}-runtime" "${_pkgname}-runtime-libs")
7 pkgver=2023.1.0
8 _debpkgrel=46305
9 pkgrel=1
10 _pkgdesc="Intel oneAPI compiler runtime libraries"
11 arch=('x86_64')
12 url='https://software.intel.com/content/www/us/en/develop/tools/oneapi.html'
13 license=("custom")
14 depends=('level-zero-loader')
15 source=("https://apt.repos.intel.com/oneapi/pool/main/${pkgname}-${pkgver}-${pkgver}-${_debpkgrel}_amd64.deb"
16         "https://apt.repos.intel.com/oneapi/pool/main/${_pkgname}-common-${pkgver}-${pkgver}-${_debpkgrel}_all.deb")
17 b2sums=('ad9e815fdf451a4d5bd645f925c05e17f5b358306c7d454bd5ac93e24e7d5e1f9924ee6b81e0d0c4853c4465ee17b1230604f401b2e44db23f597d8f00322f2e'
18         '3f47c8bcfed7b5f993296ffc8c530a0fd431ebde7e2debb528700bd00dfd6fd725d53afd1edc21711d7534297cef80a72926b699c7f045e2262967dfe222af5d')
20 noextract=(
21     "${pkgname}-${pkgver}-${pkgver}-${_debpkgrel}_amd64.deb"
22     "${_pkgname}-common-${pkgver}-${pkgver}-${_debpkgrel}_all.deb"
25 prepare() {
26     mkdir "${_pkgname}-${pkgver}"
27     ar x "${srcdir}/${pkgname}-${pkgver}-${pkgver}-${_debpkgrel}_amd64.deb"
28     tar xvf data.tar.xz -C "${_pkgname}-${pkgver}"
29     rm data.tar.xz
30     ar x "${srcdir}/${_pkgname}-common-${pkgver}-${pkgver}-${_debpkgrel}_all.deb"
31     tar xvf data.tar.xz -C "${_pkgname}-${pkgver}"
32     rm data.tar.xz
35 package_intel-oneapi-compiler-shared-runtime-libs() {
36     depends=('intel-oneapi-common')
37     conflicts=('intel-oneapi-basekit')
38     pkgdesc="${_pkgdesc}: Minimal compiler libraries"
40     local _lib_path='/opt/intel/oneapi/compiler'
41     install -d "${pkgdir}/${_lib_path}/${pkgver}/linux/bin"
42     local _bin
43     for _bin in sycl-ls sycl-post-link; do
44         cp -a "${srcdir}/${_pkgname}-${pkgver}/${_lib_path}/${pkgver}/linux/bin/${_bin}" \
45             "${pkgdir}/${_lib_path}/${pkgver}/linux/bin"
46     done
48     install -d "${pkgdir}/${_lib_path}/${pkgver}/linux/compiler"
49     cp -a "${srcdir}/${_pkgname}-${pkgver}/${_lib_path}/${pkgver}/linux/compiler/include" \
50         "${pkgdir}/${_lib_path}/${pkgver}/linux/compiler"
52     cp -a "${srcdir}/${_pkgname}-${pkgver}/${_lib_path}/${pkgver}/linux/compiler/lib" \
53         "${pkgdir}/${_lib_path}/${pkgver}/linux/compiler"
55     # add latest and common symlink
56     ln -s "${_lib_path}/${pkgver}" "${pkgdir}/${_lib_path}/latest"
57     ln -s "${_lib_path}/latest/linux/compiler/lib/intel64_lin" \
58           "${pkgdir}/${_lib_path}/${pkgver}/linux/compiler/lib/intel64"
60     # allow libs to be found
61     local _ldso_conf="${pkgdir}"/etc/ld.so.conf.d
62     install -d "${_ldso_conf}"
63     echo "${_lib_path}/latest/linux/compiler/lib/intel64_lin" >> "${_ldso_conf}/${pkgname}.conf"
65     install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
66     ln -s /usr/share/licenses/intel-oneapi "${pkgdir}"/usr/share/licenses/"${pkgname}"/oneapi
69 package_intel-oneapi-compiler-shared-runtime() {
70     depends=('intel-oneapi-openmp' 'intel-oneapi-common' 'intel-oneapi-compiler-shared-runtime-libs')
71     provides=("${_pkgname}-common")
72     conflicts=('intel-oneapi-basekit')
73     pkgdesc="${_pkgdesc}: Shared runtime without OpenCL"
75     local _lib_path='/opt/intel/oneapi/compiler'
76     install -d "${pkgdir}/${_lib_path}/${pkgver}/linux"
77     cp -a "${srcdir}/${_pkgname}-${pkgver}/${_lib_path}/${pkgver}/linux/bin-llvm" \
78         "${pkgdir}/${_lib_path}/${pkgver}/linux"
80     cp -a "${srcdir}/${_pkgname}-${pkgver}/${_lib_path}/${pkgver}/linux/include" \
81         "${pkgdir}/${_lib_path}/${pkgver}/linux"
83     cp -a "${srcdir}/${_pkgname}-${pkgver}/${_lib_path}/${pkgver}/linux/lib" \
84         "${pkgdir}/${_lib_path}/${pkgver}/linux"
86     install -d "${pkgdir}/${_lib_path}/${pkgver}/linux/bin"
87     local _bin
88     for _bin in aocl-ioc64 icx-cc icx-cl icx.cfg ioc64; do
89         cp -a "${srcdir}/${_pkgname}-${pkgver}/${_lib_path}/${pkgver}/linux/bin/${_bin}" \
90             "${pkgdir}/${_lib_path}/${pkgver}/linux/bin"
91     done
93     # allow libs to be found
94     local _ldso_conf="${pkgdir}"/etc/ld.so.conf.d
95     install -d "${_ldso_conf}"
96     echo "${_lib_path}/latest/linux/lib" > "${_ldso_conf}/${pkgname}.conf"
97     echo "${_lib_path}/latest/linux/lib/x64" >> "${_ldso_conf}/${pkgname}.conf"
99     install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
100     ln -s /usr/share/licenses/intel-oneapi "${pkgdir}"/usr/share/licenses/"${pkgname}"/oneapi