Files
chromebrew/packages/linux_sources.rb
Maximilian Downey Twiss f6dc1d8d4e Derive binary_url in package.rb (#7082)
* Add binary_compression value to each package

* Remove binary_url values and arrays

* Handle packages with empty binary_sha256 arrays (either missing binaries or not compiled by us)
2024-01-25 11:03:31 -05:00

37 lines
1.2 KiB
Ruby

require 'package'
class Linux_sources < Package
description 'Sources for the Linux kernel'
homepage 'https://kernel.org/'
version ARCH == 'i686' ? '3.8' : '4.14-1'
license 'GPL-2'
compatibility 'all'
source_url 'https://chromium.googlesource.com/chromiumos/third_party/kernel.git'
git_hashtag "chromeos-#{CREW_KERNEL_VERSION}"
binary_compression 'tpxz'
binary_sha256({
aarch64: 'c9b3116f83033215bf7f925a433bcea906067006d8c4c3f9747a279d729d4db0',
armv7l: 'c9b3116f83033215bf7f925a433bcea906067006d8c4c3f9747a279d729d4db0',
i686: '2e8cf6b96bfb2f1f65809123696799244ac20b3a7a6b516d00d9f09a0b682266',
x86_64: '5dc236576f40cbf6926b4b5f9241ed7e9e3e7db8f2b26643316a2ce1f08a4a02'
})
no_env_options
no_fhs
def self.install
linux_src_dir = "#{CREW_DEST_PREFIX}/src/linux"
FileUtils.mkdir_p(linux_src_dir)
# make fails if it detects gold linker.
FileUtils.mkdir_p("#{linux_src_dir}/crew_bin")
FileUtils.ln_sf "#{CREW_PREFIX}/bin/ld.bfd", "#{linux_src_dir}/crew_bin/ld"
FileUtils.rm_rf('.git')
FileUtils.cp_r('.', linux_src_dir)
Dir.chdir(linux_src_dir) do
system "PATH=#{linux_src_dir}/crew_bin:$PATH make defconfig"
end
FileUtils.rm_f "#{linux_src_dir}/crew_bin"
end
end