Check for the version argument
This commit is contained in:
parent
2930b85927
commit
3916aa114f
54
Rakefile
54
Rakefile
@ -10,31 +10,32 @@ require_relative 'config/config'
|
|||||||
require_relative 'lib/package'
|
require_relative 'lib/package'
|
||||||
require_relative 'lib/download'
|
require_relative 'lib/download'
|
||||||
|
|
||||||
task :dmd do
|
task :dmd, [:version] do |_, arguments|
|
||||||
version = '2.100.2'
|
raise 'Version is not specified.' unless arguments.key? :version
|
||||||
|
|
||||||
dub_version = '1.29.0'
|
dub_version = '1.29.0'
|
||||||
dscanner_version = '0.12.2'
|
dscanner_version = '0.12.2'
|
||||||
dcd_version = '0.13.6'
|
dcd_version = '0.13.6'
|
||||||
tarball_name = "dmd.#{version}.linux.tar.xz"
|
tarball_name = "dmd.#{arguments[:version]}.linux.tar.xz"
|
||||||
|
|
||||||
uri = URI "http://downloads.dlang.org/releases/2.x/#{version}/#{tarball_name}"
|
uri = URI "http://downloads.dlang.org/releases/2.x/#{arguments[:version]}/#{tarball_name}"
|
||||||
checksum = {
|
checksum = {
|
||||||
dmd: download(uri, "slackbuilds/development/dmd/#{tarball_name}").hexdigest
|
dmd: download(uri, "slackbuilds/development/dmd/#{tarball_name}").hexdigest
|
||||||
}
|
}
|
||||||
|
|
||||||
package = Package.new 'development/dmd',
|
package = Package.new 'development/dmd',
|
||||||
version: version,
|
version: arguments[:version],
|
||||||
homepage: 'https://dlang.org'
|
homepage: 'https://dlang.org'
|
||||||
|
|
||||||
write_info package,
|
write_info package,
|
||||||
downloads: [Download.new(uri.to_s, checksum[:dmd])]
|
downloads: [Download.new(uri.to_s, checksum[:dmd])]
|
||||||
|
|
||||||
update_slackbuild_version 'development/dmd', version
|
update_slackbuild_version 'development/dmd', package.version
|
||||||
commit 'development/dmd', version
|
commit 'development/dmd', version
|
||||||
|
|
||||||
uri = URI "https://codeload.github.com/dlang/tools/tar.gz/v#{version}"
|
uri = URI "https://codeload.github.com/dlang/tools/tar.gz/v#{package.version}"
|
||||||
checksum[:tools] = download_and_deploy uri,
|
checksum[:tools] = download_and_deploy uri,
|
||||||
"development/d-tools/tools-#{version}.tar.gz"
|
"development/d-tools/tools-#{package.version}.tar.gz"
|
||||||
|
|
||||||
uri = URI "https://codeload.github.com/dlang/dub/tar.gz/v#{dub_version}"
|
uri = URI "https://codeload.github.com/dlang/dub/tar.gz/v#{dub_version}"
|
||||||
checksum[:dub] = download_and_deploy uri,
|
checksum[:dub] = download_and_deploy uri,
|
||||||
@ -46,14 +47,14 @@ task :dmd do
|
|||||||
"development/d-tools/DCD-#{dcd_version}.tar.xz"
|
"development/d-tools/DCD-#{dcd_version}.tar.xz"
|
||||||
|
|
||||||
package = Package.new 'development/d-tools',
|
package = Package.new 'development/d-tools',
|
||||||
version: version,
|
version: arguments[:version],
|
||||||
homepage: 'https://dlang.org',
|
homepage: 'https://dlang.org',
|
||||||
requires: ['dmd']
|
requires: ['dmd']
|
||||||
|
|
||||||
write_info package,
|
write_info package,
|
||||||
downloads: [
|
downloads: [
|
||||||
Download.new(hosted_sources("/d-tools/dub-#{dub_version}.tar.gz"), checksum[:dub]),
|
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/tools-#{package.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/D-Scanner-#{dscanner_version}.tar.xz"), checksum[:dscanner]),
|
||||||
Download.new(hosted_sources("/d-tools/DCD-#{dcd_version}.tar.xz"), checksum[:dcd])
|
Download.new(hosted_sources("/d-tools/DCD-#{dcd_version}.tar.xz"), checksum[:dcd])
|
||||||
]
|
]
|
||||||
@ -68,11 +69,13 @@ task :dmd do
|
|||||||
"DCD_VERSION=${DCD_VERSION:-#{dcd_version}}")
|
"DCD_VERSION=${DCD_VERSION:-#{dcd_version}}")
|
||||||
File.open(slackbuild_filename, 'w') { |file| file.puts slackbuild_contents }
|
File.open(slackbuild_filename, 'w') { |file| file.puts slackbuild_contents }
|
||||||
|
|
||||||
update_slackbuild_version 'development/d-tools', version
|
update_slackbuild_version 'development/d-tools', package.version
|
||||||
commit 'development/d-tools', version
|
commit 'development/d-tools', package.version
|
||||||
end
|
end
|
||||||
|
|
||||||
task :composer, [:version] do |_, arguments|
|
task :composer, [:version] do |_, arguments|
|
||||||
|
raise 'Version is not specified.' unless arguments.key? :version
|
||||||
|
|
||||||
package = Package.new 'development/composer',
|
package = Package.new 'development/composer',
|
||||||
version: arguments[:version],
|
version: arguments[:version],
|
||||||
homepage: 'https://getcomposer.org/'
|
homepage: 'https://getcomposer.org/'
|
||||||
@ -86,6 +89,8 @@ task :composer, [:version] do |_, arguments|
|
|||||||
end
|
end
|
||||||
|
|
||||||
task 'universal-ctags', [:version] do |_, arguments|
|
task 'universal-ctags', [:version] do |_, arguments|
|
||||||
|
raise 'Version is not specified.' unless arguments.key? :version
|
||||||
|
|
||||||
package = Package.new 'development/universal-ctags',
|
package = Package.new 'development/universal-ctags',
|
||||||
version: arguments[:version],
|
version: arguments[:version],
|
||||||
homepage: 'https://ctags.io/',
|
homepage: 'https://ctags.io/',
|
||||||
@ -105,30 +110,31 @@ task 'universal-ctags', [:version] do |_, arguments|
|
|||||||
end
|
end
|
||||||
|
|
||||||
task :hhvm do
|
task :hhvm do
|
||||||
version = '4.104.1'
|
raise 'Version is not specified.' unless arguments.key? :version
|
||||||
checksum = {}
|
|
||||||
|
|
||||||
|
checksum = {}
|
||||||
checksum[:hhvm] = clone 'https://github.com/facebook/hhvm.git',
|
checksum[:hhvm] = clone 'https://github.com/facebook/hhvm.git',
|
||||||
"development/hhvm/hhvm-#{version}.tar.xz", 'HHVM-'
|
"development/hhvm/hhvm-#{arguments[:version]}.tar.xz", 'HHVM-'
|
||||||
|
|
||||||
package = Package.new 'development/hhvm',
|
package = Package.new 'development/hhvm',
|
||||||
version: version,
|
version: arguments[:version],
|
||||||
homepage: 'https://hhvm.com/',
|
homepage: 'https://hhvm.com/',
|
||||||
requires: %w[tbb glog libdwarf libmemcached dobule-conversion]
|
requires: %w[tbb glog libdwarf libmemcached dobule-conversion]
|
||||||
|
|
||||||
write_info package,
|
write_info package,
|
||||||
downloads: [
|
downloads: [
|
||||||
Download.new(hosted_sources("/hhvm/hhvm-#{version}.tar.xz"), checksum[:hhvm], is64: true)
|
Download.new(hosted_sources("/hhvm/hhvm-#{package.version}.tar.xz"), checksum[:hhvm], is64: true)
|
||||||
]
|
]
|
||||||
|
|
||||||
update_slackbuild_version 'development/hhvm', version
|
update_slackbuild_version 'development/hhvm', package.version
|
||||||
end
|
end
|
||||||
|
|
||||||
task :ioncube do
|
task :ioncube do
|
||||||
version = '10.4.5'
|
raise 'Version is not specified.' unless arguments.key? :version
|
||||||
|
|
||||||
tarball_name = {
|
tarball_name = {
|
||||||
'32' => "ioncube_loaders_lin_x86_#{version}.tar.gz",
|
'32' => "ioncube_loaders_lin_x86_#{arguments[:version]}.tar.gz",
|
||||||
'64' => "ioncube_loaders_lin_x86-64_#{version}.tar.gz"
|
'64' => "ioncube_loaders_lin_x86-64_#{arguments[:version]}.tar.gz"
|
||||||
}
|
}
|
||||||
uri = {
|
uri = {
|
||||||
'32' => URI("http://downloads3.ioncube.com/loader_downloads/#{tarball_name['32']}"),
|
'32' => URI("http://downloads3.ioncube.com/loader_downloads/#{tarball_name['32']}"),
|
||||||
@ -139,7 +145,7 @@ task :ioncube do
|
|||||||
'64' => download(uri['64'], "slackbuilds/development/ioncube-loader/#{tarball_name['64']}").hexdigest
|
'64' => download(uri['64'], "slackbuilds/development/ioncube-loader/#{tarball_name['64']}").hexdigest
|
||||||
}
|
}
|
||||||
package = Package.new 'development/ioncube-loader',
|
package = Package.new 'development/ioncube-loader',
|
||||||
version: version,
|
version: arguments[:version],
|
||||||
homepage: 'https://www.ioncube.com'
|
homepage: 'https://www.ioncube.com'
|
||||||
|
|
||||||
write_info package,
|
write_info package,
|
||||||
@ -148,6 +154,6 @@ task :ioncube do
|
|||||||
Download.new(uri['64'], checksum['64'], is64: true)
|
Download.new(uri['64'], checksum['64'], is64: true)
|
||||||
]
|
]
|
||||||
|
|
||||||
update_slackbuild_version 'development/ioncube-loader', version
|
update_slackbuild_version 'development/ioncube-loader', package.version
|
||||||
commit 'development/ioncube-loader', version
|
commit 'development/ioncube-loader', package.version
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user