forked from ssinger/slony1-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslony1.spec.in
218 lines (173 loc) · 8.17 KB
/
slony1.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
%{!?perltools:%define perltools 1}
%{!?docs:%define docs 0}
%{?buildrhel3:%define kerbdir /usr/kerberos}
%{!?kerbdir:%define kerbdir "/usr"}
%define pg_version %(rpm -qv postgresql-devel|head -n 1|awk -F '-' '{print $3}')
Summary: A "master to multiple slaves" replication system with cascading and failover
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 1_PG%{pg_version}
License: BSD
Group: Applications/Databases
URL: http://main.slony.info/
Source0: @PACKAGE_NAME@-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: postgresql-devel
Requires: postgresql-server = %{pg_version}
%if %docs
BuildRequires: docbook-style-dsssl
%endif
%define prefix /usr
%description
Slony-I is a "master to multiple slaves" replication
system for PostgreSQL with cascading and failover.
The big picture for the development of Slony-I is to build
a master-slave system that includes all features and
capabilities needed to replicate large databases to a
reasonably limited number of slave systems.
Slony-I is a system for data centers and backup
sites, where the normal mode of operation is that all nodes
are available
%if %docs
%package docs
Summary: Documentation for Slony-I
Group: Applications/Databases
Prereq: @PACKAGE_NAME@-@PACKAGE_VERSION@-%{release}
%description docs
The @PACKAGE_NAME@-docs package includes some documentation for Slony-I.
%endif
%prep
%setup -q -n @PACKAGE_NAME@-%{version}
%build
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
CPPFLAGS="${CPPFLAGS} -I%{_includedir}/et -I%{kerbdir}/include" ; export CPPFLAGS
CFLAGS="${CFLAGS} -I%{_includedir}/et -I%{kerbdir}/include" ; export CFLAGS
# Strip out -ffast-math from CFLAGS....
CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
export LIBNAME=%{_lib}
./configure --includedir %{_includedir}/pgsql --with-pgconfigdir=%{_bindir} \
%if %perltools
--with-perltools=%{_bindir} --with-toolsbin=%{_bindir} \
%endif
%if %docs
--with-docs --with-docdir=%{_docdir}/%{name}-%{version} \
%endif
--datadir %{_datadir}/pgsql --sysconfdir=%{_sysconfdir} --with-pglibdir=%{_libdir}/pgsql
autoconf
make %{?_smp_mflags}
%if %perltools
make %{?_smp_mflags} -C tools
%endif
%install
rm -rf %{buildroot}
install -d %{buildroot}%{_sysconfdir}
install -d %{buildroot}%{_sysconfdir}/init.d/
install -d %{buildroot}%{_datadir}/pgsql/
install -d %{buildroot}%{_libdir}/pgsql/
make %{?_smp_mflags} DESTDIR=%{buildroot} install
install -m 0755 src/backend/slony1_funcs.%{version}.so %{buildroot}%{_libdir}/pgsql/slony1_funcs.%{version}.so
install -m 0644 src/backend/slony1_base.sql %{buildroot}%{_datadir}/pgsql/slony1_base.%{version}.sql
install -m 0644 src/backend/slony1_base.v83.sql %{buildroot}%{_datadir}/pgsql/slony1_base.v83.%{version}.sql
install -m 0644 src/backend/slony1_base.v84.sql %{buildroot}%{_datadir}/pgsql/slony1_base.v84.%{version}.sql
install -m 0644 src/backend/slony1_funcs.sql %{buildroot}%{_datadir}/pgsql/slony1_funcs.%{version}.sql
install -m 0644 src/backend/slony1_funcs.v83.sql %{buildroot}%{_datadir}/pgsql/slony1_funcs.v83.%{version}.sql
install -m 0644 src/backend/slony1_funcs.v84.sql %{buildroot}%{_datadir}/pgsql/slony1_funcs.v84.%{version}.sql
install -m 0755 tools/*.sh %{buildroot}%{_bindir}/
install -m 0644 share/slon.conf-sample %{buildroot}%{_sysconfdir}/slon.conf
install -m 0755 redhat/slon.init %{buildroot}%{_sysconfdir}/init.d/slon
%if %perltools
cd tools
make %{?_smp_mflags} DESTDIR=%{buildroot} install
/bin/rm -rf altperl/*.pl altperl/ToDo altperl/README altperl/Makefile altperl/CVS
install -m 0644 altperl/slon_tools.conf-sample %{buildroot}%{_sysconfdir}/slon_tools.conf
install -m 0755 altperl/* %{buildroot}%{_bindir}/
install -m 0644 altperl/slon-tools %{buildroot}%{_libdir}/pgsql/slon-tools.pm
/bin/rm -f %{buildroot}%{_sysconfdir}/slon_tools.conf-sample
/bin/rm -f %{buildroot}%{_bindir}/slon_tools.conf-sample
#/bin/rm -f %{buildroot}%{_libdir}/pgsql/slon-tools.pm
/bin/rm -f %{buildroot}%{_bindir}/slon-tools.pm
/bin/rm -f %{buildroot}%{_bindir}/slon-tools
/bin/rm -f %{buildroot}%{_bindir}/pgsql/slon-tools
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYRIGHT UPGRADING INSTALL SAMPLE RELEASE
%{_bindir}/*
%{_libdir}/pgsql/slony1_funcs.%{version}.so
%{_datadir}/pgsql/*.sql
%config(noreplace) %{_sysconfdir}/slon.conf
%{_sysconfdir}/init.d/slon
%if %perltools
%{_libdir}/pgsql/slon-tools.pm
%config(noreplace) %{_sysconfdir}/slon_tools.conf
%endif
%if %docs
%files docs
%defattr(-,root,root,-)
%doc doc/adminguide doc/concept doc/implementation doc/support
%endif
%changelog
* Thu May 17 2007 Devrim Gunduz <[email protected]>
- Fix rpm build problem when the system has pg_config in both under
/usr/local/pgsql/bin and /usr/bin
* Wed Mar 22 2007 Christopher Browne <[email protected]>
- Added more recent release notes
* Wed Mar 7 2007 Christopher Browne <[email protected]>
- Added more recent release notes
* Thu Jan 4 2007 Devrim Gunduz <[email protected]>
- Add docs package (It should be added before but...)
* Wed Nov 8 2006 Devrim Gunduz <[email protected]>
- On 64-bit boxes, both 32 and 64 bit -devel packages may be installed.
Fix version check script
- Revert tar name patch
- Macros cannot be used in various parts of the spec file. Revert that commit
- Spec file cleanup
* Tue Oct 31 2006 Trevor Astrope <[email protected]>
- Fixup tar name and install slon-tools as slon-tools.pm
* Mon Jul 17 2006 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Updated spec and cleaned up rpmlint errors and warnings
* Wed Dec 21 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Added a buildrhel3 macro to fix RHEL 3 RPM builds
- Added a kerbdir macro
* Wed Dec 14 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Fixed the spec file so that during upgrade, conf files will not be replaced, and a .rpmnew will be created.
* Thu Nov 24 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Created bindir
* Wed Oct 26 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Modify CPPFLAGS and CFLAGS to fix builds on RHEL -- Per Philip Yarra
* Tue Oct 18 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Created a new package : -docs and moved all the docs there.
* Tue Oct 18 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Fixed the problem in http://gborg.postgresql.org/pipermail/slony1-general/2005-October/003105.html
* Sat Oct 01 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Upgrade to 1.1.1
* Tue Jul 12 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Added a line to check postgresql RPM version and tag SlonyI RPM with it.
- Updated Requires files so that it checks correct PostgreSQL version
- Moved autoconf line into correct place.
* Thu Jun 08 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Added UPGRADING, HISTORY-1.1, INSTALL, SAMPLE among installed files, reflecting the change in GNUMakefile.in
* Thu Jun 02 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Apply a new %docs macro and disable building of docs by default.
- Remove slon-tools.conf-sample from bindir.
- Removed --bindir and --libdir, since they are not needed.
* Mon Apr 10 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- More fixes on RPM builds
* Thu Apr 07 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- More fixes on RPM builds
* Tue Apr 04 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Fix RPM build errors, regarding to tools/ .
* Thu Apr 02 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Added docs to installed files list.
- Added perltools, so that tools/altperl may be compiled.
- Updated the spec file
* Thu Mar 17 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Update to 1.1.0beta1
- Remove PostgreSQL source dependency
* Thu Mar 17 2005 Devrim Gunduz <[email protected]> postgresql-slony1-engine
- Fix RPM builds
* Thu Mar 18 2004 Daniel Berrange <[email protected]> postgresql-slony1-engine
- Initial RPM packaging