blob: 119d42376758e38e3905ce916ab55de96ca89e4d (
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
|
# Maintainer: CyanWoods <i at cyanwoods dot com>
pkgbase=spdk
pkgname=('spdk' 'python-spdk')
pkgver=23.05
pkgrel=3
pkgdesc='spdk: headers, libs, and scripts'
arch=('x86_64')
license=('BSD')
url='https://spdk.io/'
depends=('bash' 'dpdk' 'dtc' 'libaio' 'libarchive' 'libbsd' 'liburing' 'numactl' 'util-linux-libs')
makedepends=('cmake' 'git' 'meson' 'python-pyelftools' 'python-configshell-fb' 'python-grpcio' 'python-google-api-core' 'python-ipaddress')
provides=('spdk' 'python-spdk')
conflicts=()
source=("$pkgbase::git+https://github.com/spdk/spdk.git#tag=v${pkgver}")
sha256sums=('SKIP')
prepare() {
cd "$srcdir/$pkgbase"
git submodule update --init
}
build() {
cd "$srcdir/$pkgbase"
./configure --prefix=/usr --with-dpdk --disable-examples --disable-tests --disable-unit-tests --enable-lto --with-uring --without-uring-zns
make
}
package_spdk() {
cd "$srcdir/$pkgbase"
DESTDIR="${pkgdir}" make install
# self-contained /usr/bin/spdk-setup
echo '#!/usr/bin/env bash' >$pkgdir/usr/bin/spdk-setup
cat scripts/{common,setup}.sh >>$pkgdir/usr/bin/spdk-setup
sed -ri '/^rootdir/d;/^source/d;s,\$rootdir,/usr,' $pkgdir/usr/bin/spdk-setup
chmod +x $pkgdir/usr/bin/spdk-setup
install -Dm644 "scripts/bash-completion/spdk" "$pkgdir/usr/share/bash-completion/completions/spdk"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python-spdk() {
arch=('any')
pkgdesc='spdk: python support'
depends=('python-configshell-fb' 'python-grpcio' 'python-google-api-core' 'python-pyparsing' 'python-ipaddress')
local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
#cd "$srcdir/$pkgbase/python"
#python -m compileall .
cd "$srcdir/$pkgbase"
mkdir -p $pkgdir${site_packages}
cp -a python/spdk $pkgdir${site_packages}
install -Dm755 "scripts/spdkcli.py" "$pkgdir/usr/bin/spdkcli"
sed -i '/sys\.path\.append/d' "$pkgdir/usr/bin/spdkcli"
install -Dm755 "scripts/rpc.py" "$pkgdir/usr/bin/spdkrpc"
sed -i '/sys\.path\.append/d' "$pkgdir/usr/bin/spdkrpc"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|