Kouhei Sutou
null+****@clear*****
Sun Mar 29 13:14:51 JST 2015
Kouhei Sutou 2015-03-29 13:14:51 +0900 (Sun, 29 Mar 2015) New Revision: 05a7f8d63878a333598136bacbe29125bbd4d8e1 https://github.com/pgroonga/pgroonga/commit/05a7f8d63878a333598136bacbe29125bbd4d8e1 Message: yum: use the official PostgreSQL package CentOS 5 and 6 are supported. PostgreSQL 9.2 support is dropped. Modified files: Rakefile packages/yum/Vagrantfile packages/yum/build-rpm.sh Renamed files: packages/yum/postgresql94-pgroonga.spec.in (from packages/yum/postgresql-pgroonga.spec.in) Modified: Rakefile (+15 -8) =================================================================== --- Rakefile 2015-03-29 12:51:02 +0900 (dcca4a2) +++ Rakefile 2015-03-29 13:14:51 +0900 (03d247d) @@ -78,7 +78,7 @@ namespace :package do namespace :yum do distribution = "centos" - rpm_package = "postgresql-#{package}" + rpm_package = "postgresql94-#{package}" rsync_path = rsync_base_path yum_dir = "#{packages_dir}/yum" repositories_dir = "#{yum_dir}/repositories" @@ -97,7 +97,7 @@ gcc make pkg-config groonga-devel -postgresql-devel +postgresql94-devel " ENV end @@ -134,11 +134,18 @@ postgresql-devel cd(yum_dir) do sh("vagrant", "destroy", "--force") - distribution_version = "7" - distribution_architecture = "x86_64" - id = "#{distribution}-#{distribution_version}-#{distribution_architecture}" - sh("vagrant", "up", id) - sh("vagrant", "destroy", "--force", id) + distribution_versions = { + "5" => ["i386", "x86_64"], + "6" => ["i386", "x86_64"], + "7" => ["x86_64"], + } + distribution_versions.each do |ver, archs| + archs.each do |arch| + id = "#{distribution}-#{ver}-#{arch}" + sh("vagrant", "up", id) + sh("vagrant", "destroy", "--force", id) + end + end end end @@ -198,7 +205,7 @@ postgresql-devel env_value("NEW_RELEASE_DATE"), "README.md", "packages/debian/changelog", - "packages/yum/postgresql-pgroonga.spec.in") + "packages/yum/postgresql94-pgroonga.spec.in") end end end Modified: packages/yum/Vagrantfile (+16 -0) =================================================================== --- packages/yum/Vagrantfile 2015-03-29 12:51:02 +0900 (fc2cbf5) +++ packages/yum/Vagrantfile 2015-03-29 13:14:51 +0900 (87866a3) @@ -7,6 +7,22 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vms = [ { + :id => "centos-5-i386", + :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-5.11-i386_chef-provisionerless.box", + }, + { + :id => "centos-5-x86_64", + :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-5.11_chef-provisionerless.box", + }, + { + :id => "centos-6-i386", + :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.6-i386_chef-provisionerless.box", + }, + { + :id => "centos-6-x86_64", + :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.6_chef-provisionerless.box", + }, + { :id => "centos-7-x86_64", :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.0_chef-provisionerless.box", }, Modified: packages/yum/build-rpm.sh (+1 -0) =================================================================== --- packages/yum/build-rpm.sh 2015-03-29 12:51:02 +0900 (68c6b98) +++ packages/yum/build-rpm.sh 2015-03-29 13:14:51 +0900 (3946a39) @@ -28,6 +28,7 @@ case "${architecture}" in ;; esac +run rpm -ivh http://yum.postgresql.org/9.4/redhat/rhel-${distribution_version}-${architecture}/pgdg-centos94-9.4-1.noarch.rpm run rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm run yum makecache Renamed: packages/yum/postgresql94-pgroonga.spec.in (+14 -6) 66% =================================================================== --- packages/yum/postgresql-pgroonga.spec.in 2015-03-29 12:51:02 +0900 (c605994) +++ packages/yum/postgresql94-pgroonga.spec.in 2015-03-29 13:14:51 +0900 (c44fb31) @@ -1,5 +1,12 @@ # -*- rpm -*- +%define pg_version 9.4 +%define pg_package_version 94 +%define pg_prefix /usr/pgsql-%{pg_version} +%define pg_bindir %{pg_prefix}/bin +%define pg_libdir %{pg_prefix}/lib +%define pg_datadir %{pg_prefix}/share + Name: @PACKAGE@ Version: @VERSION@ Release: 1%{?dist} @@ -12,9 +19,9 @@ Source0: http://packages.groonga.org/source/pgroonga/pgroonga-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) BuildRequires: groonga-devel -BuildRequires: postgresql-devel +BuildRequires: postgresql%{pg_package_version}-devel Requires: groonga-libs -Requires: postgresql-server +Requires: postgresql%{pg_package_version}-server %description This package provides a fast full-text search plugin for PostgreSQL. @@ -25,16 +32,17 @@ It is based on Groonga. %build -make %{?_smp_mflags} +PATH="%{pg_bindir}:$PATH" \ + make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" %files %doc README.md news.md COPYING -%{_libdir}/pgsql/*.so -%{_datadir}/pgsql/extension/*.control -%{_datadir}/pgsql/extension/*.sql +%{pg_libdir}/*.so +%{pg_datadir}/extension/*.control +%{pg_datadir}/extension/*.sql %changelog * Sun Mar 29 2015 Kouhei Sutou <kou �� clear-code.com> - 0.4.0-1 -------------- next part -------------- HTML����������������������������... Download