1 # SPEC file for pg_store_plans
2 # Copyright(C) 2018 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
4 %define _pgdir /usr/pgsql-11
5 %define _bindir %{_pgdir}/bin
6 %define _libdir %{_pgdir}/lib
7 %define _datadir %{_pgdir}/share
8 %define _bcdir %{_libdir}/bitcode/pg_hint_plan
10 %if "%(echo ${MAKE_ROOT})" != ""
11 %define _rpmdir %(echo ${MAKE_ROOT})/RPMS
12 %define _sourcedir %(echo ${MAKE_ROOT})
15 ## Set general information for pg_store_plans.
16 Summary: Optimizer hint on PostgreSQL 11
21 Group: Applications/Databases
22 Source0: %{name}-%{version}.tar.gz
23 URL: https://github.com/ossc-db/pg_hint_plan
24 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
25 Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
27 ## We use postgresql-devel package
28 BuildRequires: postgresql11-devel
29 Requires: postgresql11-server
31 ## Description for "pg_hint_plan"
34 pg_hint_plan provides capability to tweak execution plans to be
35 executed on PostgreSQL.
37 Note that this package is available for only PostgreSQL 11.
40 Requires: postgresql11-server, postgresql11-llvmjit
41 Requires: pg_hint_plan11 = 1.3.1
42 Summary: Just-in-time compilation support for pg_hint_plan11
45 Just-in-time compilation support for pg_hint_plan11
47 ## pre work for build pg_hint_plan
49 PATH=/usr/pgsql-11/bin:$PATH
50 if [ "${MAKE_ROOT}" != "" ]; then
52 make clean %{name}-%{version}.tar.gz
55 if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi
58 ## Set variables for build environment
60 PATH=/usr/pgsql-11/bin:$PATH
61 make USE_PGXS=1 %{?_smp_mflags}
63 ## Set variables for install
66 install -d %{buildroot}%{_libdir}
67 install pg_hint_plan.so %{buildroot}%{_libdir}/pg_hint_plan.so
68 install -d %{buildroot}%{_datadir}/extension
69 install -m 644 pg_hint_plan--1.3.2.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.3.2.sql
70 install -m 644 pg_hint_plan.control %{buildroot}%{_datadir}/extension/pg_hint_plan.control
71 install -d %{buildroot}%{_bcdir}
72 install -m 644 pg_hint_plan.bc %{buildroot}%{_bcdir}/pg_hint_plan.bc
78 %defattr(0755,root,root)
79 %{_libdir}/pg_hint_plan.so
80 %defattr(0644,root,root)
81 %{_datadir}/extension/pg_hint_plan--1.3.2.sql
82 %{_datadir}/extension/pg_hint_plan.control
85 %defattr(0755,root,root)
87 %defattr(0644,root,root)
88 %{_bcdir}/pg_hint_plan.bc
90 # History of pg_hint_plan.
92 * Tue Nov 13 2018 Kyotaro Horiguchi
93 - Support PostgreSQL 11. Version 1.3.2.
94 * Tue Jun 08 2018 Kyotaro Horiguchi
95 - Fixed a crash bug. Version 1.3.1.
96 * Tue Oct 10 2017 Kyotaro Horiguchi
97 - Support PostgreSQL 10. Version 1.3.0.
98 * Tue Feb 7 2017 Kyotaro Horiguchi
99 - Added new hint Parallel. Version 1.2.0.
100 * Thu Jul 21 2016 Kyotaro Horiguchi
101 - Support PostgreSQL 9.6