OSDN Git Service

Correctly handle planner nesting
[pghintplan/pg_hint_plan.git] / SPECS / pg_hint_plan10.spec
1 # SPEC file for pg_hint_plan
2 # Copyright(C) 2019 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
3
4 %define _pgdir   /usr/pgsql-10
5 %define _bindir  %{_pgdir}/bin
6 %define _libdir  %{_pgdir}/lib
7 %define _datadir %{_pgdir}/share
8
9 %if "%(echo ${MAKE_ROOT})" != ""
10   %define _rpmdir %(echo ${MAKE_ROOT})/RPMS
11   %define _sourcedir %(echo ${MAKE_ROOT})
12 %endif
13
14 ## Set general information for pg_hint_plan.
15 Summary:    Optimizer hint on PostgreSQL 10
16 Name:       pg_hint_plan10
17 Version:    1.3.3
18 Release:    1%{?dist}
19 License:    BSD
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
25
26 ## We use postgresql-devel package
27 BuildRequires:  postgresql10-devel
28 Requires:  postgresql10-libs
29
30 ## Description for "pg_hint_plan"
31 %description
32
33 pg_hint_plan provides capability to tweak execution plans to be
34 executed on PostgreSQL.
35
36 Note that this package is available for only PostgreSQL 10.
37
38 ## pre work for build pg_hint_plan
39 %prep
40 PATH=/usr/pgsql-10/bin:$PATH
41 if [ "${MAKE_ROOT}" != "" ]; then
42   pushd ${MAKE_ROOT}
43   make clean %{name}-%{version}.tar.gz
44   popd
45 fi
46 if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi
47 %setup -q
48
49 ## Set variables for build environment
50 %build
51 PATH=/usr/pgsql-10/bin:$PATH
52 make USE_PGXS=1 %{?_smp_mflags}
53
54 ## Set variables for install
55 %install
56 rm -rf %{buildroot}
57 make install DESTDIR=%{buildroot}
58
59 %clean
60 rm -rf %{buildroot}
61
62 %files
63 %defattr(0755,root,root)
64 %{_libdir}/pg_hint_plan.so
65 %defattr(0644,root,root)
66 %{_datadir}/extension/pg_hint_plan--1.3.0--1.3.1.sql
67 %{_datadir}/extension/pg_hint_plan--1.3.1--1.3.2.sql
68 %{_datadir}/extension/pg_hint_plan--1.3.2--1.3.3.sql
69 %{_datadir}/extension/pg_hint_plan--1.3.3.sql
70 %{_datadir}/extension/pg_hint_plan.control
71
72 # History of pg_hint_plan.
73 %changelog
74 * Thu Jan 17 2019 Kyotaro Horiguchi
75 - Fix some bugs. Version 1.3.3.
76 * Tue Nov 13 2018 Kyotaro Horiguchi
77 - Version 1.3.2.
78 * Tue Jun 08 2018 Kyotaro Horiguchi
79 - Fixed a crash bug.
80 * Tue Oct 10 2017 Kyotaro Horiguchi
81 - Support PostgreSQL 10. Version 1.3.0.
82 * Tue Feb 7 2017 Kyotaro Horiguchi
83 - Added new hint Parallel. Version 1.2.0.
84 * Thu Jul 21 2016 Kyotaro Horiguchi
85 - Support PostgreSQL 9.6