From 6609a8a6d0e56d642e1c0b91362baafa5b6ac126 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Tue, 10 Oct 2017 11:37:39 +0900 Subject: [PATCH] Prepare for rpm build for PostgreSQL 10 Edited Makefile and SPEC file so that RPM package for PostgreSQL 10 is built. --- Makefile | 10 +++++----- SPECS/{pg_hint_plan96.spec => pg_hint_plan10.spec} | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) rename SPECS/{pg_hint_plan96.spec => pg_hint_plan10.spec} (87%) diff --git a/Makefile b/Makefile index e7cadf8..952f2e1 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,8 @@ PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) -STARBALL96 = pg_hint_plan96-$(HINTPLANVER).tar.gz -STARBALLS = $(STARBALL96) +STARBALL10 = pg_hint_plan10-$(HINTPLANVER).tar.gz +STARBALLS = $(STARBALL10) TARSOURCES = Makefile *.c *.h COPYRIGHT* \ pg_hint_plan--*.sql \ @@ -35,7 +35,7 @@ LDFLAGS+=-Wl,--build-id installcheck: $(REGRESSION_EXPECTED) -rpms: rpm96 +rpms: rpm10 # pg_hint_plan.c includes core.c and make_join_rel.c pg_hint_plan.o: core.c make_join_rel.c # pg_stat_statements.c @@ -50,7 +50,7 @@ $(STARBALLS): $(TARSOURCES) tar -chzf $@ $(addprefix $(subst .tar.gz,,$@)/, $^) rm $(subst .tar.gz,,$@) -rpm96: $(STARBALL96) - MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan96.spec +rpm10: $(STARBALL10) + MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan10.spec diff --git a/SPECS/pg_hint_plan96.spec b/SPECS/pg_hint_plan10.spec similarity index 87% rename from SPECS/pg_hint_plan96.spec rename to SPECS/pg_hint_plan10.spec index 21a10f8..700d2da 100644 --- a/SPECS/pg_hint_plan96.spec +++ b/SPECS/pg_hint_plan10.spec @@ -1,7 +1,7 @@ # SPEC file for pg_store_plans # Copyright(C) 2017 NIPPON TELEGRAPH AND TELEPHONE CORPORATION -%define _pgdir /usr/pgsql-9.6 +%define _pgdir /usr/pgsql-10 %define _bindir %{_pgdir}/bin %define _libdir %{_pgdir}/lib %define _datadir %{_pgdir}/share @@ -12,8 +12,8 @@ %endif ## Set general information for pg_store_plans. -Summary: Optimizer hint on PostgreSQL 9.6 -Name: pg_hint_plan96 +Summary: Optimizer hint on PostgreSQL 10 +Name: pg_hint_plan10 Version: 1.2.0 Release: 1%{?dist} License: BSD @@ -24,8 +24,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION ## We use postgresql-devel package -BuildRequires: postgresql96-devel -Requires: postgresql96-libs +BuildRequires: postgresql10-devel +Requires: postgresql10-libs ## Description for "pg_hint_plan" %description @@ -33,11 +33,11 @@ Requires: postgresql96-libs pg_hint_plan provides capability to tweak execution plans to be executed on PostgreSQL. -Note that this package is available for only PostgreSQL 9.6. +Note that this package is available for only PostgreSQL 10. ## pre work for build pg_hint_plan %prep -PATH=/usr/pgsql-9.6/bin:$PATH +PATH=/usr/pgsql-10/bin:$PATH if [ "${MAKE_ROOT}" != "" ]; then pushd ${MAKE_ROOT} make clean %{name}-%{version}.tar.gz @@ -48,7 +48,7 @@ if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi ## Set variables for build environment %build -PATH=/usr/pgsql-9.6/bin:$PATH +PATH=/usr/pgsql-10/bin:$PATH make USE_PGXS=1 %{?_smp_mflags} ## Set variables for install -- 2.11.0