upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / intel-oneapi-mkl / trunk / PKGBUILD
blob58468296d8ed1748ca96269c5f8780173a9202ef
1 # Maintainer: Konstantin Gizdov <arch at kge dot pw>
2 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
3 # Contributor: huyz
4 # Contributor: Jingbei Li <i@jingbei.li>
5 pkgname=intel-oneapi-mkl
6 _pkgver=2023.1.0
7 _debpkgrel=46342
8 pkgver=${_pkgver}_${_debpkgrel}
9 pkgrel=1
10 pkgdesc="Intel oneAPI Math Kernel Library"
11 arch=('x86_64')
12 url='https://software.intel.com/content/www/us/en/develop/tools/oneapi.html'
13 license=("custom")
14 source=("https://apt.repos.intel.com/oneapi/pool/main/${pkgname}-${_pkgver}-${_pkgver}-${_debpkgrel}_amd64.deb"
15         "https://apt.repos.intel.com/oneapi/pool/main/${pkgname}-devel-${_pkgver}-${_pkgver}-${_debpkgrel}_amd64.deb"
16         "https://apt.repos.intel.com/oneapi/pool/main/${pkgname}-common-${_pkgver}-${_pkgver}-${_debpkgrel}_all.deb"
17         "https://apt.repos.intel.com/oneapi/pool/main/${pkgname}-common-devel-${_pkgver}-${_pkgver}-${_debpkgrel}_all.deb"
18         "${pkgname}.conf"
19         "${pkgname}.sh")
20 depends=('intel-oneapi-compiler-dpcpp-cpp-runtime' 'intel-oneapi-tbb' 'intel-oneapi-common')
21 replaces=('intel-mkl' 'intel-mkl-static')
22 provides=('intel-mkl' 'intel-mkl-static')
23 conflicts=('intel-mkl' 'intel-mkl-static' 'intel-oneapi-basekit')
24 options=('staticlibs')
25 noextract=("${pkgname}-${_pkgver}-${_pkgver}-${_debpkgrel}_amd64.deb"
26            "${pkgname}-devel-${_pkgver}-${_pkgver}-${_debpkgrel}_amd64.deb"
27            "${pkgname}-common-${_pkgver}-${_pkgver}-${_debpkgrel}_all.deb"
28            "${pkgname}-common-devel-${_pkgver}-${_pkgver}-${_debpkgrel}_all.deb")
29 sha256sums=('0581a867bed4ef620812bc05faa35228b7439d4f1d33f0eb4483f7eb8cafe8aa'
30             '1eeb94ad7aeebd55873cb64f2ba3db5a202e3c6f17c7d3095742aeb95c72f2cd'
31             '50c1537cd8252b443802325a6938f607b4b3801c552e77aacaa8d9d9dfc8c34e'
32             'bb096792ea3669a0977beb0949c49238e0e43e3bc48a7f63abc5fdb856562651'
33             'cd787d9843146ad5ccf28ec72311d76d95d6bb9e42974dd614d8b5aa76bb5bd9'
34             '85a56750e03ad99a5b99e7296dcea411fb88c4a0a25e674c86ab48f5648d9ae9')
36 package() {
37     ar x ${pkgname}-${_pkgver}-${_pkgver}-${_debpkgrel}_amd64.deb
38     tar xf data.tar.xz -C "${pkgdir}"
39     rm data.tar.xz
41     ar x ${pkgname}-devel-${_pkgver}-${_pkgver}-${_debpkgrel}_amd64.deb
42     tar xf data.tar.xz -C "${pkgdir}"
43     rm data.tar.xz
45     ar x ${pkgname}-common-${_pkgver}-${_pkgver}-${_debpkgrel}_all.deb
46     tar xf data.tar.xz -C "${pkgdir}"
47     rm data.tar.xz
49     ar x ${pkgname}-common-devel-${_pkgver}-${_pkgver}-${_debpkgrel}_all.deb
50     tar xf data.tar.xz -C "${pkgdir}"
51     rm data.tar.xz
53     # drop conda binaries
54     rm -r "${pkgdir}"/opt/intel/oneapi/conda_channel
56     # symlink mkl version
57     ln -s "$_pkgver" ${pkgdir}/opt/intel/oneapi/mkl/latest
59     install -Dm644 ${pkgname}.conf ${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf
60     install -Dm644 ${pkgname}.sh ${pkgdir}/etc/profile.d/${pkgname}.sh
62     install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
63     ln -s /usr/share/licenses/intel-oneapi "${pkgdir}"/usr/share/licenses/"${pkgname}"/oneapi
65     # pkgconfig
66     cd ${pkgdir}/opt/intel/oneapi/mkl/latest/lib/pkgconfig
67     install -d ${pkgdir}/usr/share/pkgconfig
68     for _file in *.pc; do
69         ln -s /opt/intel/oneapi/mkl/latest/lib/pkgconfig/${_file} ${pkgdir}/usr/share/pkgconfig/${_file}
70         sed -e 's@prefix=.*@prefix=/opt/intel/oneapi/mkl/latest@g' -i ${_file}
71     done
73     # provide old intel-mkl
74     install -d ${pkgdir}/usr/bin
75     install -d ${pkgdir}/opt/intel/mkl
76     install -d ${pkgdir}/opt/intel/mkl/lib
77     ln -sf /opt/intel/oneapi/mkl/latest/bin/intel64 ${pkgdir}/opt/intel/mkl/bin
78     ln -sf /opt/intel/oneapi/mkl/latest/lib/intel64 ${pkgdir}/opt/intel/mkl/lib/intel64
79     ln -sf /opt/intel/oneapi/mkl/latest/lib/intel64 ${pkgdir}/opt/intel/mkl/lib/intel64_lin
80     ln -sf /opt/intel/oneapi/mkl/latest/include ${pkgdir}/opt/intel/mkl/include
81     ln -sf ${pkgdir}/opt/intel/mkl/bin/mkl_link_tool ${pkgdir}/usr/bin/mkl_link_tool