blob: 701ffbc427f327c8937ebce25546cf91e928fd71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Maintainer: otaj <jasek.ota@gmail.com>
_pkgname=faiss
pkgbase=faiss-git
pkgname=('faiss-git' 'python-faiss-git')
arch=('i686' 'x86_64')
url="https://github.com/facebookresearch/faiss"
license=('MIT')
pkgver=1.6.1.r87.gc97f890
pkgrel=1
source=(${_pkgname}::git+https://github.com/facebookresearch/faiss.git)
sha256sums=('SKIP')
depends=('blas' 'lapack' 'openmp')
makedepends=('git' 'python' 'python-numpy' 'swig' 'python-setuptools' 'cmake')
optdepends=('intel-mkl')
pkgver() {
cd "${_pkgname}"
git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${srcdir}/${_pkgname}"
mkdir -p build
cd build
_CMAKE_FLAGS=""
cmake .. \
-DFAISS_ENABLE_GPU=OFF \
-DFAISS_ENABLE_PYTHON=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
}
build() {
cd "${srcdir}/${_pkgname}/build"
make
cd faiss/python
python setup.py build
}
package_faiss-git() {
pkgdesc='A library for efficient similarity search and clustering of dense vectors.'
provides=('faiss')
conflicts=('faiss')
cd "${srcdir}/${_pkgname}/build"
make DESTDIR="$pkgdir" install
cd ..
install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
package_python-faiss-git() {
pkgdesc='A library for efficient similarity search and clustering of dense vectors. Python wrappers'
provides=('python-faiss')
conflicts=('python-faiss')
depends=('python' 'python-numpy')
cd "${srcdir}/${_pkgname}/build/faiss/python"
python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
cd ../../..
install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|