firtst release
Revision | a1fd9fb8bb23c30b3b9ed8c07b2658d44923a9c6 (tree) |
---|---|
Time | 2014-09-05 13:22:09 |
Author | Kyotaro Horiguchi <horiguchi.kyotaro@lab....> |
Commiter | Kyotaro Horiguchi |
RPM automation
@@ -5,6 +5,7 @@ | ||
5 | 5 | # |
6 | 6 | |
7 | 7 | MODULES = pg_hint_plan |
8 | +HINTPLANVER = 1.1.1 | |
8 | 9 | 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 |
9 | 10 | |
10 | 11 | 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_ | ||
12 | 13 | REGRESS_OPTS = --encoding=UTF8 |
13 | 14 | |
14 | 15 | 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 | |
16 | 17 | |
17 | 18 | EXTRA_CLEAN = sql/ut-fdw.sql expected/ut-fdw.out |
18 | 19 |
@@ -20,7 +21,33 @@ PG_CONFIG = pg_config | ||
20 | 21 | PGXS := $(shell $(PG_CONFIG) --pgxs) |
21 | 22 | include $(PGXS) |
22 | 23 | |
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 | + | |
23 | 34 | installcheck: $(REGRESSION_EXPECTED) |
24 | 35 | |
36 | +rpms: rpm92 | |
37 | + | |
25 | 38 | # pg_hint_plan.c includes core.c and make_join_rel.c |
26 | 39 | 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 | + |
@@ -5,11 +5,15 @@ | ||
5 | 5 | %define _bindir %{_pgdir}/bin |
6 | 6 | %define _libdir %{_pgdir}/lib |
7 | 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 | |
8 | 12 | |
9 | 13 | ## Set general information for pg_hint_plan. |
10 | 14 | Summary: Optimizer hint for PostgreSQL 9.2 |
11 | 15 | Name: pg_hint_plan92 |
12 | -Version: 1.1.0 | |
16 | +Version: 1.1.1 | |
13 | 17 | Release: 1%{?dist} |
14 | 18 | License: BSD |
15 | 19 | Group: Applications/Databases |
@@ -36,11 +40,19 @@ Note that this package is available for only PostgreSQL 9.2. | ||
36 | 40 | |
37 | 41 | ## pre work for build pg_hint_plan |
38 | 42 | %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 | |
39 | 50 | %setup -q |
40 | 51 | |
41 | 52 | ## Set variables for build environment |
42 | 53 | %build |
43 | -make %{?_smp_mflags} | |
54 | +PATH=/usr/pgsql-9.2/bin:$PATH | |
55 | +make USE_PGXS=1 %{?_smp_mflags} | |
44 | 56 | |
45 | 57 | ## Set variables for install |
46 | 58 | %install |
@@ -48,7 +60,8 @@ rm -rf %{buildroot} | ||
48 | 60 | install -d %{buildroot}%{_libdir} |
49 | 61 | install pg_hint_plan.so %{buildroot}%{_libdir}/pg_hint_plan.so |
50 | 62 | 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 | |
52 | 65 | install -m 644 pg_hint_plan.control %{buildroot}%{_datadir}/extension/pg_hint_plan.control |
53 | 66 | |
54 | 67 | %clean |
@@ -58,11 +71,14 @@ rm -rf %{buildroot} | ||
58 | 71 | %defattr(0755,root,root) |
59 | 72 | %{_libdir}/pg_hint_plan.so |
60 | 73 | %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 | |
62 | 76 | %{_datadir}/extension/pg_hint_plan.control |
63 | 77 | |
64 | 78 | # History of pg_hint_plan. |
65 | 79 | %changelog |
80 | +* Thu Sep 14 2014 Kyotaro Horiguchi | |
81 | +- Bug fix. | |
66 | 82 | * Mon Sep 02 2013 Takashi Suzuki |
67 | 83 | - Initial cut for 1.1.0 |
68 | 84 | * Mon Sep 24 2012 Shigeru Hanada <shigeru.hanada@gmail.com> |