OSDN Git Service

Changed version to 1.1.7
[pghintplan/pg_hint_plan.git] / SPECS / pg_hint_plan95.spec
1 # SPEC file for pg_store_plans
2 # Copyright(C) 2016-2018 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
3
4 %define _pgdir   /usr/pgsql-9.5
5 %define _bindir  %{_pgdir}/bin
6 %define _libdir  %{_pgdir}/lib
7 %define _datadir %{_pgdir}/share
8 %if "%(echo ${MAKE_ROOT})" != ""
9   %define _rpmdir %(echo ${MAKE_ROOT})/RPMS
10   %define _sourcedir %(echo ${MAKE_ROOT})
11 %endif
12
13 ## Set general information for pg_store_plans.
14 Summary:    Optimizer hint on PostgreSQL 9.5
15 Name:       pg_hint_plan95
16 Version:    1.1.7
17 Release:    1%{?dist}
18 License:    BSD
19 Group:      Applications/Databases
20 Source0:    %{name}-%{version}.tar.gz
21 #URL:        http://example.com/pg_hint_plan/
22 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
23 Vendor:     NIPPON TELEGRAPH AND TELEPHONE CORPORATION
24
25 ## We use postgresql-devel package
26 BuildRequires:  postgresql95-devel
27 Requires:  postgresql95-libs
28
29 ## Description for "pg_hint_plan"
30 %description
31
32 pg_hint_plan provides capability to tweak execution plans to be
33 executed on PostgreSQL.
34
35 Note that this package is available for only PostgreSQL 9.5.
36
37 ## pre work for build pg_hint_plan
38 %prep
39 PATH=/usr/pgsql-9.5/bin:$PATH
40 if [ "${MAKE_ROOT}" != "" ]; then
41   pushd ${MAKE_ROOT}
42   make clean %{name}-%{version}.tar.gz
43   popd
44 fi
45 if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi
46 %setup -q
47
48 ## Set variables for build environment
49 %build
50 PATH=/usr/pgsql-9.5/bin:$PATH
51 make USE_PGXS=1 %{?_smp_mflags}
52
53 ## Set variables for install
54 %install
55 rm -rf %{buildroot}
56 install -d %{buildroot}%{_libdir}
57 install pg_hint_plan.so %{buildroot}%{_libdir}/pg_hint_plan.so
58 install -d %{buildroot}%{_datadir}/extension
59 install -m 644 pg_hint_plan--1.1.7.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.1.7.sql
60 install -m 644 pg_hint_plan--1.1.6--1.1.7.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.1.6--1.1.7.sql
61 install -m 644 pg_hint_plan--1.1.5--1.1.6.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.1.5--1.1.6.sql
62 install -m 644 pg_hint_plan--1.1.4--1.1.5.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.1.4--1.1.5.sql
63 install -m 644 pg_hint_plan--1.1.3--1.1.4.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.1.3--1.1.4.sql
64 install -m 644 pg_hint_plan.control %{buildroot}%{_datadir}/extension/pg_hint_plan.control
65
66 %clean
67 rm -rf %{buildroot}
68
69 %files
70 %defattr(0755,root,root)
71 %{_libdir}/pg_hint_plan.so
72 %defattr(0644,root,root)
73 %{_datadir}/extension/pg_hint_plan--1.1.7.sql
74 %{_datadir}/extension/pg_hint_plan--1.1.6--1.1.7.sql
75 %{_datadir}/extension/pg_hint_plan--1.1.5--1.1.6.sql
76 %{_datadir}/extension/pg_hint_plan--1.1.4--1.1.5.sql
77 %{_datadir}/extension/pg_hint_plan--1.1.3--1.1.4.sql
78 %{_datadir}/extension/pg_hint_plan.control
79
80 # History of pg_hint_plan.
81 %changelog
82 * Tue Nov 13 2018 Kyotaro Horiguchi
83 - Improvement of debug message emission.
84 * Fri Jun 08 2018 Kyotaro Horiguchi
85 - Fixed a crash bug.
86 * Thu Jul 27 2017 Kyotaro Horiguchi
87 - Fixed a crash bug.
88 * Fri May 19 2017 Kyotaro Horiguchi
89 - Fixed a crash bug.
90 * Fri May 13 2016 Kyotaro Horiguchi
91 - Support PostgreSQL 9.5
92
93