Files
chromebrew/packages/frp.rb
github-actions[bot] dc598ef938 frp 0.61.2 => 0.62.0 (#11763)
Co-authored-by: SupeChicken666 <supechicken666@gmail.com>
2025-04-19 18:43:30 +00:00

50 lines
1.7 KiB
Ruby

require 'package'
class Frp < Package
description 'A fast reverse proxy'
homepage 'https://github.com/fatedier/frp'
version '0.62.0'
license 'Apache-2.0'
compatibility 'aarch64 armv7l x86_64'
source_url({
aarch64: "https://github.com/fatedier/frp/releases/download/v#{version}/frp_#{version}_linux_arm.tar.gz",
armv7l: "https://github.com/fatedier/frp/releases/download/v#{version}/frp_#{version}_linux_arm.tar.gz",
x86_64: "https://github.com/fatedier/frp/releases/download/v#{version}/frp_#{version}_linux_amd64.tar.gz"
})
source_sha256({
aarch64: '2650396e5eb62ae46e2f268b505e1c99ee37686305258c0ca23475949397500d',
armv7l: '2650396e5eb62ae46e2f268b505e1c99ee37686305258c0ca23475949397500d',
x86_64: 'd2b549e8940c56854b73d882e7388ff4dcd33089a3f1d0d46c844daf395590c2'
})
no_compile_needed
def self.build
File.write 'frpc.sh', <<~EOF
#!/bin/bash
#{CREW_PREFIX}/share/frp/frpc -c #{CREW_PREFIX}/share/frp/frpc.toml "$@"
EOF
File.write 'frps.sh', <<~EOF
#!/bin/bash
#{CREW_PREFIX}/share/frp/frps -c #{CREW_PREFIX}/share/frp/frps.toml "$@"
EOF
end
def self.install
FileUtils.install 'frpc.sh', "#{CREW_DEST_PREFIX}/bin/frpc", mode: 0o755
FileUtils.install 'frps.sh', "#{CREW_DEST_PREFIX}/bin/frps", mode: 0o755
FileUtils.rm Dir['*.sh']
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/frp"
FileUtils.mv Dir['*'], "#{CREW_DEST_PREFIX}/share/frp"
end
def self.postinstall
ExitMessage.add <<~EOM
Type 'frps &' to start the server and run in the background.
Type 'frpc &' to start the client on another machine.
For more information, see https://github.com/fatedier/frp.
EOM
end
end