mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Postgresql 16.4-icu75.1 => 17.4-icu75.1 (#11392)
Co-authored-by: Ed Reel <edreel@gmail.com>
This commit is contained in:
committed by
GitHub
parent
08d7180a71
commit
794ca5010a
@@ -1,22 +1,23 @@
|
||||
require 'package'
|
||||
require 'buildsystems/meson'
|
||||
|
||||
class Postgresql < Package
|
||||
class Postgresql < Meson
|
||||
description 'PostgreSQL is a powerful, open source object-relational database system.'
|
||||
homepage 'https://www.postgresql.org'
|
||||
version "16.4-#{CREW_ICU_VER}"
|
||||
version "17.4-#{CREW_ICU_VER}"
|
||||
license 'PostgreSQL and GPL-2'
|
||||
compatibility 'aarch64 armv7l x86_64'
|
||||
source_url "https://ftp.postgresql.org/pub/source/v#{version.split('-').first}/postgresql-#{version.split('-').first}.tar.bz2"
|
||||
source_sha256 '971766d645aa73e93b9ef4e3be44201b4f45b5477095b049125403f9f3386d6f'
|
||||
source_sha256 'c4605b73fea11963406699f949b966e5d173a7ee0ccaef8938dec0ca8a995fe7'
|
||||
binary_compression 'tar.zst'
|
||||
|
||||
binary_sha256({
|
||||
aarch64: 'dd9f2e0d26ca6e2a67af92d5486216342b86e896d6853f9a528297f52824cdb5',
|
||||
armv7l: 'dd9f2e0d26ca6e2a67af92d5486216342b86e896d6853f9a528297f52824cdb5',
|
||||
x86_64: 'd90d4059bb2a6d1b128e80aeb5ead326d3f2ffa3bcaca00a5a12c8bea80071d0'
|
||||
aarch64: 'df11f2fcacc087b35ed37dab01c8b1035116416a963f59bf6d8b12c6fc13516b',
|
||||
armv7l: 'df11f2fcacc087b35ed37dab01c8b1035116416a963f59bf6d8b12c6fc13516b',
|
||||
x86_64: '4eabbe698a651a0db078b49b0083bd57096da75aae600709fd6bde04c8193c93'
|
||||
})
|
||||
|
||||
depends_on 'brotli' => :build
|
||||
depends_on 'docbook_xml45' => :build
|
||||
depends_on 'expat' => :build
|
||||
depends_on 'gcc_lib' # R
|
||||
depends_on 'glibc' # R
|
||||
@@ -24,9 +25,9 @@ class Postgresql < Package
|
||||
depends_on 'krb5' # R
|
||||
depends_on 'libcyrussasl' => :build
|
||||
depends_on 'libxml2' # R
|
||||
depends_on 'libxslt' # R
|
||||
depends_on 'linux_pam' # R
|
||||
depends_on 'llvm18_dev' => :build
|
||||
depends_on 'llvm18_lib' # R
|
||||
depends_on 'lz4' # R
|
||||
depends_on 'openldap' # R
|
||||
depends_on 'openssl' # R
|
||||
@@ -45,30 +46,12 @@ class Postgresql < Package
|
||||
system "sed -i 's,PGDATA=\"/usr/local/pgsql/data\",PGDATA=\"#{PGDATA}\",' contrib/start-scripts/linux"
|
||||
end
|
||||
|
||||
def self.build
|
||||
system "./configure #{CREW_CONFIGURE_OPTIONS} \
|
||||
--with-gssapi \
|
||||
--with-icu \
|
||||
--with-ldap \
|
||||
--with-libxml \
|
||||
--with-llvm \
|
||||
--with-lz4 \
|
||||
--with-openssl \
|
||||
--with-pam \
|
||||
--with-perl \
|
||||
--with-python \
|
||||
--with-tcl \
|
||||
--with-zstd"
|
||||
system 'make world'
|
||||
end
|
||||
|
||||
def self.install
|
||||
meson_install_extras do
|
||||
# This conditional is needed for installation only.
|
||||
unless Dir.exist? PGDATA
|
||||
FileUtils.mkdir_p PGDATA
|
||||
FileUtils.chmod 0o700, PGDATA
|
||||
end
|
||||
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install-world'
|
||||
|
||||
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/var/log/"
|
||||
FileUtils.touch "#{CREW_DEST_PREFIX}/var/log/pgsql.log"
|
||||
@@ -88,31 +71,20 @@ class Postgresql < Package
|
||||
# This conditional is needed for installation only. If this package is updated in the future,
|
||||
# there is no need to initialize the data directory and display messages again.
|
||||
system "initdb -D #{PGDATA}" unless File.exist? "#{PGDATA}/PG_VERSION"
|
||||
puts
|
||||
puts 'To complete the installation, execute the following:'.lightblue
|
||||
puts 'source ~/.bashrc'.lightblue
|
||||
puts
|
||||
puts 'To start postgres: pg_ctl -l logfile start'.lightblue
|
||||
puts 'To stop postgres: pg_ctl stop'.lightblue
|
||||
puts
|
||||
puts 'Create a database: createdb <dbname>'.lightblue
|
||||
puts 'Connect to database: psql <dbname>'.lightblue
|
||||
puts
|
||||
puts "To configure, edit #{CREW_PREFIX}/etc/env.d/postgres".lightblue
|
||||
ExitMessage.add <<~EOM
|
||||
|
||||
To start postgres: pg_ctl -l logfile start
|
||||
To stop postgres: pg_ctl stop
|
||||
|
||||
Create a database: createdb <dbname>
|
||||
Connect to database: psql <dbname>
|
||||
|
||||
To configure, edit #{CREW_PREFIX}/etc/env.d/postgres
|
||||
EOM
|
||||
end
|
||||
|
||||
def self.postremove
|
||||
if Dir.exist? PGDATA
|
||||
puts 'WARNING: This will delete all databases!'.orange
|
||||
print "Would you like to remove #{PGDATA}? [y/N] "
|
||||
case $stdin.gets.chomp.downcase
|
||||
when 'y', 'yes'
|
||||
FileUtils.rm_rf PGDATA
|
||||
FileUtils.rm_rf "#{CREW_PREFIX}/share/pgsql"
|
||||
puts "#{PGDATA} removed.".lightred
|
||||
else
|
||||
puts "#{PGDATA} saved.".lightgreen
|
||||
end
|
||||
end
|
||||
puts 'WARNING: This will delete all databases!'.orange
|
||||
Package.agree_to_remove(PGDATA)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user