Navigation Menu

Skip to content

Commit

Permalink
rpm: support PostgreSQL 10
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 10, 2017
1 parent 50927c8 commit fab6c94
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Rakefile
Expand Up @@ -190,12 +190,17 @@ namespace :package do
"94",
"95",
"96",
"10",
]
namespace :build do
postgresql_package_versions.each do |postgresql_package_version|
rpm_package = "postgresql#{postgresql_package_version}-#{package}"

postgresql_version = postgresql_package_version.scan(/(.)/).join(".")
if postgresql_package_version.start_with?("9")
postgresql_version = postgresql_package_version.scan(/(.)/).join(".")
else
postgresql_version = postgresql_package_version
end
desc "Build RPM packages for PostgreSQL #{postgresql_version}"
task postgresql_package_version => [archive_name, repositories_dir] do
tmp_dir = "#{yum_dir}/tmp"
Expand Down
6 changes: 5 additions & 1 deletion packages/yum/build-rpm.sh
Expand Up @@ -28,7 +28,11 @@ case "${architecture}" in
;;
esac

pgdg_rpm=pgdg-centos${PG_PACKAGE_VERSION}-${PG_VERSION}-3.noarch.rpm
if [ ${PG_PACKAGE_VERSION} -ge 94 ]; then
pgdg_rpm=pgdg-centos${PG_PACKAGE_VERSION}-${PG_VERSION}-3.noarch.rpm
else
pgdg_rpm=pgdg-centos${PG_PACKAGE_VERSION}-${PG_VERSION}-2.noarch.rpm
fi
run wget --no-check-certificate https://yum.postgresql.org/${PG_VERSION}/redhat/rhel-${distribution_version}-${architecture}/${pgdg_rpm}
run rpm -ivh ${pgdg_rpm}
groonga_release_rpm=groonga-release-1.3.0-1.noarch.rpm
Expand Down

0 comments on commit fab6c94

Please sign in to comment.