]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha | |
3 | # - check if it's fixed now (RISC_ALIGNMENT is defined) | |
4 | # - create classic server/super server subpackages and drop bcond | |
5 | # (see firebird2 on debian how to do it) | |
6 | # - logrotate script | |
7 | # | |
8 | # Conditional build: | |
9 | %bcond_with ss # Super Server (standalone daemon instead of inetd service) | |
10 | # | |
11 | Summary: Firebird SQL Database Server and Client tools | |
12 | Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems | |
13 | Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie | |
14 | Name: Firebird | |
15 | # FirebirdCS/FirebirdSS (Classic Server/Super Server)? | |
16 | Version: 2.1.3.18185 | |
17 | Release: 2 | |
18 | License: Interbase Public License 1.0, Initial Developer's Public License 1.0 | |
19 | Group: Applications/Databases | |
20 | Source0: http://downloads.sourceforge.net/firebird/%{name}-%{version}-0.tar.bz2 | |
21 | # Source0-md5: ec42bd5c85dc2f65baef185228bcc5ca | |
22 | Source1: http://www.firebirdsql.org/pdfmanual/%{name}-2.1-QuickStart.pdf | |
23 | # Source1-md5: 46bb1af4b94e8c8acee1d6ef2055b2d3 | |
24 | # distfiles refuses this, would require some audit to allow '('/')' chars | |
25 | #Source2: http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf | |
26 | ## Source2-md5: 9eb90583c200bdd7292a80ecc1df1178 | |
27 | Source3: http://www.firebirdsql.org/pdfmanual/%{name}-Null-Guide.pdf | |
28 | # Source3-md5: d1f8ba75fe3bb9eb9d203ce3f82a1a1a | |
29 | Source4: http://www.firebirdsql.org/pdfmanual/%{name}-Generator-Guide.pdf | |
30 | # Source4-md5: 44e7568ef477072a8ad5f381c3e12a75 | |
31 | Source5: http://www.firebirdsql.org/pdfmanual/MSSQL-to-%{name}.pdf | |
32 | # Source5-md5: 1bd4a168e550910fc899e2aa125d83a3 | |
33 | Source6: http://www.firebirdsql.org/pdfmanual/%{name}-nbackup.pdf | |
34 | # Source6-md5: 7ef8a8b9a899d06bec2a5da0bb5fea0e | |
35 | Source7: http://www.firebirdsql.org/pdfmanual/%{name}-Utils-WIP.pdf | |
36 | # Source7-md5: 39b9a4f3c9d9e27d985e9277ae163ceb | |
37 | Source8: http://www.firebirdnews.org/docs/fb2min.pdf | |
38 | # Source8-md5: ebac312c0afbe97b1850bdc74c553c28 | |
39 | Source9: http://www.firebirdsql.org/doc/contrib/fb_2_1_errorcodes.pdf | |
40 | # Source9-md5: 9ab392dc349657dbcf9a9c35acd8e8db | |
41 | Source100: firebird.init | |
42 | Source101: firebird.sysconfig | |
43 | Source102: firebird.inetd | |
44 | Patch0: %{name}-chmod.patch | |
45 | Patch1: %{name}-editline.patch | |
46 | Patch2: %{name}-va.patch | |
47 | Patch3: %{name}-morearchs.patch | |
48 | Patch4: %{name}-FHS.patch | |
49 | Patch5: %{name}-64bit.patch | |
50 | Patch6: %{name}-gcc-icu.patch | |
51 | URL: http://www.firebirdsql.org/ | |
52 | BuildRequires: autoconf >= 2.56 | |
53 | BuildRequires: automake | |
54 | BuildRequires: bison | |
55 | BuildRequires: libedit-devel | |
56 | BuildRequires: libicu-devel | |
57 | BuildRequires: libstdc++-devel | |
58 | BuildRequires: libtool | |
59 | BuildRequires: psmisc >= 22.5-2 | |
60 | BuildRequires: rpmbuild(macros) >= 1.268 | |
61 | BuildRequires: sed >= 4.0 | |
62 | Requires: %{name}-dirs = %{version}-%{release} | |
63 | Requires: %{name}-lib = %{version}-%{release} | |
64 | %if %{with ss} | |
65 | Requires(post,preun): /sbin/chkconfig | |
66 | Requires: rc-scripts | |
67 | %endif | |
68 | # official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64 | |
69 | # alpha is added in morearchs patch | |
70 | # see morearchs patch if you want more | |
71 | ExclusiveArch: %{ix86} %{x8664} arm ia64 mips mipsel ppc sparc sparcv9 alpha | |
72 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
73 | ||
74 | %define ibdir %{_libdir}/interbase | |
75 | %define specflags -fno-strict-aliasing | |
76 | %define debugcflags -O1 -g -Wall -fno-strict-aliasing | |
77 | ||
78 | %description | |
79 | Firebird is a powerful, high-performance relational database designed | |
80 | to be embedded into applications on multiple platforms. | |
81 | ||
82 | %description -l pl.UTF-8 | |
83 | Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz | |
84 | danych zaprojektowanym do osadzania w aplikacjach na wielu | |
85 | platformach. | |
86 | ||
87 | %description -l de.UTF-8 | |
88 | Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von | |
89 | Borland vertriebenen relationalen Datenbankmanagementsystemes | |
90 | InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe | |
91 | der Version 6 des kommerziellen Vorgängers Interbase bei Borland | |
92 | ernsthafte Überlegungen im Gange waren, die Weiterentwicklung | |
93 | einzustellen. | |
94 | ||
95 | Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine | |
96 | Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann. | |
97 | Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass | |
98 | auch Datenbankdateien über 2GB erzeugt werden können. | |
99 | ||
100 | %package dirs | |
101 | Summary: Firebird SQL Database common directories | |
102 | Summary(pl.UTF-8): Firebird - wspólne katalogi | |
103 | Group: Applications/Databases | |
104 | ||
105 | %description dirs | |
106 | Firebird SQL Database common directories. | |
107 | ||
108 | %description dirs -l pl.UTF-8 | |
109 | Firebird - wspólne katalogi. | |
110 | ||
111 | %package lib | |
112 | Summary: Firebird shared library | |
113 | Summary(pl.UTF-8): Biblioteka współdzielona Firebird | |
114 | Group: Libraries | |
115 | ||
116 | %description lib | |
117 | Firebird shared library (libgds). | |
118 | ||
119 | %description lib -l pl.UTF-8 | |
120 | Biblioteka współdzielona Firebird (libgds). | |
121 | ||
122 | %package devel | |
123 | Summary: Header files for Firebird library | |
124 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird | |
125 | Group: Development/Libraries | |
126 | Requires: %{name}-dirs = %{version}-%{release} | |
127 | Requires: %{name}-lib = %{version}-%{release} | |
128 | Requires: libstdc++-devel | |
129 | ||
130 | %description devel | |
131 | Header files for Firebird library. | |
132 | ||
133 | %description devel -l pl.UTF-8 | |
134 | Pliki nagłówkowe biblioteki Firebird. | |
135 | ||
136 | %package static | |
137 | Summary: Static Firebird library | |
138 | Summary(pl.UTF-8): Statyczna biblioteka Firebird | |
139 | Group: Development/Libraries | |
140 | Requires: %{name}-devel = %{version}-%{release} | |
141 | ||
142 | %description static | |
143 | Static Firebird library (libgds). | |
144 | ||
145 | %description static -l pl.UTF-8 | |
146 | Statyczna biblioteka Firebird (libgds). | |
147 | ||
148 | %package doc | |
149 | Summary: Extensive InterBase and Firebird documentation | |
150 | Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird | |
151 | Group: Documentation | |
152 | ||
153 | %description doc | |
154 | Extensive InterBase and Firebird documentation. | |
155 | ||
156 | %description doc -l pl.UTF-8 | |
157 | Obszerna dokumentacja do baz InterBase i Firebird. | |
158 | ||
159 | %prep | |
160 | %setup -q -n %{name}-%{version}-0 | |
161 | %patch0 -p1 | |
162 | %patch1 -p1 | |
163 | %patch2 -p1 | |
164 | %patch3 -p1 | |
165 | %patch4 -p1 | |
166 | %patch5 -p1 | |
167 | %patch6 -p0 | |
168 | ||
169 | %{__sed} -i 's,@prefix@,%{_prefix},' builds/install/misc/fb_config.in | |
170 | ||
171 | # force rebuild | |
172 | rm -f src/dsql/parse.cpp | |
173 | ||
174 | mkdir docs | |
175 | cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} docs | |
176 | ||
177 | %build | |
178 | %{__libtoolize} | |
179 | %{__aclocal} | |
180 | %{__autoconf} | |
181 | ||
182 | %configure \ | |
183 | --with-editline \ | |
184 | --with-gnu-ld \ | |
185 | --with-gpre-pascal \ | |
186 | --with-system-editline \ | |
187 | --with-system-icu \ | |
188 | %{?with_ss:--enable-superserver} \ | |
189 | --prefix=%{ibdir} \ | |
190 | %{?debug:--enable-debug} | |
191 | ||
192 | DARCH="" | |
193 | %ifarch %{x8664} | |
194 | DARCH="-DAMD64" | |
195 | %endif | |
196 | %ifarch sparc sparcv9 | |
197 | DARCH="-Dsparc" | |
198 | %endif | |
199 | %ifarch ppc | |
200 | DARCH="-DPPC" | |
201 | %endif | |
202 | ||
203 | %{__make} -j1 \ | |
204 | CC="%{__cc}" \ | |
205 | CXX="%{__cxx}" \ | |
206 | PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \ | |
207 | DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \ | |
208 | LIB_LINK_RPATH_LINE= \ | |
209 | LIB_CLIENT_LINK_OPTIONS="-lpthread" | |
210 | ||
211 | # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...) | |
212 | fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || : | |
213 | ||
214 | %install | |
215 | rm -rf $RPM_BUILD_ROOT | |
216 | ||
217 | %{__make} -C src -f ../gen/Makefile.install buildImageDir | |
218 | ||
219 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{firebird,rc.d/init.d,sysconfig/rc-inetd} | |
220 | install -d $RPM_BUILD_ROOT{%{_bindir},%{ibdir},%{_libdir},%{_includedir}} \ | |
221 | install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \ | |
222 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
223 | ||
224 | install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} | |
225 | install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir} | |
226 | touch $RPM_BUILD_ROOT/var/log/firebird.log | |
227 | ||
228 | cd gen/buildroot/%{ibdir} | |
229 | install security2.fdb $RPM_BUILD_ROOT/var/lib/firebird | |
230 | install *.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird | |
231 | install include/* $RPM_BUILD_ROOT%{_includedir} | |
232 | cp -af UDF bin help intl firebird.msg $RPM_BUILD_ROOT%{ibdir} | |
233 | cp -df lib/* $RPM_BUILD_ROOT%{_libdir} | |
234 | cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
235 | ||
236 | # or libfbembed? | |
237 | ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 | |
238 | ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so | |
239 | ||
240 | ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a | |
241 | ||
242 | for f in bin/{fb_lock_print,gbak,gdef,gds_drop,gfix,gpre,gsec,gsplit,gstat,nbackup}; do | |
243 | ln -sf %{ibdir}/$f $RPM_BUILD_ROOT%{_bindir}/$ff | |
244 | done | |
245 | ||
246 | %if %{with ss} | |
247 | install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird | |
248 | install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird | |
249 | %else | |
250 | install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird | |
251 | %endif | |
252 | ||
253 | %clean | |
254 | rm -rf $RPM_BUILD_ROOT | |
255 | ||
256 | %pre | |
257 | %groupadd -g 145 firebird | |
258 | %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird | |
259 | ||
260 | %if %{with ss} | |
261 | %post | |
262 | /sbin/chkconfig --add firebird | |
263 | %service firebird restart | |
264 | ||
265 | %preun | |
266 | if [ "$1" = "0" ]; then | |
267 | %service firebird stop | |
268 | /sbin/chkconfig --del firebird | |
269 | fi | |
270 | %endif | |
271 | ||
272 | %postun | |
273 | if [ "$1" = "0" ]; then | |
274 | %userremove firebird | |
275 | %groupremove firebird | |
276 | fi | |
277 | ||
278 | %post lib -p /sbin/ldconfig | |
279 | %postun lib -p /sbin/ldconfig | |
280 | ||
281 | %triggerpostun -- %{name} < 2.1.1.17910-2 | |
282 | if [ -f %{ibdir}/aliases.conf.rpmsave ]; then | |
283 | mv -f %{ibdir}/aliases.conf.rpmsave %{_sysconfdir}/firebird/aliases.conf | |
284 | fi | |
285 | if [ -f %{ibdir}/firebird.conf.rpmsave ]; then | |
286 | mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf | |
287 | fi | |
288 | if [ -f %{ibdir}/security2.fdb.rpmsave ]; then | |
289 | mv -f %{ibdir}/security2.fdb.rpmsave /var/lib/firebird/security2.fdb | |
290 | fi | |
291 | ||
292 | %files | |
293 | %defattr(644,root,root,755) | |
294 | %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} | |
295 | %dir %{_sysconfdir}/firebird | |
296 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/*.conf | |
297 | %attr(755,root,root) %{_bindir}/fb_lock_print | |
298 | %attr(755,root,root) %{_bindir}/g* | |
299 | %attr(755,root,root) %{_bindir}/nbackup | |
300 | %attr(755,root,root) %{_libdir}/libib_util.so | |
301 | %attr(755,root,root) %{ibdir}/UDF | |
302 | %attr(755,root,root) %{ibdir}/bin/* | |
303 | %exclude %{ibdir}/bin/fb_config | |
304 | %{ibdir}/help | |
305 | %dir %attr(770,root,firebird) %{ibdir}/intl | |
306 | %attr(755,root,root) %{ibdir}/intl/fbintl | |
307 | # should it be moved to %{_sysconfdir} and marked as config? | |
308 | %{ibdir}/intl/fbintl.conf | |
309 | %{ibdir}/firebird.msg | |
310 | %dir %attr(770,root,firebird) /var/lib/firebird | |
311 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security2.fdb | |
312 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log | |
313 | ||
314 | %if %{with ss} | |
315 | %attr(754,root,root) /etc/rc.d/init.d/firebird | |
316 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird | |
317 | %else | |
318 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird | |
319 | %endif | |
320 | ||
321 | %files dirs | |
322 | %defattr(644,root,root,755) | |
323 | %dir %{ibdir} | |
324 | %dir %{ibdir}/bin | |
325 | ||
326 | %files lib | |
327 | %defattr(644,root,root,755) | |
328 | %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.* | |
329 | %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2 | |
330 | %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.* | |
331 | %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.2.1 | |
332 | ||
333 | # InterBase/old Firebird compatibility symlinks | |
334 | %attr(755,root,root) %{_libdir}/libgds.so.0 | |
335 | # needed here - original libgds.so.0 didn't have soname, so some old | |
336 | # (possibly not open-source) apps may be linked with libgds.so | |
337 | %attr(755,root,root) %{_libdir}/libgds.so | |
338 | ||
339 | %files devel | |
340 | %defattr(644,root,root,755) | |
341 | %attr(755,root,root) %{_libdir}/libfbclient.so | |
342 | %attr(755,root,root) %{_libdir}/libfbembed.so | |
343 | %attr(755,root,root) %{ibdir}/bin/fb_config | |
344 | %{_includedir}/ib_util.h | |
345 | %{_includedir}/ibase.h | |
346 | %{_includedir}/iberror.h | |
347 | %{_includedir}/perf.h | |
348 | %{_examplesdir}/%{name}-%{version} | |
349 | ||
350 | %files static | |
351 | %defattr(644,root,root,755) | |
352 | %{_libdir}/libfbstatic.a | |
353 | # compat link | |
354 | %{_libdir}/libgds.a | |
355 | ||
356 | %files doc | |
357 | %defattr(644,root,root,755) | |
358 | %doc docs/* |