summaryrefslogtreecommitdiff
path: root/Rakefile
blob: 98ef806dab64783a13d07e6ca923891922e07c60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# 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'
require 'open3'
require_relative 'config/config'
require_relative 'lib/package'
require_relative 'lib/download'

task :dmd, [:version] do |_, arguments|
  raise 'Version is not specified.' unless arguments.key? :version

  dub_version = '1.33.0'
  dscanner_version = '0.15.2'
  dcd_version = '0.15.2'

  SlackBuilder::DmdTools.update_dmd arguments[:version]
  SlackBuilder::DmdTools.update_tools arguments[:version], dub_version, dscanner_version, dcd_version
end

task :hhvm, [:version] do |_, arguments|
  raise 'Version is not specified.' unless arguments.key? :version

  checksum = {}
  checksum[:hhvm] = SlackBuilder.clone 'https://github.com/facebook/hhvm.git',
    "development/hhvm/hhvm-#{arguments[:version]}.tar.xz", 'HHVM-'

  package = Package.new 'development/hhvm',
    version: arguments[:version],
    homepage: 'https://hhvm.com/',
    requires: %w[tbb glog libdwarf libmemcached dobule-conversion]

  write_info package,
    downloads: [
      Download.new(SlackBuilder.hosted_sources("/hhvm/hhvm-#{package.version}.tar.xz"), checksum[:hhvm], is64: true)
    ]

  update_slackbuild_version 'development/hhvm', package.version
end