1 # SPEC file for pg_hint_plan
2 # Copyright(C) 2020 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
4 %define _pgdir /usr/pgsql-9.6
5 %define _bindir %{_pgdir}/bin
6 %define _libdir %{_pgdir}/lib
7 %define _datadir %{_pgdir}/share
9 %if "%(echo ${MAKE_ROOT})" != ""
10 %define _rpmdir %(echo ${MAKE_ROOT})/RPMS
11 %define _sourcedir %(echo ${MAKE_ROOT})
14 ## Set general information for pg_hint_plan.
15 Summary: Optimizer hint on PostgreSQL 9.6
20 Group: Applications/Databases
21 Source0: %{name}-%{version}.tar.gz
22 URL: https://github.com/ossc-db/pg_hint_plan
23 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
24 Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
26 ## We use postgresql-devel package
27 BuildRequires: postgresql96-devel
28 Requires: postgresql96-libs
30 ## Description for "pg_hint_plan"
33 pg_hint_plan provides capability to tweak execution plans to be
34 executed on PostgreSQL.
36 Note that this package is available for only PostgreSQL 9.6.
38 ## pre work for build pg_hint_plan
40 PATH=/usr/pgsql-9.6/bin:$PATH
41 if [ "${MAKE_ROOT}" != "" ]; then
43 make clean %{name}-%{version}.tar.gz
46 if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi
49 ## Set variables for build environment
51 PATH=/usr/pgsql-9.6/bin:$PATH
52 make USE_PGXS=1 %{?_smp_mflags}
54 ## Set variables for install
57 make install DESTDIR=%{buildroot}
63 %defattr(0755,root,root)
64 %{_libdir}/pg_hint_plan.so
65 %defattr(0644,root,root)
66 %{_datadir}/extension/pg_hint_plan--1.2.6.sql
67 %{_datadir}/extension/pg_hint_plan--1.2.5--1.2.6.sql
68 %{_datadir}/extension/pg_hint_plan--1.2.4--1.2.5.sql
69 %{_datadir}/extension/pg_hint_plan--1.2.3--1.2.4.sql
70 %{_datadir}/extension/pg_hint_plan--1.2.2--1.2.3.sql
71 %{_datadir}/extension/pg_hint_plan--1.2.1--1.2.2.sql
72 %{_datadir}/extension/pg_hint_plan--1.2.0--1.2.1.sql
73 %{_datadir}/extension/pg_hint_plan--1.1.3--1.2.0.sql
74 %{_datadir}/extension/pg_hint_plan.control
76 # History of pg_hint_plan.
78 * Thu Feb 21 2020 Kyotaro Horiguchi
79 - Fixed some bugs. Version 1.2.6.
80 * Thu Jan 17 2019 Kyotaro Horiguchi
81 - Fixed some bugs. Version 1.2.5.
82 * Tue Nov 13 2018 Kyotaro Horiguchi
83 - Improvement of debug message emission.
84 * Fri Jun 08 2018 Kyotaro Horiguchi
86 * Thu Jul 27 2017 Kyotaro Horiguchi
88 * Fri May 19 2017 Kyotaro Horiguchi
90 * Tue Feb 7 2017 Kyotaro Horiguchi
91 - Added new hint Parallel. Version 1.2.0.
92 * Thu Jul 21 2016 Kyotaro Horiguchi
93 - Support PostgreSQL 9.6