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'
|
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'
|
|
|
|
|
|
|
|
task :dmd do
|
2021-12-28 07:42:33 +01:00
|
|
|
version = '2.098.1'
|
|
|
|
dub_version = '1.27.0'
|
2021-10-12 07:42:35 +02:00
|
|
|
dscanner_version = '0.11.1'
|
|
|
|
dcd_version = '0.13.6'
|
2020-12-09 18:28:42 +01:00
|
|
|
tarball_name = "dmd.#{version}.linux.tar.xz"
|
|
|
|
|
|
|
|
uri = URI "http://downloads.dlang.org/releases/2.x/#{version}/#{tarball_name}"
|
|
|
|
checksum = {
|
2021-01-19 07:41:37 +01:00
|
|
|
dmd: download(uri, "slackbuilds/development/dmd/#{tarball_name}").hexdigest
|
2020-12-09 18:28:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package = Package.new 'development/dmd',
|
|
|
|
version: version,
|
|
|
|
homepage: 'https://dlang.org'
|
|
|
|
|
|
|
|
write_info package,
|
2021-05-04 07:47:24 +02:00
|
|
|
downloads: [Download.new(uri.to_s, checksum[:dmd])]
|
2020-12-09 18:28:42 +01:00
|
|
|
|
|
|
|
update_slackbuild_version 'development/dmd', version
|
|
|
|
commit 'development/dmd', version
|
|
|
|
|
|
|
|
uri = URI "https://codeload.github.com/dlang/tools/tar.gz/v#{version}"
|
|
|
|
checksum[:tools] = download_and_deploy uri,
|
|
|
|
"development/d-tools/tools-#{version}.tar.gz"
|
|
|
|
|
|
|
|
uri = URI "https://codeload.github.com/dlang/dub/tar.gz/v#{dub_version}"
|
|
|
|
checksum[:dub] = download_and_deploy uri,
|
|
|
|
"development/d-tools/dub-#{dub_version}.tar.gz"
|
|
|
|
|
|
|
|
checksum[:dscanner] = clone 'https://github.com/dlang-community/D-Scanner.git',
|
|
|
|
"development/d-tools/D-Scanner-#{dscanner_version}.tar.xz"
|
|
|
|
checksum[:dcd] = clone 'https://github.com/dlang-community/DCD.git',
|
|
|
|
"development/d-tools/DCD-#{dcd_version}.tar.xz"
|
|
|
|
|
|
|
|
package = Package.new 'development/d-tools',
|
|
|
|
version: version,
|
|
|
|
homepage: 'https://dlang.org',
|
|
|
|
requires: ['dmd']
|
|
|
|
|
|
|
|
write_info package,
|
2021-05-04 07:47:24 +02:00
|
|
|
downloads: [
|
|
|
|
Download.new(hosted_sources("/d-tools/dub-#{dub_version}.tar.gz"), checksum[:dub]),
|
|
|
|
Download.new(hosted_sources("/d-tools/tools-#{version}.tar.gz"), checksum[:tools]),
|
|
|
|
Download.new(hosted_sources("/d-tools/D-Scanner-#{dscanner_version}.tar.xz"), checksum[:dscanner]),
|
|
|
|
Download.new(hosted_sources("/d-tools/DCD-#{dcd_version}.tar.xz"), checksum[:dcd])
|
2020-12-09 18:28:42 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
slackbuild_filename = 'slackbuilds/development/d-tools/d-tools.SlackBuild'
|
|
|
|
slackbuild_contents = File.read(slackbuild_filename)
|
|
|
|
.gsub(/^DUB_VERSION=\${DUB_VERSION:-.+/,
|
|
|
|
"DUB_VERSION=${DUB_VERSION:-#{dub_version}}")
|
|
|
|
.gsub(/^DSCANNER_VERSION=\${DSCANNER_VERSION:-.+/,
|
|
|
|
"DSCANNER_VERSION=${DSCANNER_VERSION:-#{dscanner_version}}")
|
|
|
|
.gsub(/^DCD_VERSION=\${DCD_VERSION:-.+/,
|
|
|
|
"DCD_VERSION=${DCD_VERSION:-#{dcd_version}}")
|
|
|
|
File.open(slackbuild_filename, 'w') { |file| file.puts slackbuild_contents }
|
|
|
|
|
|
|
|
update_slackbuild_version 'development/d-tools', version
|
|
|
|
commit 'development/d-tools', version
|
|
|
|
end
|
|
|
|
|
|
|
|
task :composer do
|
2021-04-02 08:10:48 +02:00
|
|
|
version = '2.0.11'
|
2020-12-09 18:28:42 +01:00
|
|
|
|
|
|
|
package = Package.new 'development/composer',
|
|
|
|
version: version,
|
|
|
|
homepage: 'https://getcomposer.org/'
|
|
|
|
|
|
|
|
uri = URI "https://getcomposer.org/download/#{version}/composer.phar"
|
|
|
|
checksum = download uri, 'slackbuilds/development/composer/composer.phar'
|
|
|
|
write_info package,
|
2021-05-04 07:47:24 +02:00
|
|
|
downloads: [Download.new("https://getcomposer.org/download/#{version}/composer.phar", checksum.hexdigest)]
|
2020-12-09 18:28:42 +01:00
|
|
|
update_slackbuild_version 'development/composer', version
|
|
|
|
|
|
|
|
commit 'development/composer', version
|
|
|
|
end
|
|
|
|
|
|
|
|
task 'universal-ctags' do
|
|
|
|
ENV['COMMIT'] = `git ls-remote https://github.com/universal-ctags/ctags.git master`
|
|
|
|
.split
|
|
|
|
.first
|
2021-01-10 12:12:35 +01:00
|
|
|
version = ENV['COMMIT'][0...7]
|
2020-12-09 18:28:42 +01:00
|
|
|
|
|
|
|
sh 'git', 'clone', '--recurse-submodules', 'https://github.com/universal-ctags/ctags.git', "ctags-#{ENV['COMMIT']}"
|
|
|
|
rm_rf ["ctags-#{ENV['COMMIT']}/.git", "ctags-#{ENV['COMMIT']}/.gitignore"], secure: true
|
2021-01-10 12:12:35 +01:00
|
|
|
tarball = "slackbuilds/development/universal-ctags/ctags-#{ENV['COMMIT']}.tar.xz"
|
|
|
|
sh 'tar', 'Jcvf', tarball, "ctags-#{ENV['COMMIT']}"
|
2021-01-02 07:39:32 +01:00
|
|
|
|
|
|
|
rm_rf "ctags-#{ENV['COMMIT']}", secure: true
|
|
|
|
|
2021-01-10 12:12:35 +01:00
|
|
|
checksum = Digest::MD5.file tarball
|
2021-01-02 07:39:32 +01:00
|
|
|
|
2021-01-10 12:12:35 +01:00
|
|
|
sh 'scp', tarball, "#{CONFIG[:remote_path]}/universal-ctags"
|
2020-12-09 18:28:42 +01:00
|
|
|
|
2021-01-10 12:12:35 +01:00
|
|
|
package = Package.new 'development/universal-ctags',
|
|
|
|
version: version,
|
|
|
|
homepage: 'https://ctags.io/'
|
2021-05-04 07:47:24 +02:00
|
|
|
download = "https://download.dlackware.com/hosted-sources/universal-ctags/ctags-#{ENV['COMMIT']}.tar.xz"
|
2021-01-10 12:12:35 +01:00
|
|
|
|
|
|
|
write_info package,
|
2021-05-04 07:47:24 +02:00
|
|
|
downloads: [Download.new(download, checksum.hexdigest)]
|
2021-01-10 12:12:35 +01:00
|
|
|
update_slackbuild_version 'development/universal-ctags', version
|
|
|
|
sh 'sed',
|
|
|
|
'-i',
|
|
|
|
"s#^GITVERSION=${GITVERSION:-.\\+#GITVERSION=${GITVERSION:-#{ENV['COMMIT']}}#",
|
|
|
|
'slackbuilds/development/universal-ctags/universal-ctags.SlackBuild'
|
|
|
|
|
|
|
|
commit 'development/universal-ctags', version
|
2020-12-09 18:28:42 +01:00
|
|
|
end
|
2021-05-04 07:47:24 +02:00
|
|
|
|
|
|
|
task :hhvm do
|
|
|
|
version = '4.104.1'
|
|
|
|
checksum = {}
|
|
|
|
|
|
|
|
checksum[:hhvm] = clone 'https://github.com/facebook/hhvm.git',
|
|
|
|
"development/hhvm/hhvm-#{version}.tar.xz", 'HHVM-'
|
|
|
|
|
|
|
|
package = Package.new 'development/hhvm',
|
|
|
|
version: version,
|
|
|
|
homepage: 'https://hhvm.com/',
|
|
|
|
requires: %w[tbb glog libdwarf libmemcached dobule-conversion]
|
|
|
|
|
|
|
|
write_info package,
|
|
|
|
downloads: [
|
|
|
|
Download.new(hosted_sources("/hhvm/hhvm-#{version}.tar.xz"), checksum[:hhvm], is64: true)
|
|
|
|
]
|
|
|
|
|
|
|
|
update_slackbuild_version 'development/hhvm', version
|
|
|
|
end
|
2021-10-12 07:42:35 +02:00
|
|
|
|
|
|
|
task :ioncube do
|
|
|
|
version = '10.4.5'
|
|
|
|
tarball_name = {
|
|
|
|
'32' => "ioncube_loaders_lin_x86_#{version}.tar.gz",
|
|
|
|
'64' => "ioncube_loaders_lin_x86-64_#{version}.tar.gz"
|
|
|
|
}
|
|
|
|
uri = {
|
|
|
|
'32' => URI("http://downloads3.ioncube.com/loader_downloads/#{tarball_name['32']}"),
|
|
|
|
'64' => URI("http://downloads3.ioncube.com/loader_downloads/#{tarball_name['64']}")
|
|
|
|
}
|
|
|
|
checksum = {
|
|
|
|
'32' => download(uri['32'], "slackbuilds/development/ioncube-loader/#{tarball_name['32']}").hexdigest,
|
|
|
|
'64' => download(uri['64'], "slackbuilds/development/ioncube-loader/#{tarball_name['64']}").hexdigest
|
|
|
|
}
|
|
|
|
package = Package.new 'development/ioncube-loader',
|
|
|
|
version: version,
|
|
|
|
homepage: 'https://www.ioncube.com'
|
|
|
|
|
|
|
|
write_info package,
|
|
|
|
downloads: [
|
|
|
|
Download.new(uri['32'], checksum['32']),
|
|
|
|
Download.new(uri['64'], checksum['64'], is64: true)
|
|
|
|
]
|
|
|
|
|
|
|
|
update_slackbuild_version 'development/ioncube-loader', version
|
|
|
|
commit 'development/ioncube-loader', version
|
|
|
|
end
|