8000 elf2uf2-rs 2.1.1 (new formula) · Homebrew/homebrew-core@2f53446 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f53446

Browse files
committed
elf2uf2-rs 2.1.1 (new formula)
1 parent 05b3012 commit 2f53446

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Formula/e/elf2uf2-rs.rb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
class Elf2uf2Rs < Formula
2+
desc "Convert ELF files to UF2 for USB Flashing Bootloaders"
3+
homepage "https://github.com/JoNil/elf2uf2-rs"
4+
url "https://github.com/JoNil/elf2uf2-rs/archive/refs/tags/2.1.1.tar.gz"
5+
sha256 "c6845f696112193bbe6517ab0c9b9fc85dff1083911557212412e07c506ccd7c"
6+
license "0BSD"
7+
8+
depends_on "rust" => :build
9+
10+
on_linux do
11+
depends_on "pkgconf" => :build
12+
depends_on "systemd" # for libudev
13+
end
14+
15+
def install
16+
system "cargo", "install", *std_cargo_args
17+
(pkgshare/"examples").install Dir.glob("*.elf")
18+
(pkgshare/"examples").install Dir.glob("*.uf2")
19+
end
20+
21+
test do
22+
system bin/"elf2uf2-rs", pkgshare/"examples"/"hello_usb.elf", "converted.uf2"
23+
assert compare_file pkgshare/"examples"/"hello_usb.uf2", testpath/"converted.uf2"
24+
end
25+
end

0 commit comments

Comments
 (0)
0