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
|
|
|
|
|
2022-11-20 12:44:28 +01:00
|
|
|
dub_version = '1.30.0'
|
2022-09-23 20:41:49 +02:00
|
|
|
dscanner_version = '0.12.2'
|
2021-10-12 07:42:35 +02:00
|
|
|
dcd_version = '0.13.6'
|
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
|
|
|
|
|
2022-04-26 17:09:26 +02:00
|
|
|
task :composer, [:version] do |_, arguments|
|
2022-10-30 18:08:12 +01:00
|
|
|
raise 'Version is not specified.' unless arguments.key? :version
|
|
|
|
|
2020-12-09 18:28:42 +01:00
|
|
|
package = Package.new 'development/composer',
|
2022-04-26 17:09:26 +02:00
|
|
|
version: arguments[:version],
|
2020-12-09 18:28:42 +01:00
|
|
|
homepage: 'https://getcomposer.org/'
|
|
|
|
|
2022-04-26 17:09:26 +02:00
|
|
|
uri = "https://getcomposer.org/download/#{arguments[:version]}/composer.phar"
|
2023-01-04 10:51:08 +01:00
|
|
|
checksum = SlackBuilder.download URI(uri), 'slackbuilds/development/composer/composer.phar'
|
2022-04-26 17:09:26 +02:00
|
|
|
write_info package, downloads: [Download.new(uri, checksum.hexdigest)]
|
|
|
|
update_slackbuild_version 'development/composer', arguments[:version]
|
2020-12-09 18:28:42 +01:00
|
|
|
|
2022-04-26 17:09:26 +02:00
|
|
|
commit 'development/composer', arguments[:version]
|
2020-12-09 18:28:42 +01:00
|
|
|
end
|
|
|
|
|
2022-04-27 23:22:39 +02:00
|
|
|
task 'universal-ctags', [:version] do |_, arguments|
|
2022-10-30 18:08:12 +01:00
|
|
|
raise 'Version is not specified.' unless arguments.key? :version
|
|
|
|
|
2021-01-10 12:12:35 +01:00
|
|
|
package = Package.new 'development/universal-ctags',
|
2022-04-27 23:22:39 +02:00
|
|
|
version: arguments[:version],
|
|
|
|
homepage: 'https://ctags.io/',
|
|
|
|
requires: ['%README%']
|
|
|
|
|
|
|
|
uri = "https://github.com/universal-ctags/ctags/archive/#{arguments[:version]}/ctags-#{arguments[:version]}.tar.gz"
|
|
|
|
tarball = "slackbuilds/development/universal-ctags/ctags-#{arguments[:version]}.tar.gz"
|
2023-01-04 10:51:08 +01:00
|
|
|
checksum = SlackBuilder.download URI(uri), tarball
|
2022-04-27 23:22:39 +02:00
|
|
|
download = "https://download.dlackware.com/hosted-sources/universal-ctags/ctags-#{arguments[:version]}.tar.gz"
|
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)]
|
2022-04-27 23:22:39 +02:00
|
|
|
update_slackbuild_version 'development/universal-ctags', arguments[:version]
|
|
|
|
sh 'scp', tarball, "#{CONFIG[:remote_path]}/universal-ctags"
|
2021-01-10 12:12:35 +01:00
|
|
|
|
2022-04-27 23:22:39 +02:00
|
|
|
commit 'development/universal-ctags', arguments[:version]
|
2020-12-09 18:28:42 +01:00
|
|
|
end
|
2021-05-04 07:47:24 +02:00
|
|
|
|
|
|
|
task :hhvm do
|
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 = {}
|
2021-05-04 07:47:24 +02:00
|
|
|
checksum[:hhvm] = 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: [
|
2022-10-30 18:08:12 +01:00
|
|
|
Download.new(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
|
2021-10-12 07:42:35 +02:00
|
|
|
|
|
|
|
task :ioncube do
|
2022-10-30 18:08:12 +01:00
|
|
|
raise 'Version is not specified.' unless arguments.key? :version
|
|
|
|
|
2021-10-12 07:42:35 +02:00
|
|
|
tarball_name = {
|
2022-10-30 18:08:12 +01:00
|
|
|
'32' => "ioncube_loaders_lin_x86_#{arguments[:version]}.tar.gz",
|
|
|
|
'64' => "ioncube_loaders_lin_x86-64_#{arguments[:version]}.tar.gz"
|
2021-10-12 07:42:35 +02:00
|
|
|
}
|
|
|
|
uri = {
|
|
|
|
'32' => URI("http://downloads3.ioncube.com/loader_downloads/#{tarball_name['32']}"),
|
|
|
|
'64' => URI("http://downloads3.ioncube.com/loader_downloads/#{tarball_name['64']}")
|
|
|
|
}
|
|
|
|
checksum = {
|
2023-01-04 10:51:08 +01:00
|
|
|
'32' => SlackBuilder.download(uri['32'], "slackbuilds/development/ioncube-loader/#{tarball_name['32']}").hexdigest,
|
|
|
|
'64' => SlackBuilder.download(uri['64'], "slackbuilds/development/ioncube-loader/#{tarball_name['64']}").hexdigest
|
2021-10-12 07:42:35 +02:00
|
|
|
}
|
|
|
|
package = Package.new 'development/ioncube-loader',
|
2022-10-30 18:08:12 +01:00
|
|
|
version: arguments[:version],
|
2021-10-12 07:42:35 +02:00
|
|
|
homepage: 'https://www.ioncube.com'
|
|
|
|
|
|
|
|
write_info package,
|
|
|
|
downloads: [
|
|
|
|
Download.new(uri['32'], checksum['32']),
|
|
|
|
Download.new(uri['64'], checksum['64'], is64: true)
|
|
|
|
]
|
|
|
|
|
2022-10-30 18:08:12 +01:00
|
|
|
update_slackbuild_version 'development/ioncube-loader', package.version
|
|
|
|
commit 'development/ioncube-loader', package.version
|
2021-10-12 07:42:35 +02:00
|
|
|
end
|
2022-12-23 17:47:14 +01:00
|
|
|
|
|
|
|
task :webex do
|
|
|
|
tarball = 'slackbuilds/network/webex/Webex.deb'
|
|
|
|
uri = 'https://binaries.webex.com/WebexDesktop-Ubuntu-Official-Package/Webex.deb'
|
2023-01-04 10:51:08 +01:00
|
|
|
checksum = SlackBuilder.download URI(uri), tarball
|
2022-12-23 17:47:14 +01:00
|
|
|
|
|
|
|
last_stdout, = Open3.pipeline_r ['ar', 'p', tarball, 'control.tar.gz'], ['tar', 'zxO', './control']
|
|
|
|
version = last_stdout.read.lines
|
|
|
|
.find { |line| line.start_with? 'Version: ' }
|
|
|
|
.split.last
|
|
|
|
|
|
|
|
package = Package.new 'network/webex',
|
|
|
|
version: version,
|
|
|
|
homepage: 'https://www.webex.com'
|
|
|
|
|
|
|
|
write_info package,
|
|
|
|
downloads: [Download.new(uri, checksum, is64: true)]
|
|
|
|
|
|
|
|
update_slackbuild_version 'network/webex', package.version
|
|
|
|
commit 'network/webex', package.version
|
|
|
|
end
|
2023-01-04 10:51:08 +01:00
|
|
|
|
|
|
|
task 'rdiff-backup', [:version] do |_, arguments|
|
|
|
|
raise 'Version is not specified.' unless arguments.key? :version
|
|
|
|
|
|
|
|
package = Package.new 'system/rdiff-backup',
|
|
|
|
version: arguments[:version],
|
|
|
|
homepage: 'https://rdiff-backup.net/',
|
|
|
|
requires: ['librsync']
|
|
|
|
|
|
|
|
uri = "https://github.com/rdiff-backup/rdiff-backup/releases/download/v#{arguments[:version]}/rdiff-backup-#{arguments[:version]}.tar.gz"
|
|
|
|
tarball = "system/rdiff-backup/rdiff-backup-#{arguments[:version]}.tar.gz"
|
|
|
|
checksum = download_and_deploy URI(uri), tarball
|
|
|
|
download = "https://download.dlackware.com/hosted-sources/rdiff-backup/rdiff-backup-#{arguments[:version]}.tar.gz"
|
|
|
|
|
|
|
|
write_info package, downloads: [Download.new(download, checksum)]
|
|
|
|
update_slackbuild_version 'system/rdiff-backup', arguments[:version]
|
|
|
|
|
|
|
|
commit 'system/rdiff-backup', arguments[:version]
|
|
|
|
end
|