|
| 1 | +# Template file for 'scx-loader' |
| 2 | +pkgname=scx-loader |
| 3 | +version=1.0.20 |
| 4 | +revision=1 |
| 5 | +archs="x86_64* aarch64*" |
| 6 | +conf_files=/etc/scx_loader.toml |
| 7 | +build_style=cargo |
| 8 | +depends="dbus polkit scx" |
| 9 | +short_desc="Dbus loader for sched_ext schedulers" |
| 10 | +maintainer="Chloé Vulquin <code@toast.bunkerlabs.net>" |
| 11 | +license="GPL-2.0-only" |
| 12 | +homepage="https://github.com/sched-ext/scx-loader" |
| 13 | +distfiles="https://github.com/sched-ext/scx-loader/archive/refs/tags/v${version}.tar.gz" |
| 14 | +checksum=24ba8ef16504b74f7d0c0e6d5da21d3dce146ece1e6cf5ba3f6f9085c6c383b3 |
| 15 | + |
| 16 | +pre_build() { |
| 17 | + # workaround the cc-rs mixing CFLAGS for host and target. |
| 18 | + # https://github.com/rust-lang/cc-rs/issues/1469 |
| 19 | + export CFLAGS_${RUST_BUILD//-/_}="${CFLAGS_host}" \ |
| 20 | + CXXFLAGS_${RUST_BUILD//-/_}="${CXXFLAGS_host}" \ |
| 21 | + LDFLAGS_${RUST_BUILD//-/_}="${LDFLAGS_host}" \ |
| 22 | + CFLAGS_${RUST_TARGET//-/_}="${CFLAGS}" \ |
| 23 | + CXXFLAGS_${RUST_TARGET//-/_}="${CXXFLAGS}" \ |
| 24 | + LDFLAGS_${RUST_TARGET//-/_}="${LDFLAGS}" \ |
| 25 | + CFLAGS="" CXXFLAGS="" LDFLAGS="" |
| 26 | +} |
| 27 | + |
| 28 | +do_install() { |
| 29 | + vbin target/"$RUST_TARGET"/release/scx_loader |
| 30 | + vbin target/"$RUST_TARGET"/release/scxctl |
| 31 | + |
| 32 | + vinstall services/org.scx.Loader.service 644 /usr/share/dbus-1/system-services |
| 33 | + vinstall configs/org.scx.Loader.conf 644 /usr/share/dbus-1/system.d |
| 34 | + vinstall configs/org.scx.Loader.xml 644 /usr/share/dbus-1/interfaces |
| 35 | + vinstall configs/org.scx.Loader.policy 644 /usr/share/polkit-1/actions |
| 36 | + |
| 37 | + vconf configs/scx_loader.toml |
| 38 | + vsv scx-loader |
| 39 | +} |
0 commit comments