Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/fedora-tools-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Fedora tools CI

on:
push:
branches: ["**"]
pull_request:

jobs:
build-tools:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build and install Fedora tools
run: |
docker run --rm \
-v "$GITHUB_WORKSPACE:/workspace:ro" \
-w /workspace \
fedora:45 \
bash -euo pipefail -c '
PREFIX=/tmp/hyde-tools ./fedora/install-tools.sh
test -x /tmp/hyde-tools/bin/hyq
test -x /tmp/hyde-tools/bin/awww
test -x /tmp/hyde-tools/bin/awww-daemon
'
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@
# editor/system
.DS_Store
.*
*
*
!fedora/
!fedora/**
!.github/
!.github/workflows/
!.github/workflows/fedora-tools-ci.yml
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# distro
Host Build Scripts for Distros. Yey

Host build scripts and packaging for HyDE project binaries across distros.

- `arch/` contains Arch package recipes.
- `fedora/` contains Fedora tooling to build and install upstream binaries
that are not available as Fedora packages.
14 changes: 14 additions & 0 deletions fedora/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Fedora tools

`install-tools.sh` builds and installs the Fedora tools HyDE currently
consumes from upstream source: `hyq` (from HyDE-Project/hyprquery), and
`awww` plus `awww-daemon` (from LGFae/awww). Source revisions are pinned in the
script so the same inputs are used by local installs and CI.

Run it from a Fedora system with `dnf` and `sudo` available:

```bash
./fedora/install-tools.sh
```

The default install prefix is `/usr/local`. Set `PREFIX` to override it.
52 changes: 52 additions & 0 deletions fedora/install-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
set -euo pipefail

# Build and install the Fedora-only tools used by HyDE.
# Override PREFIX to install somewhere other than /usr/local.

readonly HYPRQUERY_REV="4e1405cc7d07f1b6d611d6d96322f009cd298f23"
readonly AWWW_REV="f66e12a76dbc4c669b2f1375f78bce49f5b19d66"
readonly PREFIX="${PREFIX:-/usr/local}"
readonly BUILD_ROOT="$(mktemp -d)"

cleanup() {
rm -rf "${BUILD_ROOT}"
}
trap cleanup EXIT

as_root() {
if [[ "$(id -u)" -eq 0 ]]; then
"$@"
else
sudo "$@"
fi
}

if ! command -v dnf >/dev/null 2>&1; then
echo "This installer requires Fedora's dnf package manager." >&2
exit 1
fi

as_root dnf install -y \
git cargo cmake make gcc-c++ pkgconf-pkg-config \
hyprlang-devel cli11-devel json-devel \
hyprutils-devel lz4-devel libxkbcommon-devel wayland-devel \
wayland-protocols-devel scdoc

git clone https://github.com/HyDE-Project/hyprquery.git "${BUILD_ROOT}/hyprquery"
git -C "${BUILD_ROOT}/hyprquery" checkout --detach "${HYPRQUERY_REV}"
cmake -S "${BUILD_ROOT}/hyprquery" -B "${BUILD_ROOT}/hyprquery/build" \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DHYPRQUERY_DISTRO_BUILD=ON
cmake --build "${BUILD_ROOT}/hyprquery/build" --parallel
as_root cmake --install "${BUILD_ROOT}/hyprquery/build"

git clone https://codeberg.org/LGFae/awww.git "${BUILD_ROOT}/awww"
git -C "${BUILD_ROOT}/awww" checkout --detach "${AWWW_REV}"
cargo build --manifest-path "${BUILD_ROOT}/awww/Cargo.toml" --release
as_root install -Dm755 "${BUILD_ROOT}/awww/target/release/awww" \
"${PREFIX}/bin/awww"
as_root install -Dm755 "${BUILD_ROOT}/awww/target/release/awww-daemon" \
"${PREFIX}/bin/awww-daemon"

printf 'Installed hyq, awww and awww-daemon under %s/bin\n' "${PREFIX}"
Loading