-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Added classic snap packaging #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: framework-tool | ||
| base: core24 | ||
| adopt-info: framework-tool | ||
| summary: CLI tool to inspect and control Framework Computer systems | ||
| description: | | ||
| framework_tool is a CLI utility to interact with Framework Computer laptop | ||
| and desktop firmware and hardware. Features include: | ||
| . | ||
| - Firmware inspection and updates (BIOS, EC, PD controllers, retimers) | ||
| - System status monitoring (power, thermal, sensors, USB-C ports) | ||
| - Hardware configuration (keyboard backlight, battery charge limits, fan control) | ||
| - Expansion card management (HDMI/DP/audio cards) | ||
| - Framework 16 specific features (input deck, expansion bay) | ||
| - NVIDIA GPU support | ||
| . | ||
| Note: Most features require root privileges (sudo framework-tool ...). | ||
|
|
||
| grade: stable | ||
| confinement: classic | ||
| compression: lzo | ||
|
|
||
| parts: | ||
| framework-tool: | ||
| plugin: rust | ||
| source: . | ||
| build-packages: | ||
| - libhidapi-dev | ||
| - libusb-1.0-0-dev | ||
| - libudev-dev | ||
| - pkg-config | ||
| stage-packages: | ||
| - libhidapi-hidraw0 | ||
| - libusb-1.0-0 | ||
| - libudev1 | ||
| override-pull: | | ||
| craftctl default | ||
| VERSION=$(craftctl get version) | ||
| if [ -z $VERSION ]; then | ||
| VERSION=$(git describe --tags --abbrev=10) | ||
| craftctl set version=$VERSION | ||
| fi | ||
| override-build: | | ||
| cd "${CRAFT_PART_SRC}" | ||
| cargo build --release -p framework_tool --features nvidia | ||
| install -Dm755 target/release/framework_tool "${CRAFT_PART_INSTALL}/bin/framework_tool" | ||
| install -Dm644 "${CRAFT_PART_SRC}/completions/bash/framework_tool" \ | ||
| "${CRAFT_PART_INSTALL}/share/bash-completion/completions/framework_tool" | ||
| install -Dm644 "${CRAFT_PART_SRC}/completions/zsh/_framework_tool" \ | ||
| "${CRAFT_PART_INSTALL}/share/zsh/site-functions/_framework_tool" | ||
| install -Dm644 "${CRAFT_PART_SRC}/completions/fish/framework_tool.fish" \ | ||
| "${CRAFT_PART_INSTALL}/share/fish/vendor_completions.d/framework_tool.fish" | ||
|
|
||
| apps: | ||
| framework-tool: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that changes the executable name to hyphen instead of underscore?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The snap name/app-name doesn't allow underscores as it means something different to snapd. Snaps can have different versions installed in parallel, and that "instances" are determined with an underscore. |
||
| command: bin/framework_tool | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Will need to add this to the secrets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is the way to get them
https://documentation.ubuntu.com/snapcraft/latest/how-to/publishing/authenticate/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Classic confinement was granted, the snap is live in the store. Next step will be for me to transfer ownership of the snap. I'll followup tomorrow with some instructions to get that moving.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Live where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see it, nice!
https://snapcraft.io/framework-tool