mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
* 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>
46 lines
2.3 KiB
Ruby
46 lines
2.3 KiB
Ruby
require 'package'
|
|
|
|
class Antiword < Package
|
|
description 'Antiword is a free MS Word reader for Linux and RISC OS.'
|
|
homepage 'http://www.winfield.demon.nl/'
|
|
version '0.37-2'
|
|
license 'GPL-2'
|
|
compatibility 'all'
|
|
source_url 'http://www.winfield.demon.nl/linux/antiword-0.37.tar.gz'
|
|
source_sha256 '8e2c000fcbc6d641b0e6ff95e13c846da3ff31097801e86702124a206888f5ac'
|
|
|
|
binary_url({
|
|
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/antiword/0.37-2_armv7l/antiword-0.37-2-chromeos-armv7l.tar.xz',
|
|
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/antiword/0.37-2_armv7l/antiword-0.37-2-chromeos-armv7l.tar.xz',
|
|
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/antiword/0.37-2_i686/antiword-0.37-2-chromeos-i686.tar.xz',
|
|
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/antiword/0.37-2_x86_64/antiword-0.37-2-chromeos-x86_64.tar.xz'
|
|
})
|
|
binary_sha256({
|
|
aarch64: '758ead9af6bdc9493b525d9e009e1f5edb3fa51ca1663d66dd8f43b89b821225',
|
|
armv7l: '758ead9af6bdc9493b525d9e009e1f5edb3fa51ca1663d66dd8f43b89b821225',
|
|
i686: '54276a60100d021bc6d619f175d3ca592f872a151eed6557fd09d87a6b2a6ea9',
|
|
x86_64: '5486ee47684aaf249f0f75f9c903aa8c79b41466ae94aa0dbbd660090af438d0'
|
|
})
|
|
|
|
def self.build
|
|
system "sed -i 's,GLOBAL_RESOURCES_DIR = /usr/share/antiword,GLOBAL_RESOURCES_DIR = #{CREW_PREFIX}/share/antiword,' Makefile.Linux"
|
|
system "sed -i 's,/share/,/,g' antiword.h"
|
|
system "sed -i 's,/usr/antiword,#{CREW_PREFIX}/share/antiword,g' antiword.h"
|
|
system "sed -i 's,/usr/share/antiword,#{CREW_PREFIX}/share/antiword,' Docs/antiword.1"
|
|
system 'make'
|
|
end
|
|
|
|
def self.install
|
|
system "mkdir -p /home/#{USER}/user/.antiword"
|
|
system "mkdir -p #{CREW_DEST_DIR}/home/#{USER}/user/.antiword"
|
|
system "mkdir -p #{CREW_DEST_PREFIX}/bin"
|
|
system "mkdir -p #{CREW_DEST_PREFIX}/man/man1"
|
|
system "mkdir -p #{CREW_DEST_PREFIX}/share/antiword"
|
|
system "cp antiword #{CREW_DEST_PREFIX}/bin"
|
|
system "cp Docs/antiword.1 #{CREW_DEST_PREFIX}/man/man1"
|
|
system "cp Resources/* #{CREW_DEST_PREFIX}/share/antiword"
|
|
system "cp Resources/UTF-8.txt /home/#{USER}/user/.antiword"
|
|
system "cp Resources/UTF-8.txt #{CREW_DEST_DIR}/home/#{USER}/user/.antiword"
|
|
end
|
|
end
|