コミットメタ情報

リビジョンe7b6a5e4a836382fd482334d68b6bd0f3650ad9b (tree)
日時2017-06-08 11:17:08
作者Kyotaro Horiguchi <horiguchi.kyotaro@lab....>
コミッターKyotaro Horiguchi

ログメッセージ

Prepare RPM package build environment for Pg10

Added a spec file. Edited Makefile so that tar ball contains required
files for Pg10 version of pg_dbms_stats.

変更サマリ

差分

--- a/Makefile
+++ b/Makefile
@@ -63,7 +63,7 @@ endif
6363 REGTESTVER = $(MAJORVERSION)
6464
6565 TARSOURCES = Makefile *.c *.h \
66- $(EXTDIR)/pg_dbms_stats--*-9.*.sql \
66+ $(EXTDIR)/pg_dbms_stats--*.sql \
6767 pg_dbms_stats.control COPYRIGHT ChangeLog ChangeLog.ja \
6868 README.installcheck regress.conf \
6969 doc/* expected/init-*.out expected/ut-*.out \
--- /dev/null
+++ b/SPECS/pg_dbms_stats10.spec
@@ -0,0 +1,81 @@
1+# SPEC file for pg_dbms_stats10
2+# Copyright(C) 2012-2017 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+%define _docdir /usr/share/doc/pgsql
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_dbms_stats.
15+Summary: Plan Stabilizer for PostgreSQL 10
16+Name: pg_dbms_stats10
17+Version: 1.3.7
18+Release: 1%{?dist}
19+License: BSD
20+Group: Applications/Databases
21+Source: %{name}-%{version}.tar.gz
22+URL: http://sourceforge.jp/projects/pgdbmsstats/
23+BuildRoot: %{buildroot}
24+Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
25+
26+## postgresql-devel package required
27+BuildRequires: postgresql10-devel
28+Requires: postgresql10-libs
29+
30+## Description for "pg_dbms_stats"
31+%description
32+pg_dbms_stats disguises database statistics with a prevously taken
33+snapshot so that the planner won't change its behavior even after
34+ANALYZE updates the statistics.
35+
36+pg_dbms_stats also provides following features:
37+ - backup multiple generations of planner statistics to reuse plans afterwards
38+ - import planner statistics from another system for tuning or testing.
39+
40+Note that this package is available for only PostgreSQL 10.
41+
42+## pre work for build pg_dbms_stats
43+%prep
44+PATH=/usr/pgsql-10/bin:$PATH
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-10/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 -m 755 pg_dbms_stats.so %{buildroot}%{_libdir}/pg_dbms_stats.so
58+install -d %{buildroot}%{_datadir}/extension
59+install -m 644 pg_dbms_stats--1.3.7.sql %{buildroot}%{_datadir}/extension/pg_dbms_stats--1.3.7.sql
60+install -m 644 pg_dbms_stats.control %{buildroot}%{_datadir}/extension/pg_dbms_stats.control
61+install -d %{buildroot}%{_docdir}/extension
62+install -m 644 doc/export_effective_stats-10.sql.sample %{buildroot}%{_docdir}/extension/export_effective_stats-10.sql.sample
63+install -m 644 doc/export_plain_stats-10.sql.sample %{buildroot}%{_docdir}/extension/export_plain_stats-10.sql.sample
64+
65+%clean
66+rm -rf %{buildroot}
67+
68+%files
69+%defattr(0755,root,root)
70+%{_libdir}/pg_dbms_stats.so
71+%defattr(0644,root,root)
72+%{_datadir}/extension/pg_dbms_stats--1.3.7.sql
73+%{_datadir}/extension/pg_dbms_stats.control
74+%{_docdir}/extension/export_effective_stats-10.sql.sample
75+%{_docdir}/extension/export_plain_stats-10.sql.sample
76+
77+# History of pg_dbms_stats.
78+%changelog
79+* Thu Jun 08 2017 Kyotaro Horiguchi
80+- pg_dbms_stats10 v1.3.7 release
81+
旧リポジトリブラウザで表示