blob: 389c14980aad5ce12e6a9acd91296cc1b1a8b149 (
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
|
# Maintainer: Peter Jung ptr1337 <admin@ptr1337.dev>
# Maintainer: Piotr Górski <lucjan.lucjanov@gmail.com>
pkgname=scx-scheds-git
gitname=scx
pkgver=0.1.10.r166.g769e6c4
pkgrel=1
pkgdesc="sched_ext schedulers"
arch=('x86_64')
url="https://github.com/sched-ext/scx"
license=('GPL-2.0-only')
depends=('libelf' 'zlib' 'jq')
makedepends=('git' 'python' 'meson' 'clang' 'llvm' 'llvm-libs' 'rust')
backup=('etc/default/scx' 'etc/systemd/journald@sched-ext.conf')
source=("git+https://github.com/sched-ext/scx")
sha256sums=('SKIP')
options=(!lto)
provides=("scx-scheds=$pkgver")
conflicts=("scx-scheds")
_backports=(
)
_reverts=(
)
pkgver() {
cd $gitname
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd $gitname
local _c _l
for _c in "${_backports[@]}"; do
if [[ "${_c}" == *..* ]]; then _l='--reverse'; else _l='--max-count=1'; fi
git log --oneline "${_l}" "${_c}"
git cherry-pick --mainline 1 --no-commit "${_c}"
done
for _c in "${_reverts[@]}"; do
if [[ "${_c}" == *..* ]]; then _l='--reverse'; else _l='--max-count=1'; fi
git log --oneline "${_l}" "${_c}"
git revert --mainline 1 --no-commit "${_c}"
done
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
}
build() {
cd $gitname
arch-meson . build -D openrc=disabled
meson compile -C build
}
package() {
cd $gitname
meson install -C build --destdir "${pkgdir}"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}
|