Skip to content

Commit

Permalink
Whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcooper committed Apr 4, 2024
1 parent 8022244 commit 4bd58e5
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 87 deletions.
62 changes: 30 additions & 32 deletions configs/components/dmidecode.rb
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
component 'dmidecode' do |pkg, settings, platform|
pkg.version '3.3'
pkg.md5sum 'afca949fd71a23dd39c4a3c9cd946dc0'
pkg.version '3.3'
pkg.md5sum 'afca949fd71a23dd39c4a3c9cd946dc0'

pkg.apply_patch 'resources/patches/dmidecode/1117390c.patch'
pkg.apply_patch 'resources/patches/dmidecode/11e134e5.patch'

pkg.apply_patch 'resources/patches/dmidecode/dmidecode-install-to-bin.patch'
pkg.url "http://download.savannah.gnu.org/releases/dmidecode/dmidecode-#{pkg.get_version}.tar.xz"
pkg.mirror "#{settings[:buildsources_url]}/dmidecode-#{pkg.get_version}.tar.xz"

pkg.environment "LDFLAGS", settings[:ldflags]
pkg.environment "CFLAGS", settings[:cflags]

if platform.is_cross_compiled?
# The Makefile doesn't honor environment overrides, so we need to
# edit it directly for cross-compiling
pkg.configure do
["sed -i \"s|gcc|/opt/pl-build-tools/bin/#{settings[:platform_triple]}-gcc|g\" Makefile"]
end
end

pkg.build do
["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"]
end

pkg.install do
[
"#{platform[:make]} prefix=#{settings[:prefix]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install",
"rm -f #{settings[:bindir]}/vpddecode #{settings[:bindir]}/biosdecode #{settings[:bindir]}/ownership",
"rm -f #{settings[:mandir]}/man8/ownership.8 #{settings[:mandir]}/man8/biosdecode.8 #{settings[:mandir]}/man8/vpddecode.8"
]
pkg.apply_patch 'resources/patches/dmidecode/1117390c.patch'
pkg.apply_patch 'resources/patches/dmidecode/11e134e5.patch'

pkg.apply_patch 'resources/patches/dmidecode/dmidecode-install-to-bin.patch'
pkg.url "http://download.savannah.gnu.org/releases/dmidecode/dmidecode-#{pkg.get_version}.tar.xz"
pkg.mirror "#{settings[:buildsources_url]}/dmidecode-#{pkg.get_version}.tar.xz"

pkg.environment "LDFLAGS", settings[:ldflags]
pkg.environment "CFLAGS", settings[:cflags]

if platform.is_cross_compiled?
# The Makefile doesn't honor environment overrides, so we need to
# edit it directly for cross-compiling
pkg.configure do
["sed -i \"s|gcc|/opt/pl-build-tools/bin/#{settings[:platform_triple]}-gcc|g\" Makefile"]
end
end



pkg.build do
["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"]
end

pkg.install do
[
"#{platform[:make]} prefix=#{settings[:prefix]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install",
"rm -f #{settings[:bindir]}/vpddecode #{settings[:bindir]}/biosdecode #{settings[:bindir]}/ownership",
"rm -f #{settings[:mandir]}/man8/ownership.8 #{settings[:mandir]}/man8/biosdecode.8 #{settings[:mandir]}/man8/vpddecode.8"
]
end
end
2 changes: 1 addition & 1 deletion configs/components/rubygem-ffi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@

# move ld back after the gem is installed
pkg.install { "mv /usr/bin/ld1 /usr/bin/ld" }

elsif platform.name =~ /solaris-10-sparc/
sed_exp = 's|CONFIG\["LDFLAGS"\].*|CONFIG["LDFLAGS"] = "-Wl,-rpath-link,/opt/pl-build-tools/sparc-sun-solaris2.10/sysroot/lib:/opt/pl-build-tools/sparc-sun-solaris2.10/sysroot/usr/lib -L. -Wl,-rpath=/opt/puppetlabs/puppet/lib -fstack-protector"|'
pkg.configure do
Expand Down
2 changes: 1 addition & 1 deletion configs/components/rubygem-gettext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

case version
when '3.4.3'
pkg.sha256sum '1b98e1272d0f55a56f519ee86d24e0fcd114b94c9d10b26e72512d65f9174251'
pkg.sha256sum '1b98e1272d0f55a56f519ee86d24e0fcd114b94c9d10b26e72512d65f9174251'
when '3.2.2'
pkg.sha256sum '9d250bb79273efb4a268977f219d2daca05cdc7473eff40288b8ab8ddd0f51b4'
else
Expand Down
11 changes: 5 additions & 6 deletions configs/components/rubygem-prime.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
component 'rubygem-prime' do |pkg, settings, platform|
pkg.version '0.1.2'
pkg.sha256sum 'd4e956cadfaf04de036dc7dc74f95bf6a285a62cc509b28b7a66b245d19fe3a4'

instance_eval File.read('configs/components/_base-rubygem.rb')
end

pkg.version '0.1.2'
pkg.sha256sum 'd4e956cadfaf04de036dc7dc74f95bf6a285a62cc509b28b7a66b245d19fe3a4'

instance_eval File.read('configs/components/_base-rubygem.rb')
end
2 changes: 1 addition & 1 deletion configs/components/rubygem-public_suffix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
pkg.md5sum '504e45c1f5f7b629e46e4deef7d0f46f'

instance_eval File.read('configs/components/_base-rubygem.rb')
end
end
1 change: 0 additions & 1 deletion configs/components/rubygem-rgen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@

instance_eval File.read('configs/components/_base-rubygem.rb')
end

2 changes: 1 addition & 1 deletion configs/components/runtime-pe-installer.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This component exists to link in the gcc runtime libraries.
component "runtime-pe-installer" do |pkg, settings, platform|
pkg.environment "PROJECT_SHORTNAME", "installer"

if platform.name =~ /el-[67]|redhatfips-7|sles-12|ubuntu-18.04-amd64/
libbase = platform.architecture =~ /64/ ? 'lib64' : 'lib'
libdir = "/opt/pl-build-tools/#{libbase}"
Expand Down
87 changes: 43 additions & 44 deletions configs/components/virt-what.rb
Original file line number Diff line number Diff line change
@@ -1,47 +1,46 @@
component "virt-what" do |pkg, settings, platform|
pkg.version "1.22"
pkg.md5sum "0e9923de6a6c6f07bc0ddc3ec8fc1018"

pkg.url "https://people.redhat.com/~rjones/virt-what/files/virt-what-#{pkg.get_version}.tar.gz"
pkg.mirror "#{settings[:buildsources_url]}/virt-what-#{pkg.get_version}.tar.gz"

pkg.replaces 'pe-virt-what'

# Run-time requirements
unless platform.is_deb?
requires "util-linux"
end

if platform.is_rpm?
pkg.build_requires "util-linux"
end

if platform.is_linux?
if platform.architecture =~ /ppc64le$/
host_opt = '--host powerpc64le-unknown-linux-gnu'
elsif platform.architecture =~ /ppc64$/
host_opt = '--host powerpc64-unknown-linux-gnu'
end
end

if platform.is_cross_compiled_linux?
host_opt = "--host #{settings[:platform_triple]}"

pkg.environment "PATH" => "/opt/pl-build-tools/bin:$$PATH:#{settings[:bindir]}"
pkg.environment "CFLAGS" => settings[:cflags]
pkg.environment "LDFLAGS" => settings[:ldflags]
end

pkg.configure do
["./configure --prefix=#{settings[:prefix]} --sbindir=#{settings[:prefix]}/bin --libexecdir=#{settings[:prefix]}/lib/virt-what #{host_opt}"]
end

pkg.build do
["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"]
end

pkg.install do
["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install"]
pkg.version "1.22"
pkg.md5sum "0e9923de6a6c6f07bc0ddc3ec8fc1018"

pkg.url "https://people.redhat.com/~rjones/virt-what/files/virt-what-#{pkg.get_version}.tar.gz"
pkg.mirror "#{settings[:buildsources_url]}/virt-what-#{pkg.get_version}.tar.gz"

pkg.replaces 'pe-virt-what'

# Run-time requirements
unless platform.is_deb?
requires "util-linux"
end

if platform.is_rpm?
pkg.build_requires "util-linux"
end

if platform.is_linux?
if platform.architecture =~ /ppc64le$/
host_opt = '--host powerpc64le-unknown-linux-gnu'
elsif platform.architecture =~ /ppc64$/
host_opt = '--host powerpc64-unknown-linux-gnu'
end
end


if platform.is_cross_compiled_linux?
host_opt = "--host #{settings[:platform_triple]}"

pkg.environment "PATH" => "/opt/pl-build-tools/bin:$$PATH:#{settings[:bindir]}"
pkg.environment "CFLAGS" => settings[:cflags]
pkg.environment "LDFLAGS" => settings[:ldflags]
end

pkg.configure do
["./configure --prefix=#{settings[:prefix]} --sbindir=#{settings[:prefix]}/bin --libexecdir=#{settings[:prefix]}/lib/virt-what #{host_opt}"]
end

pkg.build do
["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"]
end

pkg.install do
["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install"]
end
end

0 comments on commit 4bd58e5

Please sign in to comment.