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