Skip to content

Commit

Permalink
Update dmidecode from 3.1 to 3.2
Browse files Browse the repository at this point in the history
Add aarch/armv7l patch

Add pre-built binaries
  • Loading branch information
uberhacker committed Oct 6, 2018
1 parent 8222225 commit 777a734
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions packages/dmidecode.rb
Expand Up @@ -3,40 +3,45 @@
class Dmidecode < Package
description "Dmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard (see a sample output)."
homepage 'http://www.nongnu.org/dmidecode/'
version '3.1'
source_url 'http://download.savannah.gnu.org/releases/dmidecode/dmidecode-3.1.tar.xz'
source_sha256 'd766ce9b25548c59b1e7e930505b4cad9a7bb0b904a1a391fbb604d529781ac0'
version '3.2'
source_url 'https://download.savannah.gnu.org/releases/dmidecode/dmidecode-3.2.tar.xz'
source_sha256 '077006fa2da0d06d6383728112f2edef9684e9c8da56752e97cd45a11f838edd'

binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/dmidecode-3.1-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/dmidecode-3.1-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/dmidecode-3.1-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/dmidecode-3.1-chromeos-x86_64.tar.xz',
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/dmidecode-3.2-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/dmidecode-3.2-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/dmidecode-3.2-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/dmidecode-3.2-chromeos-x86_64.tar.xz',
})
binary_sha256 ({
aarch64: 'a3f1bf96a328ee441940346e0a907ad26e3656676eb3750d00b749fac0912bbe',
armv7l: 'a3f1bf96a328ee441940346e0a907ad26e3656676eb3750d00b749fac0912bbe',
i686: '2d5cd5a5d2bc1a91a1b83ef7fb5c3d1054ff07d8ba7b6f73a7944aa8e83e38f2',
x86_64: 'ee453a6dada1736e1c9ac271d2b540bbdc1b7682e8db637b0dcf381e9e4fc5d1',
aarch64: '41beef6535dc3a44b0e9485e304cb54143bb5be8b5fdb6fbed5e8e51089d9929',
armv7l: '41beef6535dc3a44b0e9485e304cb54143bb5be8b5fdb6fbed5e8e51089d9929',
i686: 'b8c0de1cfdbe60df43f545a1d057860ef53eac548284b04ecb58c532077470d9',
x86_64: 'fef3f3b044cf9a7e00678b1a8eee3881611f92053af7da334f1cffcab88b7772',
})

def self.build
def self.patch
system "sed -i 's,^prefix = /usr/local,prefix = #{CREW_PREFIX},' Makefile"
case ARCH
when 'i686', 'x86_64'
system 'make'
else
puts "#{ARCH} architecture not supported.".lightred
when 'aarch64', 'armv7l'
system "sed -i '55iPROGRAMS-#{ARCH} := biosdecode ownership vpddecode' Makefile"
system "sed -i 's,#CFLAGS += -DBIGENDIAN,CFLAGS += -DBIGENDIAN,' Makefile"
system "sed -i 's,#CFLAGS += -DALIGNMENT_WORKAROUND,CFLAGS += -DALIGNMENT_WORKAROUND,' Makefile"
end
end

def self.build
system 'make'
end

def self.install
case ARCH
when 'i686', 'x86_64'
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
puts ""
puts "To complete the installation, execute the following:".lightblue
puts "echo 'export PATH=$PATH:/usr/local/sbin' >> ~/.bashrc && source ~/.bashrc".lightblue
puts ""
end
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end

def self.postinstall
puts
puts "To report information about the system hardware, execute the following:".lightblue
puts "sudo dmidecode".lightblue
puts
end
end

0 comments on commit 777a734

Please sign in to comment.