Add PHP updater

This commit is contained in:
Eugen Wissner 2023-08-01 18:03:00 +02:00
parent 868f6c36a5
commit 1bc410d86d
3 changed files with 31 additions and 27 deletions

View File

@ -9,7 +9,7 @@ source 'https://rubygems.org'
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
gem 'rake', '~> 13.0' gem 'rake', '~> 13.0'
gem 'rubocop', '~> 1.7', require: false gem 'rubocop', '~> 1.53.1', require: false
gem 'progressbar', '~> 1.11' gem 'progressbar', '~> 1.11'
gem 'term-ansicolor', '~> 1.7' gem 'term-ansicolor', '~> 1.7'

View File

@ -3,25 +3,29 @@ GEM
specs: specs:
ast (2.4.2) ast (2.4.2)
json (2.6.3) json (2.6.3)
language_server-protocol (3.17.0.3)
parallel (1.23.0) parallel (1.23.0)
parser (3.2.2.1) parser (3.2.2.3)
ast (~> 2.4.1) ast (~> 2.4.1)
racc
progressbar (1.13.0) progressbar (1.13.0)
racc (1.7.1)
rainbow (3.1.1) rainbow (3.1.1)
rake (13.0.6) rake (13.0.6)
regexp_parser (2.8.0) regexp_parser (2.8.1)
rexml (3.2.5) rexml (3.2.6)
rubocop (1.50.2) rubocop (1.53.1)
json (~> 2.3) json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 3.2.0.0) parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0) regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0) rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0) rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0) unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.1) rubocop-ast (1.29.0)
parser (>= 3.2.1.0) parser (>= 3.2.1.0)
ruby-progressbar (1.13.0) ruby-progressbar (1.13.0)
sync (0.5.0) sync (0.5.0)
@ -37,7 +41,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
progressbar (~> 1.11) progressbar (~> 1.11)
rake (~> 13.0) rake (~> 13.0)
rubocop (~> 1.7) rubocop (~> 1.53.1)
term-ansicolor (~> 1.7) term-ansicolor (~> 1.7)
BUNDLED WITH BUNDLED WITH

View File

@ -43,24 +43,6 @@ task :hhvm, [:version] do |_, arguments|
update_slackbuild_version 'development/hhvm', package.version update_slackbuild_version 'development/hhvm', package.version
end end
task 'php', [:version] do |_, arguments|
raise 'Version is not specified.' unless arguments.key? :version
package = Package.new 'development/php82',
version: arguments[:version],
homepage: 'https://www.php.net/',
requires: ['postgresql']
uri = "https://www.php.net/distributions/php-#{arguments[:version]}.tar.xz"
tarball = "slackbuilds/development/php82/php-#{arguments[:version]}.tar.xz"
checksum = SlackBuilder.download URI(uri), tarball
write_info package, downloads: [Download.new(uri, checksum)]
update_slackbuild_version 'development/php82', arguments[:version]
commit 'development/php82', arguments[:version]
end
task :webex do task :webex do
tarball = 'slackbuilds/network/webex/Webex.deb' tarball = 'slackbuilds/network/webex/Webex.deb'
uri = 'https://binaries.webex.com/WebexDesktop-Ubuntu-Official-Package/Webex.deb' uri = 'https://binaries.webex.com/WebexDesktop-Ubuntu-Official-Package/Webex.deb'
@ -164,6 +146,24 @@ module SlackBuilder
commit 'network/jitsi-meet-desktop', version commit 'network/jitsi-meet-desktop', version
end end
end end
class PHP < Updater
def update(version)
package = Package.new 'development/php82',
version: version,
homepage: 'https://www.php.net/',
requires: ['postgresql']
uri = "https://www.php.net/distributions/php-#{version}.tar.xz"
tarball = "slackbuilds/development/php82/php-#{version}.tar.xz"
checksum = SlackBuilder.download URI(uri), tarball
write_info package, downloads: [Download.new(uri, checksum)]
update_slackbuild_version 'development/php82', version
commit 'development/php82', version
end
end
end end
php_transform = proc do |version| php_transform = proc do |version|
@ -177,7 +177,7 @@ end
AUTO_UPDATABLE = { AUTO_UPDATABLE = {
'universal-ctags' => [SlackBuilder::GitHub.new('universal-ctags', 'ctags'), SlackBuilder::UniversalCtags.new], 'universal-ctags' => [SlackBuilder::GitHub.new('universal-ctags', 'ctags'), SlackBuilder::UniversalCtags.new],
'composer' => [SlackBuilder::Packagist.new('composer', 'composer'), SlackBuilder::Composer.new], 'composer' => [SlackBuilder::Packagist.new('composer', 'composer'), SlackBuilder::Composer.new],
'php82' => [SlackBuilder::GitHub.new('php', 'php-src', php_transform)], 'php82' => [SlackBuilder::GitHub.new('php', 'php-src', php_transform), SlackBuilder::PHP.new],
'rdiff-backup' => [SlackBuilder::GitHub.new('rdiff-backup', 'rdiff-backup', rdiff_backup_transform)], 'rdiff-backup' => [SlackBuilder::GitHub.new('rdiff-backup', 'rdiff-backup', rdiff_backup_transform)],
'librsync' => [SlackBuilder::GitHub.new('librsync', 'librsync')], 'librsync' => [SlackBuilder::GitHub.new('librsync', 'librsync')],
'jitsi-meet-desktop' => [ 'jitsi-meet-desktop' => [