Files
chromebrew/packages/perf.rb
Maximilian Downey Twiss de24923ee8 Add Rubocop CI (#7083)
* Rename IgnoredPatterns to AllowedPatterns.

* Exclude docopt.rb (not our code) from Rubocop

* Disable Style/RedundantReturn

* Disable Style/MutableConstant

* Disable Style/NumericLiterals

* Set Layout/IndentationStyle to spaces

* Temporarily disable various cops.

* Add Rubocop CI via Octocop

* Lint tree with rubocop -A -c .rubocop.yml

Co-authored-by: Satadru Pramanik <satadru@gmail.com>
2022-08-22 13:31:25 -04:00

44 lines
1.6 KiB
Ruby

require 'package'
class Perf < Package
description 'Linux profiling with performance counters'
homepage 'https://perf.wiki.kernel.org/index.php/Main_Page'
version '4.14'
license 'GPL-2'
compatibility 'all'
source_url 'SKIP'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perf/4.14_armv7l/perf-4.14-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perf/4.14_armv7l/perf-4.14-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perf/4.14_i686/perf-4.14-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/perf/4.14_x86_64/perf-4.14-chromeos-x86_64.tar.xz'
})
binary_sha256({
aarch64: '87c533c2b45a9beec0ef975b4a3f110e42a6d03def1820dfd3190fb3f767e710',
armv7l: '87c533c2b45a9beec0ef975b4a3f110e42a6d03def1820dfd3190fb3f767e710',
i686: '9786bce0863320385c3dd96534c681e5eae26d593851bde4278d30aa4dedec22',
x86_64: '95e550bc751bd655a0d885104ec0f88aad533b8450af35438802f0a848b768be'
})
# Reuse linux sources if they're already installed
depends_on 'linux_sources' => :build
def self.build
Dir.chdir("#{CREW_PREFIX}/src/linux/tools/perf") do
system "make WERROR=0 prefix=#{CREW_PREFIX}"
end
end
def self.install
Dir.chdir("#{CREW_PREFIX}/src/linux/tools/perf") do
system 'make',
'WERROR=0',
'missing_tools=xmlto', # Docs are broken, disable
"prefix=#{CREW_PREFIX}",
"DESTDIR=#{CREW_DEST_DIR}",
'install'
end
end
end