• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revisiona1fd9fb8bb23c30b3b9ed8c07b2658d44923a9c6 (tree)
Time2014-09-05 13:22:09
AuthorKyotaro Horiguchi <horiguchi.kyotaro@lab....>
CommiterKyotaro Horiguchi

Log Message

RPM automation

Change Summary

Incremental Difference

--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@
55 #
66
77 MODULES = pg_hint_plan
8+HINTPLANVER = 1.1.1
89 REGRESS = init base_plan pg_hint_plan ut-init ut-A ut-S ut-J ut-L ut-G ut-R ut-fdw ut-fini
910
1011 REGRESSION_EXPECTED = expected/init.out expected/base_plan.out expected/pg_hint_plan.out expected/ut-A.out expected/ut-S.out expected/ut-J.out expected/ut-L.out expected/ut-G.out
@@ -12,7 +13,7 @@ REGRESSION_EXPECTED = expected/init.out expected/base_plan.out expected/pg_hint_
1213 REGRESS_OPTS = --encoding=UTF8
1314
1415 EXTENSION = pg_hint_plan
15-DATA = pg_hint_plan--1.1.1.sql
16+DATA = pg_hint_plan--1.1.1.sql pg_hint_plan--1.0--1.1.1.sql
1617
1718 EXTRA_CLEAN = sql/ut-fdw.sql expected/ut-fdw.out
1819
@@ -20,7 +21,33 @@ PG_CONFIG = pg_config
2021 PGXS := $(shell $(PG_CONFIG) --pgxs)
2122 include $(PGXS)
2223
24+STARBALL = pg_dbms_stats-$(DBMSSTATSVER).tar.gz
25+STARBALL92 = pg_hint_plan92-$(HINTPLANVER).tar.gz
26+STARBALLS = $(STARBALL) $(STARBALL92)
27+
28+TARSOURCES = Makefile *.c *.h \
29+ pg_hint_plan--*.sql \
30+ pg_hint_plan.control \
31+ doc/* expected/*.out sql/*.sql \
32+ input/*.source output/*.source SPECS/*.spec
33+
2334 installcheck: $(REGRESSION_EXPECTED)
2435
36+rpms: rpm92
37+
2538 # pg_hint_plan.c includes core.c and make_join_rel.c
2639 pg_hint_plan.o: core.c make_join_rel.c pg_stat_statements.c
40+
41+$(STARBALLS): $(TARSOURCES)
42+ if [ -h $(subst .tar.gz,,$@) ]; then rm $(subst .tar.gz,,$@); fi
43+ if [ -e $(subst .tar.gz,,$@) ]; then \
44+ echo "$(subst .tar.gz,,$@) is not a symlink. Stop."; \
45+ exit 1; \
46+ fi
47+ ln -s . $(subst .tar.gz,,$@)
48+ tar -chzf $@ $(addprefix $(subst .tar.gz,,$@)/, $^)
49+ rm $(subst .tar.gz,,$@)
50+
51+rpm92: $(STARBALL92)
52+ MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan92.spec
53+
--- a/SPECS/pg_hint_plan92.spec
+++ b/SPECS/pg_hint_plan92.spec
@@ -5,11 +5,15 @@
55 %define _bindir %{_pgdir}/bin
66 %define _libdir %{_pgdir}/lib
77 %define _datadir %{_pgdir}/share
8+%if "%(echo ${MAKE_ROOT})" != ""
9+ %define _rpmdir %(echo ${MAKE_ROOT})/RPMS
10+ %define _sourcedir %(echo ${MAKE_ROOT})
11+%endif
812
913 ## Set general information for pg_hint_plan.
1014 Summary: Optimizer hint for PostgreSQL 9.2
1115 Name: pg_hint_plan92
12-Version: 1.1.0
16+Version: 1.1.1
1317 Release: 1%{?dist}
1418 License: BSD
1519 Group: Applications/Databases
@@ -36,11 +40,19 @@ Note that this package is available for only PostgreSQL 9.2.
3640
3741 ## pre work for build pg_hint_plan
3842 %prep
43+PATH=/usr/pgsql-9.2/bin:$PATH
44+if [ "${MAKE_ROOT}" != "" ]; then
45+ pushd ${MAKE_ROOT}
46+ make clean %{name}-%{version}.tar.gz
47+ popd
48+fi
49+if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi
3950 %setup -q
4051
4152 ## Set variables for build environment
4253 %build
43-make %{?_smp_mflags}
54+PATH=/usr/pgsql-9.2/bin:$PATH
55+make USE_PGXS=1 %{?_smp_mflags}
4456
4557 ## Set variables for install
4658 %install
@@ -48,7 +60,8 @@ rm -rf %{buildroot}
4860 install -d %{buildroot}%{_libdir}
4961 install pg_hint_plan.so %{buildroot}%{_libdir}/pg_hint_plan.so
5062 install -d %{buildroot}%{_datadir}/extension
51-install -m 644 pg_hint_plan--1.0.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.0.sql
63+install -m 644 pg_hint_plan--1.1.1.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.1.1.sql
64+install -m 644 pg_hint_plan--1.0--1.1.1.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.0--1.1.1.sql
5265 install -m 644 pg_hint_plan.control %{buildroot}%{_datadir}/extension/pg_hint_plan.control
5366
5467 %clean
@@ -58,11 +71,14 @@ rm -rf %{buildroot}
5871 %defattr(0755,root,root)
5972 %{_libdir}/pg_hint_plan.so
6073 %defattr(0644,root,root)
61-%{_datadir}/extension/pg_hint_plan--1.0.sql
74+%{_datadir}/extension/pg_hint_plan--1.1.1.sql
75+%{_datadir}/extension/pg_hint_plan--1.0--1.1.1.sql
6276 %{_datadir}/extension/pg_hint_plan.control
6377
6478 # History of pg_hint_plan.
6579 %changelog
80+* Thu Sep 14 2014 Kyotaro Horiguchi
81+- Bug fix.
6682 * Mon Sep 02 2013 Takashi Suzuki
6783 - Initial cut for 1.1.0
6884 * Mon Sep 24 2012 Shigeru Hanada <shigeru.hanada@gmail.com>
Show on old repository browser