|
| 1 | +name: framework-tool |
| 2 | +base: core24 |
| 3 | +adopt-info: framework-tool |
| 4 | +summary: CLI tool to inspect and control Framework Computer systems |
| 5 | +description: | |
| 6 | + framework_tool is a CLI utility to interact with Framework Computer laptop |
| 7 | + and desktop firmware and hardware. Features include: |
| 8 | + . |
| 9 | + - Firmware inspection and updates (BIOS, EC, PD controllers, retimers) |
| 10 | + - System status monitoring (power, thermal, sensors, USB-C ports) |
| 11 | + - Hardware configuration (keyboard backlight, battery charge limits, fan control) |
| 12 | + - Expansion card management (HDMI/DP/audio cards) |
| 13 | + - Framework 16 specific features (input deck, expansion bay) |
| 14 | + - NVIDIA GPU support |
| 15 | + . |
| 16 | + Note: Most features require root privileges (sudo framework-tool ...). |
| 17 | +
|
| 18 | +grade: stable |
| 19 | +confinement: classic |
| 20 | +compression: lzo |
| 21 | + |
| 22 | +parts: |
| 23 | + framework-tool: |
| 24 | + plugin: rust |
| 25 | + source: . |
| 26 | + build-packages: |
| 27 | + - libhidapi-dev |
| 28 | + - libusb-1.0-0-dev |
| 29 | + - libudev-dev |
| 30 | + - pkg-config |
| 31 | + stage-packages: |
| 32 | + - libhidapi-hidraw0 |
| 33 | + - libusb-1.0-0 |
| 34 | + - libudev1 |
| 35 | + override-pull: | |
| 36 | + craftctl default |
| 37 | + VERSION=$(craftctl get version) |
| 38 | + if [ -z $VERSION ]; then |
| 39 | + VERSION=$(git describe --tags --abbrev=10) |
| 40 | + craftctl set version=$VERSION |
| 41 | + fi |
| 42 | + override-build: | |
| 43 | + cd "${CRAFT_PART_SRC}" |
| 44 | + cargo build --release -p framework_tool --features nvidia |
| 45 | + install -Dm755 target/release/framework_tool "${CRAFT_PART_INSTALL}/bin/framework_tool" |
| 46 | + install -Dm644 "${CRAFT_PART_SRC}/completions/bash/framework_tool" \ |
| 47 | + "${CRAFT_PART_INSTALL}/share/bash-completion/completions/framework_tool" |
| 48 | + install -Dm644 "${CRAFT_PART_SRC}/completions/zsh/_framework_tool" \ |
| 49 | + "${CRAFT_PART_INSTALL}/share/zsh/site-functions/_framework_tool" |
| 50 | + install -Dm644 "${CRAFT_PART_SRC}/completions/fish/framework_tool.fish" \ |
| 51 | + "${CRAFT_PART_INSTALL}/share/fish/vendor_completions.d/framework_tool.fish" |
| 52 | +
|
| 53 | +apps: |
| 54 | + framework-tool: |
| 55 | + command: bin/framework_tool |
0 commit comments