db-move: moved linux-zen from [testing] to [extra] (x86_64)
[arch-packages.git] / lapack / repos / extra-x86_64 / PKGBUILD
blob3974b2b663ee59cd55b3c783c810d10c3da74426
1 # Maintainer: Ronald van Haren <ronald.archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
3 # Contributor: damir <damir@archlinux.org>
4 # Contributor: Jason Taylor <jftaylor21@gmail.com>
6 pkgbase=lapack
7 pkgname=(lapack blas cblas lapacke lapack64 blas64 cblas64 lapacke64 lapack-doc)
8 pkgver=3.11.0
9 pkgrel=2
10 url='https://www.netlib.org/lapack'
11 pkgdesc='Linear Algebra PACKage'
12 makedepends=(gcc-fortran cmake python doxygen)
13 arch=(x86_64)
14 license=(custom)
15 source=(https://github.com/Reference-LAPACK/lapack/archive/v$pkgver/$pkgname-$pkgver.tar.gz LICENSE.blas)
16 sha256sums=('4b9ba79bfd4921ca820e83979db76ab3363155709444a787979e81c22285ffa9'
17             '2420cd1331c5754071966389b26e6196c5cb086a2ade0080953af62e0c6d4107')
19 build() {
20   cmake -B build -S $pkgname-$pkgver \
21     -DCMAKE_SKIP_RPATH=ON \
22     -DBUILD_SHARED_LIBS=ON \
23     -DBUILD_TESTING=OFF \
24     -DCMAKE_INSTALL_PREFIX=/usr \
25     -DCMAKE_Fortran_COMPILER=gfortran \
26     -DLAPACKE_WITH_TMG=ON \
27     -DCBLAS=ON \
28     -DBUILD_DEPRECATED=ON
29   cmake --build build
31   cmake -B build64 -S $pkgname-$pkgver \
32     -DCMAKE_SKIP_RPATH=ON \
33     -DBUILD_SHARED_LIBS=ON \
34     -DBUILD_TESTING=OFF \
35     -DCMAKE_INSTALL_PREFIX=/usr \
36     -DCMAKE_Fortran_COMPILER=gfortran \
37     -DLAPACKE_WITH_TMG=ON \
38     -DCBLAS=ON \
39     -DBUILD_DEPRECATED=ON \
40     -DBUILD_INDEX64=ON
41   cmake --build build64
43 # Build man pages
44   cd $pkgname-$pkgver
45   doxygen DOCS/Doxyfile_man
48 package_lapack() {
49   depends=(blas)
50   
51   DESTDIR="$pkgdir" cmake --install build
53   rm -r "$pkgdir"/usr/lib/{libblas.*,libcblas.*,liblapacke.*}
54   rm -r "$pkgdir"/usr/lib/pkgconfig/{blas.*,cblas.*,lapacke.*}
55   rm -r "$pkgdir"/usr/lib/cmake/{cblas*,lapacke*}
56   rm -r "$pkgdir"/usr/include
59 package_blas() {
60   pkgdesc='Basic Linear Algebra Subprograms'
61   depends=(gcc-libs)
63   DESTDIR="$pkgdir" cmake --install build/BLAS
64   
65   install -Dm644 LICENSE.blas -t "$pkgdir"/usr/share/licenses/blas/
68 package_cblas() {
69   pkgdesc='C interface to BLAS'
70   depends=(blas)
72   DESTDIR="$pkgdir" cmake --install build/CBLAS
75 package_lapacke() {
76   pkgdesc='C interface to LAPACK'
77   depends=(lapack)
79   DESTDIR="$pkgdir" cmake --install build/LAPACKE
82 package_lapack64() {
83   pkgdesc='Linear Algebra PACKage (64-bit integers)'
84   depends=(blas64)
86   DESTDIR="$pkgdir" cmake --install build64
88   rm -r "$pkgdir"/usr/lib/{libblas64.*,libcblas64.*,liblapacke64.*}
89   rm -r "$pkgdir"/usr/lib/pkgconfig/{blas64.*,cblas64.*,lapacke64.*}
90   rm -r "$pkgdir"/usr/lib/cmake/{cblas*,lapacke*}
91   rm -r "$pkgdir"/usr/include
94 package_blas64() {
95   pkgdesc='Basic Linear Algebra Subprograms (64-bit integers)'
96   depends=(gcc-libs)
98   DESTDIR="$pkgdir" cmake --install build64/BLAS
100   install -Dm644 LICENSE.blas -t "$pkgdir"/usr/share/licenses/$pkgname/
103 package_cblas64() {
104   pkgdesc='C interface to BLAS (64-bit integers)'
105   depends=(blas64)
106   optdepends=('cblas: development headers')
108   DESTDIR="$pkgdir" cmake --install build64/CBLAS
109   rm -r "$pkgdir"/usr/include # Provided by cblas
112 package_lapacke64() {
113   pkgdesc='C interface to LAPACK (64-bit integers)'
114   depends=(lapack64)
115   optdepends=('lapacke: development headers')
117   DESTDIR="$pkgdir" cmake --install build64/LAPACKE
118   rm -r "$pkgdir"/usr/include # Provided by lapacke
121 package_lapack-doc() {
122   pkgdesc='Man pages for BLAS/LAPACK'
124   mkdir -p "$pkgdir"/usr/share
125   cp -r lapack-$pkgver/DOCS/man "$pkgdir"/usr/share
126   rm "$pkgdir"/usr/share/man/man3/{MIN,MAX}.3 # conflict with man-pages