blob: df6c2cc31bd4cfb7d0a5e2f0558a334e00f6a648 (
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
|
# Maintainer: Zile995 <stefan.zivkovic995@gmail.com>
pkgname=zswap-cli-git
_pkgname="${pkgname%-git}"
pkgver=0.9.1.r14.g224fdea
pkgrel=2
pkgdesc="Command-line tool to control ZSwap Linux kernel module"
arch=('x86_64')
url="https://github.com/xvitaly/${_pkgname}"
license=('MIT')
provides=("$_pkgname")
conflicts=("$_pkgname")
depends=('boost' 'fmt' 'sdbus-cpp' 'systemd')
makedepends=('cmake' 'gcc' 'git' 'ninja' 'pandoc')
optdepends=('semver: Semantic versioning for C++')
backup=('etc/zswap-cli/zswap-cli.conf')
source=("${_pkgname}::git+$url")
sha512sums=('SKIP')
pkgver() {
cd "${srcdir}/${_pkgname}"
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
sed -i \
's/CMAKE_INSTALL_SBINDIR/CMAKE_INSTALL_BINDIR/g' \
"${srcdir}/${_pkgname}/CMakeLists.txt"
cmake \
-G Ninja \
-B "${_pkgname}/build" \
-S "${_pkgname}" \
-DBUILD_MANPAGE:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:PATH='/usr' \
-DCMAKE_BUILD_TYPE:STRING='RelWithDebInfo' \
-Wno-dev
cmake --build "${_pkgname}/build"
}
package() {
DESTDIR="${pkgdir}/" cmake --install "${_pkgname}/build"
# license
install -D -m644 "${srcdir}/${_pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|