Commit c798b036 authored by saltedcoffii's avatar saltedcoffii

Ditch wget (chromeos uses curl)

parent 917d1423
......@@ -25,7 +25,7 @@ class Atom < Package
})
def self.build
system "wget https://github.com/atom/atom/releases/download/v#{version}/atom-amd64.deb"
system "curl -#LO https://github.com/atom/atom/releases/download/v#{version}/atom-amd64.deb"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('atom-amd64.deb') ) == '41a717bb3749a77f1b55f9262417c5dc8cf9e22d99b5951a85d238ea575f2399'
system "alien -tc atom-amd64.deb"
system "tar xvf atom-#{version}.tgz"
......
......@@ -36,7 +36,7 @@ class Brackets < Package
sha256 = '6ef1567b75a197236b3d35785afa744752a28b74cfa51b93b7b78d0a50acbfd4'
end
package = "Brackets.Release.#{version}.#{arch}.deb"
system "wget https://github.com/adobe/brackets/releases/download/release-#{version}/#{package}"
system "curl -#LO https://github.com/adobe/brackets/releases/download/release-#{version}/#{package}"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read(package) ) == sha256
system "alien -tc #{package}"
system "tar xvf brackets-#{version}.tgz"
......
......@@ -54,7 +54,7 @@ class Dia < Package
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
# Fix dia_renderer_set_size: assertion 'irenderer != NULL' failed. See https://bugs.launchpad.net/ubuntu/+source/dia/+bug/1102960/comments/11.
system 'wget https://bugs.launchpad.net/ubuntu/+source/dia/+bug/1102960/+attachment/3552916/+files/persistence'
system 'curl -#LO https://bugs.launchpad.net/ubuntu/+source/dia/+bug/1102960/+attachment/3552916/+files/persistence'
abort 'Checksum mismatch :/ try again' unless Digest::SHA256.hexdigest( File.read('persistence') ) == '53cb6e49892bd60870fb31780052e46d9e47c5b19f87db1651760d10d3fe66e7'
system "install -Dm644 persistence #{CREW_DEST_HOME}/.dia/persistence"
end
......
......@@ -31,7 +31,7 @@ class Dropbox < Package
end
def self.build
system "wget https://linux.dropbox.com/packages/dropbox.py"
system "curl -#LO https://linux.dropbox.com/packages/dropbox.py"
system "sed -i 's,~/.dropbox-dist,#{CREW_LIB_PREFIX}/dropbox,g' dropbox.py"
system "echo '#!/bin/bash' > dropboxd"
system "echo 'PWD=$(pwd)' >> dropboxd"
......
......@@ -27,7 +27,7 @@ class Freedos < Package
# See https://opensource.com/article/17/10/run-dos-applications-linux.
system "mkdir -p $HOME/dosfiles"
system "mkdir -p #{CREW_DEST_DIR}$HOME/dosfiles"
system 'wget https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/FD12CD.iso'
system 'curl -#LO https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/FD12CD.iso'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('FD12CD.iso') ) == '6c7f6aad72ab16c592e879367d1ed463047e3b7c94e1828e1ddadb680d461bc3'
system "qemu-img create freedos.img #{mb}M"
system "qemu-system-i386 -m 16 -k en-us -rtc base=localtime -soundhw all -device cirrus-vga -display gtk -hda freedos.img -cdrom FD12CD.iso -boot order=d"
......
......@@ -26,19 +26,19 @@ class Gdrive < Package
system "mkdir -p #{CREW_DEST_PREFIX}/bin"
case ARCH
when 'aarch64'
system "wget -L -O #{CREW_DEST_PREFIX}/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnRjBaMVVLalN4cTA&export=download"
system "curl -#Lo #{CREW_DEST_PREFIX}/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnRjBaMVVLalN4cTA&export=download"
system "sleep 10"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read("#{CREW_DEST_PREFIX}/bin/gdrive") ) == '25eb74f892785bfd7c93ec22e63dfce04fd68298d8449ea1473bdbf90e3aaf35'
when 'armv7l'
system "wget -L -O #{CREW_DEST_PREFIX}/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnRjBaMVVLalN4cTA&export=download"
system "curl -#Lo #{CREW_DEST_PREFIX}/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnRjBaMVVLalN4cTA&export=download"
system "sleep 10"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read("#{CREW_DEST_PREFIX}/bin/gdrive") ) == '25eb74f892785bfd7c93ec22e63dfce04fd68298d8449ea1473bdbf90e3aaf35'
when 'i686'
system "wget -L -O #{CREW_DEST_PREFIX}/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnLV92dHBpTkFhTEU&export=download"
system "curl -#Lo #{CREW_DEST_PREFIX}/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnLV92dHBpTkFhTEU&export=download"
system "sleep 10"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read("#{CREW_DEST_PREFIX}/bin/gdrive") ) == '768103053ebe56d5b6e17396ac208db85a3b1968d19e9cac9172fe56b6b8cad2'
when 'x86_64'
system "wget -L -O #{CREW_DEST_PREFIX}/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA&export=download"
system "curl -#Lo #{CREW_DEST_PREFIX}/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA&export=download"
system "sleep 10"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read("#{CREW_DEST_PREFIX}/bin/gdrive") ) == 'f31b441c5cdb835ee69849a62856e35c17954fd5b600f6de8a6f5d7bd7bf0420'
end
......
......@@ -33,18 +33,18 @@ class Geoip < Package
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/GeoIP"
# Version 1 - GeoLite Legacy (see https://dev.maxmind.com/geoip/legacy/geolite/)
system 'wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz'
system 'wget http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz'
system 'wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
system 'wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz'
system 'wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz'
system 'wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz'
system 'curl -#LO http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz'
system 'curl -#LO http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz'
system 'curl -#LO http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
system 'curl -#LO http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz'
system 'curl -#LO http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz'
system 'curl -#LO http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz'
system 'gunzip Geo*.gz'
system "cp Geo*.dat #{CREW_DEST_PREFIX}/share/GeoIP/"
# Version 2 - GeoLite2 for future use (see https://dev.maxmind.com/geoip/geoip2/geolite2/)
#system 'wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz'
#system 'wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz'
#system 'wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz'
#system 'curl -#LO http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz'
#system 'curl -#LO http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz'
#system 'curl -#LO http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz'
#system 'tar xvf GeoLite2-City.tar.gz'
#system 'tar xvf GeoLite2-Country.tar.gz'
#system 'tar xvf GeoLite2-ASN.tar.gz'
......
......@@ -29,7 +29,7 @@ class Get_iplayer < Package
depends_on 'zlibpkg'
def self.build
system "wget http://search.cpan.org/CPAN/authors/id/W/WI/WIMV/Math-LP-0.03.tar.gz"
system "curl -#LO http://search.cpan.org/CPAN/authors/id/W/WI/WIMV/Math-LP-0.03.tar.gz"
system "tar xf Math-LP-0.03.tar.gz"
Dir.chdir "Math-LP-0.03" do
system "perl Makefile.PL"
......@@ -44,7 +44,7 @@ class Get_iplayer < Package
system "cpanm Mojolicious --force"
system "cpanm XML::Simple --force"
system "wget http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0129.tar.gz"
system "curl -#LO http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0129.tar.gz"
system "tar xf XML-LibXML-2.0129.tar.gz"
Dir.chdir "XML-LibXML-2.0129" do
system "perl Makefile.PL"
......
......@@ -25,15 +25,14 @@ class Intltool < Package
depends_on 'libtool'
depends_on 'perl_xml_parser'
depends_on 'patch' => :build
depends_on 'wget' => :build
def self.patch
system "wget https://raw.githubusercontent.com/Alexpux/MSYS2-packages/master/intltool/perl-5.22-compatibility.patch"
system "curl -#LO https://raw.githubusercontent.com/Alexpux/MSYS2-packages/master/intltool/perl-5.22-compatibility.patch"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('perl-5.22-compatibility.patch') ) == '9c6527072aada6e3cb9aceb6e07cfdf51d58839a2beb650168da0601a85ebda3'
system "patch intltool-update.in perl-5.22-compatibility.patch"
end
def self.build
system "./configure --prefix=#{CREW_PREFIX}"
system "./configure #{CREW_OPTIONS}"
system "make"
end
......
......@@ -25,7 +25,7 @@ class Mypaint_brushes < Package
depends_on 'libmypaint'
def self.patch
system "wget http://www.linuxfromscratch.org/patches/blfs/svn/mypaint-brushes-1.3.0-automake_1.16-1.patch"
system "curl -#LO http://www.linuxfromscratch.org/patches/blfs/svn/mypaint-brushes-1.3.0-automake_1.16-1.patch"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('mypaint-brushes-1.3.0-automake_1.16-1.patch') ) == '789f9233a31227c1acc2f81a5348a2d5bc7f656ae69044c0b33d0032d1f93ae2'
system "patch -Np1 -i mypaint-brushes-1.3.0-automake_1.16-1.patch"
end
......
......@@ -12,7 +12,7 @@ class Mysqltuner < Package
depends_on 'perl'
def self.install
system "wget https://raw.githubusercontent.com/major/MySQLTuner-perl/1c51f442822a170fb2eaafb088f22c8f4baacd9d/mysqltuner.pl"
system "curl -#LO https://raw.githubusercontent.com/major/MySQLTuner-perl/1c51f442822a170fb2eaafb088f22c8f4baacd9d/mysqltuner.pl"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('mysqltuner.pl') ) == '26ad914fff4afca883a6a4d2bc69c142316144888c45e46e0fa56ad2b5a98a34'
system "install -Dm755 mysqltuner.pl #{CREW_DEST_PREFIX}/bin/mysqltuner"
end
......
......@@ -55,7 +55,7 @@ EOF"
system 'rm -f *'
end
FileUtils.chdir "#{CREW_DEST_PREFIX}" do
system "wget ftp://ftp.netbsd.org/pub/pkgsrc/pkgsrc-#{version}/pkgsrc-#{version}.tar.xz"
system "curl -#LO ftp://ftp.netbsd.org/pub/pkgsrc/pkgsrc-#{version}/pkgsrc-#{version}.tar.xz"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read("pkgsrc-#{version}.tar.xz") ) == '133d2f79115c87ad7dbf6f7ab604ddc0d09afe3b1d3c4cda5670c1fb758eb283'
system "tar xvf pkgsrc-#{version}.tar.xz"
FileUtils.rm_f "pkgsrc-#{version}.tar.xz"
......
......@@ -25,7 +25,7 @@ class Sgml_common < Package
})
def self.patch
system 'wget http://www.linuxfromscratch.org/patches/blfs/svn/sgml-common-0.6.3-manpage-1.patch'
system 'curl -#LO http://www.linuxfromscratch.org/patches/blfs/svn/sgml-common-0.6.3-manpage-1.patch'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('sgml-common-0.6.3-manpage-1.patch') ) == '50d93af704a0869faf8fedf5d23b1a9f90fff6499f4c11cf4addb5e460b7b58b'
system 'patch -Np1 -i sgml-common-0.6.3-manpage-1.patch && autoreconf -f -i'
end
......
......@@ -25,7 +25,7 @@ class Shrinkpdf < Package
depends_on 'ghostscript'
def self.install
system 'wget http://alfredklomp.com/programming/shrinkpdf/shrinkpdf.sh'
system 'curl -#LO http://alfredklomp.com/programming/shrinkpdf/shrinkpdf.sh'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('shrinkpdf.sh') ) == 'bf313e47e81ce4c088704840554f2f643597db1b3d6937a0af5ed43368b1ccc7'
system "install -Dm755 shrinkpdf.sh #{CREW_DEST_PREFIX}/bin/shrinkpdf"
end
......
......@@ -10,7 +10,7 @@ class Spark < Package
source_sha256 '85a153beeafea5637615644f2e92e47e71c621ffa1b0d995acadf51d1c9bbd0d'
def self.install
system 'wget https://raw.githubusercontent.com/holman/spark/ab88ac6f8f33698f39ece2f109b1117ef39a68eb/spark'
system 'curl -#LO https://raw.githubusercontent.com/holman/spark/ab88ac6f8f33698f39ece2f109b1117ef39a68eb/spark'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('spark') ) == '1fa0ef384309239f27f8c98c843639cac2c59e4fe51413cca9836ea64f73329d'
system "install -Dm755 spark #{CREW_DEST_PREFIX}/bin/spark"
end
......
......@@ -23,7 +23,7 @@ class Tcpwrappers < Package
})
def self.patch
system 'wget http://www.linuxfromscratch.org/blfs/downloads/6.1/tcp_wrappers-7.6-shared_lib_plus_plus-1.patch'
system 'curl -#LO http://www.linuxfromscratch.org/blfs/downloads/6.1/tcp_wrappers-7.6-shared_lib_plus_plus-1.patch'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('tcp_wrappers-7.6-shared_lib_plus_plus-1.patch') ) == 'c88af3bc83ad032e58be47cf53a1941c281b7fe4690d2c23ce2923e26146d42a'
system 'patch -Np1 -i ./tcp_wrappers-7.6-shared_lib_plus_plus-1.patch'
system 'sed -i -e "s,^extern char \*malloc();,/* & */," scaffold.c'
......
......@@ -23,8 +23,8 @@ class Texlive < Package
})
def self.build
system "wget ftp://ftp.fu-berlin.de/tex/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz"
system "wget ftp://ftp.fu-berlin.de/tex/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz.sha512"
system "curl -#LO ftp://ftp.fu-berlin.de/tex/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz"
system "curl -#LO ftp://ftp.fu-berlin.de/tex/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz.sha512"
system "cat install-tl-unx.tar.gz.sha512 | xargs | cut -d' ' -f1 > sha512"
sha512 = open('sha512').read.chomp
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA512.hexdigest( File.read('install-tl-unx.tar.gz') ) == sha512
......
......@@ -32,7 +32,7 @@ class Unzip < Package
patch_url = "http://archive.ubuntu.com/ubuntu/pool/main/u/unzip/unzip_6.0-25ubuntu1.debian.tar.xz"
patch_sha256 = '6a22b0d23cf8b9e1a74626d7d9af5efe1257e157f20006272dc68693a13f3b45'
system('wget', '--continue', '--no-check-certificate', patch_url, '-O', 'unzippatches.tar.xz')
system('curl -#L', patch_url, '-o', 'unzippatches.tar.xz')
abort 'Checksum mismatch :/ try again' unless Digest::SHA256.hexdigest( File.read("./unzippatches.tar.xz") ) == patch_sha256
system("tar","-xf","unzippatches.tar.xz")
......
......@@ -37,7 +37,7 @@ class Usbutils < Package
def self.postinstall
FileUtils.mkdir_p "#{CREW_PREFIX}/share/hwdata/" unless Dir.exist? "#{CREW_PREFIX}/share/hwdata/"
system "wget http://www.linux-usb.org/usb.ids -O #{CREW_PREFIX}/share/hwdata/usb.ids"
system "curl -#LO http://www.linux-usb.org/usb.ids -O #{CREW_PREFIX}/share/hwdata/usb.ids"
puts "It's recommended that you setup a cron job to update this file regularly.".lightblue
puts 'You can install a cron package by executing `crew install cronie`'.lightblue
puts
......
......@@ -41,7 +41,7 @@ class Vivaldi < Package
arch = 'amd64'
sha256 = 'f9d457943b40e2bd4edd6d7d6cf069bd9cb690b5da60f7ec314837840194abfa'
end
system "wget https://downloads.vivaldi.com/stable/vivaldi-stable_#{version}-1_#{arch}.deb"
system "curl -#LO https://downloads.vivaldi.com/stable/vivaldi-stable_#{version}-1_#{arch}.deb"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read("vivaldi-stable_#{version}-1_#{arch}.deb") ) == sha256
system "alien -tc vivaldi-stable_#{version}-1_#{arch}.deb"
system "tar xvf vivaldi-stable-#{version}.tgz"
......
......@@ -22,8 +22,6 @@ class Zip < Package
x86_64: 'c78a63d3630f3dbf637127e1a5a08942fd1da213cde296d33e77823e8547a56c',
})
depends_on 'wget' => :build
# adapted from the homebrew recipe as seen at: https://github.com/Homebrew/homebrew-core/blob/master/Formula/zip.rb
# Upstream is unmaintained so we use the Debian patchset:
# https://packages.debian.org/sid/zip
......@@ -31,7 +29,7 @@ class Zip < Package
patch_url = "https://mirrors.ocf.berkeley.edu/debian/pool/main/z/zip/zip_3.0-11.debian.tar.xz"
patch_sha256 = "c5c0714a88592f9e02146bfe4a8d26cd9bd97e8d33b1efc8b37784997caa40ed"
system('wget', '--continue', '--no-check-certificate', patch_url, '-O', 'zippatches.tar.xz')
system('curl -#L', patch_url, '-o', 'zippatches.tar.xz')
abort 'Checksum mismatch :/ try again' unless Digest::SHA256.hexdigest( File.read("./zippatches.tar.xz") ) == patch_sha256
system("tar","-xf","zippatches.tar.xz")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment