40 lines
1.4 KiB
Bash
40 lines
1.4 KiB
Bash
# Template file for 'scx-loader'
|
|
pkgname=scx-loader
|
|
version=1.1.1
|
|
revision=1
|
|
archs="x86_64* aarch64*"
|
|
conf_files=/etc/scx_loader.toml
|
|
build_style=cargo
|
|
depends="dbus polkit scx"
|
|
short_desc="Dbus loader for sched_ext schedulers"
|
|
maintainer="Chloé Vulquin <code@toast.bunkerlabs.net>"
|
|
license="GPL-2.0-only"
|
|
homepage="https://github.com/sched-ext/scx-loader"
|
|
distfiles="https://github.com/sched-ext/scx-loader/archive/refs/tags/v${version}.tar.gz"
|
|
checksum=df17f4984e6d46ad5eebf1a96dce8b656e880de5a251e73313788eb564c816b0
|
|
|
|
pre_build() {
|
|
# workaround the cc-rs mixing CFLAGS for host and target.
|
|
# https://github.com/rust-lang/cc-rs/issues/1469
|
|
export CFLAGS_${RUST_BUILD//-/_}="${CFLAGS_host}" \
|
|
CXXFLAGS_${RUST_BUILD//-/_}="${CXXFLAGS_host}" \
|
|
LDFLAGS_${RUST_BUILD//-/_}="${LDFLAGS_host}" \
|
|
CFLAGS_${RUST_TARGET//-/_}="${CFLAGS}" \
|
|
CXXFLAGS_${RUST_TARGET//-/_}="${CXXFLAGS}" \
|
|
LDFLAGS_${RUST_TARGET//-/_}="${LDFLAGS}" \
|
|
CFLAGS="" CXXFLAGS="" LDFLAGS=""
|
|
}
|
|
|
|
do_install() {
|
|
vbin target/"$RUST_TARGET"/release/scx_loader
|
|
vbin target/"$RUST_TARGET"/release/scxctl
|
|
|
|
vinstall services/org.scx.Loader.service 644 /usr/share/dbus-1/system-services
|
|
vinstall configs/org.scx.Loader.conf 644 /usr/share/dbus-1/system.d
|
|
vinstall configs/org.scx.Loader.xml 644 /usr/share/dbus-1/interfaces
|
|
vinstall configs/org.scx.Loader.policy 644 /usr/share/polkit-1/actions
|
|
|
|
vconf configs/scx_loader.toml
|
|
vsv scx-loader
|
|
}
|