slackbuilder/Rakefile

44 lines
1.4 KiB
Ruby
Raw Normal View History

2020-12-09 18:28:42 +01:00
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# frozen_string_literal: true
require 'digest/md5'
require 'net/http'
2022-12-23 17:47:14 +01:00
require 'open3'
2021-01-02 07:39:32 +01:00
require_relative 'config/config'
2020-12-09 18:28:42 +01:00
require_relative 'lib/package'
require_relative 'lib/download'
2022-10-30 18:08:12 +01:00
task :dmd, [:version] do |_, arguments|
raise 'Version is not specified.' unless arguments.key? :version
2023-07-06 21:59:25 +02:00
dub_version = '1.33.0'
dscanner_version = '0.15.2'
dcd_version = '0.15.2'
2020-12-09 18:28:42 +01:00
2022-11-20 12:44:28 +01:00
SlackBuilder::DmdTools.update_dmd arguments[:version]
SlackBuilder::DmdTools.update_tools arguments[:version], dub_version, dscanner_version, dcd_version
2020-12-09 18:28:42 +01:00
end
task :hhvm, [:version] do |_, arguments|
2022-10-30 18:08:12 +01:00
raise 'Version is not specified.' unless arguments.key? :version
2021-05-04 07:47:24 +02:00
2022-10-30 18:08:12 +01:00
checksum = {}
2023-03-18 13:15:12 +01:00
checksum[:hhvm] = SlackBuilder.clone 'https://github.com/facebook/hhvm.git',
2022-10-30 18:08:12 +01:00
"development/hhvm/hhvm-#{arguments[:version]}.tar.xz", 'HHVM-'
2021-05-04 07:47:24 +02:00
package = Package.new 'development/hhvm',
2022-10-30 18:08:12 +01:00
version: arguments[:version],
2021-05-04 07:47:24 +02:00
homepage: 'https://hhvm.com/',
requires: %w[tbb glog libdwarf libmemcached dobule-conversion]
write_info package,
downloads: [
2023-03-18 13:15:12 +01:00
Download.new(SlackBuilder.hosted_sources("/hhvm/hhvm-#{package.version}.tar.xz"), checksum[:hhvm], is64: true)
2021-05-04 07:47:24 +02:00
]
2022-10-30 18:08:12 +01:00
update_slackbuild_version 'development/hhvm', package.version
2021-05-04 07:47:24 +02:00
end