mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
* crew: Set dynamic linker path in linker Signed-off-by: SupeChicken666 <me@supechicken666.dev> Fix constant order Signed-off-by: SupeChicken666 <me@supechicken666.dev> Suggested changes Signed-off-by: SupeChicken666 <me@supechicken666.dev> Merge CREW_LDFLAGS and CREW_LINKER_FLAGS Signed-off-by: SupeChicken666 <me@supechicken666.dev> Adjust argument order Signed-off-by: SupeChicken666 <me@supechicken666.dev> Fix CREW_GLIBC_PREFIX, add LIBRARY_PATH for gcc Signed-off-by: SupeChicken666 <me@supechicken666.dev> Add some patches from Chromium OS Signed-off-by: SupeChicken666 <me@supechicken666.dev> Bump version Signed-off-by: SupeChicken666 <me@supechicken666.dev> Add install-locales line Signed-off-by: SupeChicken666 <me@supechicken666.dev> Add comments Signed-off-by: SupeChicken666 <me@supechicken666.dev> Remove LD_LIBRARY_PATH from CREW_ENV_OPTIONS Signed-off-by: SupeChicken666 <me@supechicken666.dev> Add `CREW_GLIBC_PREFIX` to linker search path Signed-off-by: SupeChicken666 <me@supechicken666.dev> Set minimum kernel version to 3.2 for all architectures Signed-off-by: SupeChicken666 <me@supechicken666.dev> Pass CERW_PREFIX with macro Signed-off-by: SupeChicken666 <me@supechicken666.dev> Fix asprintf usage Signed-off-by: SupeChicken666 <me@supechicken666.dev> Fix macro usage Signed-off-by: SupeChicken666 <me@supechicken666.dev> Move all patches into a separate repo Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Add finishing touches :) Signed-off-by: SupeChicken666 <me@supechicken666.dev> Set compiler search path also Signed-off-by: SupeChicken666 <me@supechicken666.dev> Fix installation path Signed-off-by: SupeChicken666 <me@supechicken666.dev> Rebuilt binaries with same version Signed-off-by: SupeChicken666 <me@supechicken666.dev> * lint Signed-off-by: Satadru Pramanik <satadru@gmail.com> * bump version Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Fix already initialized constant error. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Merge changes from #11828 Signed-off-by: SupeChicken666 <me@supechicken666.dev> * crew: Run `upx -d` and `patchelf` on existing/to-be-installed packages Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Fix syntax Signed-off-by: SupeChicken666 <me@supechicken666.dev> Silence output Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Suggested changes Signed-off-by: SupeChicken666 <me@supechicken666.dev> Re-add `2> /dev/null` to upx commands Signed-off-by: SupeChicken666 <me@supechicken666.dev> Fix `patchelf` usage Signed-off-by: SupeChicken666 <me@supechicken666.dev> Correct function name Signed-off-by: SupeChicken666 <me@supechicken666.dev> Fix CI build test Signed-off-by: SupeChicken666 <me@supechicken666.dev> Make rubocop happy Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Update search cache for on postinstall Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Add a config file for ld.so Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Suggested changes Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Add built packages for linux/386 to set_dynamic_linker * Add built packages for linux/amd64 to set_dynamic_linker * Add built packages for linux/arm/v7 to set_dynamic_linker * Update install.sh Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Fix rubocop Signed-off-by: SupeChicken666 <me@supechicken666.dev> --------- Signed-off-by: SupeChicken666 <me@supechicken666.dev> Signed-off-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: supechicken <supechicken@users.noreply.github.com>
58 lines
2.0 KiB
Ruby
Executable File
58 lines
2.0 KiB
Ruby
Executable File
require 'package'
|
|
|
|
class Hello_world_chromebrew < Package
|
|
description 'Chromebrew Package Build Test (for use in PR Actions)'
|
|
homepage 'https://github.com/chromebrew/chromebrew'
|
|
version '1.2'
|
|
license 'MIT' # Package license (eg. GPL-3, MIT, etc.)
|
|
compatibility 'all' # Package architecture compatibility (eg. aarch64, armv7l, i686, x86_64 or all)
|
|
source_url 'https://github.com/chromebrew/chromebrew/raw/master/tools/hello_world_chromebrew.c'
|
|
source_sha256 'ff3632aba26639630ff8c1d91ebc168e185c2cb4fda8c856e61f33d53215aac3'
|
|
binary_compression 'tar.zst'
|
|
|
|
# These are needed to successfully build and check for dependencies.
|
|
|
|
binary_sha256({
|
|
aarch64: 'd2fb648b2f41ea10f851fc66602a15e595866a7e0b6cd999969e038a3af74bc1',
|
|
armv7l: 'd2fb648b2f41ea10f851fc66602a15e595866a7e0b6cd999969e038a3af74bc1',
|
|
i686: '9303a26a1a3c9ad93edf874da13148ccd823e9c5f4739ca8675d141065eac9ab',
|
|
x86_64: '486eac7f7f9cbc5010d667c7bdd3991c4da6ef79040afc68775cbe7f0ee6a167'
|
|
})
|
|
|
|
# Register dependencies (use the following line as a basis)
|
|
|
|
# Runtime dependencies:
|
|
# depends_on '*' # R
|
|
# Build dependencies:
|
|
# depends_on '*' => :build
|
|
|
|
# Function to perform patch operations prior to build from source.
|
|
def self.patch
|
|
system "sed -i 's/Hello Chromebrew/Hello, Chromebrew/' hello_world_chromebrew.c"
|
|
end
|
|
|
|
# Function to perform pre-build operations prior to build from source.
|
|
def self.prebuild; end
|
|
|
|
# Function to perform build from source.
|
|
def self.build
|
|
system "gcc #{CREW_COMMON_FLAGS} #{CREW_LINKER_FLAGS} -o hello hello_world_chromebrew.c"
|
|
end
|
|
|
|
# Function to perform check from source build.
|
|
# This is executed only during `crew build`.
|
|
def self.check
|
|
system './hello'
|
|
end
|
|
|
|
# Function to perform install from source build.
|
|
def self.install
|
|
FileUtils.install 'hello', "#{CREW_DEST_PREFIX}/bin/hello_chromebrew", mode: 0o755
|
|
end
|
|
|
|
# Function to perform post-install for both source build and binary distribution
|
|
def self.postinstall
|
|
system "#{CREW_PREFIX}/bin/hello_chromebrew"
|
|
end
|
|
end
|