1 # SPEC file for pg_store_plans
2 # Copyright(C) 2020 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
4 %define _pgdir /usr/pgsql-14
5 %define _bindir %{_pgdir}/bin
6 %define _libdir %{_pgdir}/lib
7 %define _datadir %{_pgdir}/share
8 %define _bcdir %{_libdir}/bitcode
9 %define _mybcdir %{_bcdir}/pg_hint_plan
11 %if "%(echo ${MAKE_ROOT})" != ""
12 %define _rpmdir %(echo ${MAKE_ROOT})/RPMS
13 %define _sourcedir %(echo ${MAKE_ROOT})
16 ## Set general information for pg_store_plans.
17 Summary: Optimizer hint on PostgreSQL 12
22 Group: Applications/Databases
23 Source0: %{name}-%{version}.tar.gz
24 URL: https://github.com/ossc-db/pg_hint_plan
25 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
26 Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
28 ## We use postgresql-devel package
29 BuildRequires: postgresql14-devel
30 Requires: postgresql14-server
32 ## Description for "pg_hint_plan"
35 pg_hint_plan provides capability to tweak execution plans to be
36 executed on PostgreSQL.
38 Note that this package is available for only PostgreSQL 14.
41 Requires: postgresql14-server, postgresql14-llvmjit
42 Requires: pg_hint_plan14 = 1.4
43 Summary: Just-in-time compilation support for pg_hint_plan14
46 Just-in-time compilation support for pg_hint_plan14
48 ## pre work for build pg_hint_plan
50 PATH=/usr/pgsql-14/bin:$PATH
51 if [ "${MAKE_ROOT}" != "" ]; then
53 make clean %{name}-%{version}.tar.gz
56 if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi
59 ## Set variables for build environment
61 PATH=/usr/pgsql-14/bin:$PATH
62 make USE_PGXS=1 %{?_smp_mflags}
64 ## Set variables for install
67 make install DESTDIR=%{buildroot}
73 %defattr(0755,root,root)
74 %{_libdir}/pg_hint_plan.so
75 %defattr(0644,root,root)
76 %{_datadir}/extension/pg_hint_plan--1.4.sql
77 %{_datadir}/extension/pg_hint_plan.control
80 %defattr(0755,root,root)
82 %defattr(0644,root,root)
83 %{_bcdir}/pg_hint_plan.index.bc
84 %{_mybcdir}/pg_hint_plan.bc
86 # History of pg_hint_plan.
88 * Tue Oct 05 2021 Kyotaro Horiguchi
89 - Support PostgreSQL 14.