blob: 3b42e7650ceef6378430791c84bf67aee3a6c3b3 (
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# Maintainer: Darren Ng <$(base64 --decode <<<'ZGFycmVuMTk5NzA4MTBAZ21haWwuY29tCg==')>
# Co-Maintainer: Simon Krogmann <$(base64 --decode <<<'cy5rcm9nbWFubkB5YWhvby5jb20K')>
_org=pmem
pkgname=pmdk
pkgver=1.11.1
pkgrel=1
pkgdesc="Persistent Memory Development Kit"
arch=('x86_64')
url="https://pmem.io/"
license=('BSD')
depends=(
'ndctl>=63' # 'daxctl' included
)
makedepends=(
'pandoc'
)
# checkdepends=()
optdepends=(
'libfabric>=1.4.2: required by librpmem'
)
provides=(
'libpmem'
'libpmem2'
'libpmemobj'
'libpmemblk'
'libpmemlog'
'libpmempool'
'librpmem'
)
backup=()
options=()
source=("$pkgname-$pkgver.tar.gz::https://github.com/$_org/$pkgname/archive/$pkgver.tar.gz")
sha1sums=('e180377efa67f3db8c5fd322737e4f1f1cfb4eb9')
prepare() {
# grep -nr -i -e 'ix/etc' -e 'ix)/etc'
# grep -nr -Fe 'export sysconfdir'
# src/pmdk-1.8/src/common.inc:220:export sysconfdir := $(prefix)/etc
cd "$pkgname-$pkgver"
sed -i 's#^export sysconfdir.*$#export sysconfdir := /etc#g' src/common.inc
}
build() {
cd "$pkgname-$pkgver"
# grep -nr -Fe '?='
/bin/time -f '\n %E\n' make LIB_PREFIX=lib prefix=/usr PREFIX=/usr
}
# https://github.com/pmem/pmdk#testing-libraries-on-linux-and-freebsd
# https://github.com/pmem/pmdk/blob/master/src/test/README
# check() {
# cd "$pkgname-$pkgver/src/test" || return 1
# make -k test
# cp -v testconfig.sh.example testconfig.sh
# ./RUNTESTS
# }
package() {
cd "$pkgname-$pkgver"
# pkgdir=/home/darren/.cache/yay/pmdk/pkg
make LIB_PREFIX=lib prefix=/usr PREFIX=/usr DESTDIR="$pkgdir/" install
# Fix 01
# mv -v "$pkgdir/usr/lib64" "$pkgdir/usr/lib"
# Fix 02
# pacman -Qo /usr/share/bash-completion/completions/* | grep -v "owned by bash-completion"
install -Dvm644 "$pkgdir/etc/bash_completion.d/pmempool" "$pkgdir/usr/share/bash-completion/completions/pmempool"
rm -v "$pkgdir/etc/bash_completion.d/pmempool"
rmdir -v "$pkgdir/etc/bash_completion.d"
rmdir -v "$pkgdir/etc"
# Fix 03
# pmdk E: Insecure RPATH '/usr/local/lib' in file ('usr/lib/libpmem<*>.so.1.0.0')
# pmdk E: Insecure RPATH '/usr/local/lib/pmdk_debug' in file ('usr/lib/pmdk_debug/libpmem<*>.so.1.0.0')
# pmdk W: Referenced library '<*>.so.1' is an uninstalled dependency
# patchelf
# chrpath
install -Dvm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|