OSDN Git Service

59ea9b952431fac1e100478d712de138150ce2a0
[pghintplan/pg_hint_plan.git] / SPECS / pg_hint_plan96.spec
1 # SPEC file for pg_store_plans
2 # Copyright(C) 2018 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
3
4 %define _pgdir   /usr/pgsql-9.6
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_store_plans.
15 Summary:    Optimizer hint on PostgreSQL 9.6
16 Name:       pg_hint_plan96
17 Version:    1.2.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:  postgresql96-devel
28 Requires:  postgresql96-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 9.6.
37
38 ## pre work for build pg_hint_plan
39 %prep
40 PATH=/usr/pgsql-9.6/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-9.6/bin:$PATH
52 make USE_PGXS=1 %{?_smp_mflags}
53
54 ## Set variables for install
55 %install
56 rm -rf %{buildroot}
57 install -d %{buildroot}%{_libdir}
58 install pg_hint_plan.so %{buildroot}%{_libdir}/pg_hint_plan.so
59 install -d %{buildroot}%{_datadir}/extension
60 install -m 644 pg_hint_plan--1.2.3.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.2.3.sql
61 install -m 644 pg_hint_plan--1.2.2--1.2.3.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.2.2--1.2.3.sql
62 install -m 644 pg_hint_plan--1.2.1--1.2.2.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.2.1--1.2.2.sql
63 install -m 644 pg_hint_plan--1.2.0--1.2.1.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.2.0--1.2.1.sql
64 install -m 644 pg_hint_plan--1.1.3--1.2.0.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.1.3--1.2.0.sql
65 install -m 644 pg_hint_plan.control %{buildroot}%{_datadir}/extension/pg_hint_plan.control
66
67 %clean
68 rm -rf %{buildroot}
69
70 %files
71 %defattr(0755,root,root)
72 %{_libdir}/pg_hint_plan.so
73 %defattr(0644,root,root)
74 %{_datadir}/extension/pg_hint_plan--1.2.3.sql
75 %{_datadir}/extension/pg_hint_plan--1.2.2--1.2.3.sql
76 %{_datadir}/extension/pg_hint_plan--1.2.1--1.2.2.sql
77 %{_datadir}/extension/pg_hint_plan--1.2.0--1.2.1.sql
78 %{_datadir}/extension/pg_hint_plan--1.1.3--1.2.0.sql
79 %{_datadir}/extension/pg_hint_plan.control
80
81 # History of pg_hint_plan.
82 %changelog
83 * Fri Jun 08 2018 Kyotaro Horiguchi
84 - Fixed a crash bug.
85 * Thu Jul 27 2017 Kyotaro Horiguchi
86 - Fixed a crash bug.
87 * Fri May 19 2017 Kyotaro Horiguchi
88 - Fixed a crash bug.
89 * Tue Feb 7 2017 Kyotaro Horiguchi
90 - Added new hint Parallel. Version 1.2.0.
91 * Thu Jul 21 2016 Kyotaro Horiguchi
92 - Support PostgreSQL 9.6