3 # - 2.5 -> 3.0 migration?
4 # - more docs from http://www.firebirdsql.org/en/reference-manuals/ ?
5 # - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha
6 # - check if it's fixed now (RISC_ALIGNMENT is defined)
7 # - check classic subpackage pre/post scripts
9 # - create SYSDBA user with initial password before first firebird start
12 # echo "create user SYSDBA password 'masterkey';"|fb_isql -u SYSDBA /var/lib/firebird/security3.fdb
14 Summary: Firebird SQL Database Server and Client tools
15 Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems
16 Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie
20 License: Interbase Public License 1.0, Initial Developer's Public License 1.0
21 Group: Applications/Databases
22 Source0: https://github.com/FirebirdSQL/firebird/releases/download/v3.0.10/%{name}-%{version}-0.tar.bz2
23 # Source0-md5: 849bbc5913276161cc5250d0a9d925d8
24 Source1: http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/%{name}-3-QuickStart.pdf
25 # Source1-md5: 1e7032a176e4dc1eca6b1e9babf297c4
26 # distfiles refuses this, would require some audit to allow '('/')' chars
27 #Source2: http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf
28 ## Source2-md5: 9eb90583c200bdd7292a80ecc1df1178
29 Source3: http://www.firebirdsql.org/pdfmanual/%{name}-Null-Guide.pdf
30 # Source3-md5: dc8e5e234b2138af9a472feca6565359
31 Source4: http://www.firebirdsql.org/pdfmanual/%{name}-Generator-Guide.pdf
32 # Source4-md5: 23926037205ab8716cf0a54544585231
33 Source5: http://www.firebirdsql.org/pdfmanual/MSSQL-to-%{name}.pdf
34 # Source5-md5: 230ef237842d255916398f408f459281
35 Source6: http://www.firebirdsql.org/pdfmanual/%{name}-nbackup.pdf
36 # Source6-md5: 5fd9de7144610ab45bdbb03cfc491adb
37 Source7: http://www.firebirdsql.org/pdfmanual/%{name}-shell-scripts.pdf
38 # Source7-md5: 01c5e91de9f1639f62f93b3e486584c8
39 Source8: http://www.firebirdnews.org/docs/fb2min.pdf
40 # Source8-md5: 5e192abaf5db4417b29ad871716522b5
41 Source9: https://firebirdsql.org/file/documentation/reference_manuals/reference_material/Firebird-2.1-ErrorCodes.pdf
42 # Source9-md5: 9ab392dc349657dbcf9a9c35acd8e8db
43 Source10: http://www.firebirdsql.org/pdfmanual/%{name}-gsec.pdf
44 # Source10-md5: 326ef6f7afebf369b534838945ee4f74
45 Source11: http://www.firebirdsql.org/pdfmanual/%{name}-gfix.pdf
46 # Source11-md5: 22e2cdc1058dd4f764728bcb3a8644f0
47 Source12: http://www.firebirdsql.org/pdfmanual/%{name}-gsplit.pdf
48 # Source12-md5: 0147b5d2118e2e80c93762600107a71f
49 Source13: https://firebirdsql.org/file/documentation/pdf/en/refdocs/fblangref30/firebird-30-language-reference.pdf
50 # Source13-md5: 20c7cf7d0c102f5b21342fa4472d7938
51 Source100: firebird.init
52 Source101: firebird.sysconfig
53 Source102: firebird.inetd
54 Source103: firebird.tmpfiles
55 Source104: firebird.service
56 Source105: firebird-classic.service
57 Source106: firebird-classic.socket
58 Source107: server_mode-ss.conf
59 Source108: server_mode-classic.conf
61 Patch0: %{name}-chmod.patch
62 Patch1: %{name}-editline.patch
63 Patch2: %{name}-va.patch
64 Patch3: %{name}-FHS.patch
65 Patch4: %{name}-opt.patch
66 Patch5: %{name}-gcc-icu.patch
67 Patch6: %{name}-libpath.patch
68 Patch7: add-pkgconfig-files.patch
69 Patch8: Provide-sized-global-delete-operators-when-compiled.patch
70 Patch9: parallel-build.patch
71 Patch10: no-copy-from-icu.patch
74 Patch13: cloop-honour-build-flags.patch
75 Patch14: mod_loader.patch
76 URL: http://www.firebirdsql.org/
77 BuildRequires: autoconf >= 2.67
78 BuildRequires: automake
80 BuildRequires: libatomic_ops
81 BuildRequires: libedit-devel
82 BuildRequires: libicu-devel
83 BuildRequires: libstdc++-devel
84 BuildRequires: libtommath-devel
85 BuildRequires: libtool >= 2:2
87 BuildRequires: procmail
88 BuildRequires: rpmbuild(macros) >= 1.268
89 BuildRequires: sed >= 4.0
90 BuildRequires: zlib-devel
91 Requires: %{name}-dirs = %{version}-%{release}
92 Requires: %{name}-lib = %{version}-%{release}
93 # official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64
94 # alpha is added in morearchs patch
95 # see morearchs patch if you want more
96 ExclusiveArch: %{ix86} %{x8664} x32 arm ia64 mips mipsel ppc sparc sparcv9 alpha
97 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
99 %define ibdir %{_libdir}/interbase
100 %define specflags -fno-strict-aliasing
101 %define debugcflags -O1 -g -Wall -fno-strict-aliasing
102 %define Werror_cflags ''
105 Firebird is a powerful, high-performance relational database designed
106 to be embedded into applications on multiple platforms.
108 %description -l pl.UTF-8
109 Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz
110 danych zaprojektowanym do osadzania w aplikacjach na wielu
113 %description -l de.UTF-8
114 Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von
115 Borland vertriebenen relationalen Datenbankmanagementsystemes
116 InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe
117 der Version 6 des kommerziellen Vorgängers Interbase bei Borland
118 ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
121 Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine
122 Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann.
123 Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass
124 auch Datenbankdateien über 2GB erzeugt werden können.
127 Summary: Firebird SQL Database common directories
128 Summary(pl.UTF-8): Firebird - wspólne katalogi
129 Group: Applications/Databases
132 Firebird SQL Database common directories.
134 %description dirs -l pl.UTF-8
135 Firebird - wspólne katalogi.
138 Summary: Firebird shared library
139 Summary(pl.UTF-8): Biblioteka współdzielona Firebird
143 Firebird shared library (libgds).
145 %description lib -l pl.UTF-8
146 Biblioteka współdzielona Firebird (libgds).
149 Summary: Header files for Firebird library
150 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird
151 Group: Development/Libraries
152 Requires: %{name}-dirs = %{version}-%{release}
153 Requires: %{name}-lib = %{version}-%{release}
154 Requires: libstdc++-devel
155 Obsoletes: Firebird-static
158 Header files for Firebird library.
160 %description devel -l pl.UTF-8
161 Pliki nagłówkowe biblioteki Firebird.
164 Summary: Extensive InterBase and Firebird documentation
165 Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird
169 Extensive InterBase and Firebird documentation.
171 %description doc -l pl.UTF-8
172 Obszerna dokumentacja do baz InterBase i Firebird.
175 Summary: Firebird SuperServer init scripts
176 Summary(pl.UTF-8): Skrypty startowe Firebirda jako SuperServera
178 Requires: %{name} = %{version}-%{release}
179 Requires(post,preun): /sbin/chkconfig
183 Firebird SuperServer init scripts.
185 %description ss -l pl.UTF-8
186 Skrypty startowe Firebirda jako SuperServera.
189 Summary: Firebird Classic init scripts
190 Summary(pl.UTF-8): Skrypty startowe Firebirda w wersji Classic
192 Requires: %{name} = %{version}-%{release}
195 Firebird Classic (inetd) init scripts.
197 %description classic -l pl.UTF-8
198 Skrypty startowe Firebirda w wersji Classic (inetd).
201 %setup -q -n %{name}-%{version}-0
218 cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \
219 %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} docs
221 # not processed by configure
222 %{__sed} -i -e 's/^CFLAGS.*$/& %{rpmcflags} %{rpmcppflags}/' extern/btyacc/Makefile
223 %{__sed} -i -e 's;^\(CC\|LINKER\)\(.*= \)gcc$;\1\2 %{__cc};' extern/btyacc/Makefile
231 CFLAGS="%{rpmcflags} -fno-delete-null-pointer-checks" \
233 --with-fbconf=%{_sysconfdir}/firebird \
234 --with-fbinclude=%{_includedir} \
235 --with-fblib=%{_libdir} \
236 --with-fblog=/var/log \
237 --with-fbsecure-db=/var/lib/firebird \
238 --with-fbglock=/var/lib/firebird \
241 --with-system-editline \
242 %{?debug:--enable-debug} \
249 rm -rf $RPM_BUILD_ROOT
251 %{__make} -C src -f ../gen/Makefile.install buildRoot
253 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{firebird{,/conf.d},rc.d/init.d,sysconfig/rc-inetd}
254 install -d $RPM_BUILD_ROOT{%{_bindir},%{ibdir},%{_libdir},%{_includedir},%{_pkgconfigdir}} \
255 install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \
256 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
257 install -d $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d
258 install -d $RPM_BUILD_ROOT%{systemdunitdir}
259 cp -p %{SOURCE103} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/firebird.conf
260 touch $RPM_BUILD_ROOT/var/log/firebird.log
262 cp -p gen/install/misc/fbclient.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
265 cp -p var/lib/firebird/security3.fdb $RPM_BUILD_ROOT/var/lib/firebird
266 cp -p etc/firebird/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird
267 chmod 755 usr/include/firebird/impl
268 cp -pr usr/include/* $RPM_BUILD_ROOT%{_includedir}
269 cp -dp usr/%{_lib}/*.so* $RPM_BUILD_ROOT%{_libdir}
271 cp -a UDF bin help intl plugins firebird.msg $RPM_BUILD_ROOT%{ibdir}
272 ln -s %{ibdir}/intl $RPM_BUILD_ROOT%{_sysconfdir}/firebird
273 ln -s %{ibdir}/{UDF,bin,plugins,firebird.msg} $RPM_BUILD_ROOT%{_sysconfdir}/firebird
274 chmod u+w -R examples # allow further cleaning
275 cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
277 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
278 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so
280 for f in bin/{fb_lock_print,gbak,gfix,gpre,gsec,gsplit,gstat,nbackup}; do
281 ln -sf %{ibdir}/$f $RPM_BUILD_ROOT%{_bindir}/${f#bin/}
283 ln -sf %{ibdir}/bin/isql $RPM_BUILD_ROOT%{_bindir}/fb_isql
285 rm -f $RPM_BUILD_ROOT%{ibdir}/bin/{FirebirdUninstall.sh,changeServerMode.sh}
287 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE100} >$RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
288 cp -p %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
289 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE104} >$RPM_BUILD_ROOT%{systemdunitdir}/firebird.service
290 install -d $RPM_BUILD_ROOT/run/firebird
292 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE102} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
293 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE105} >$RPM_BUILD_ROOT%{systemdunitdir}/firebird-classic@.service
294 cp -p %{SOURCE106} $RPM_BUILD_ROOT%{systemdunitdir}/firebird-classic.socket
296 cp -p %{SOURCE107} $RPM_BUILD_ROOT%{_sysconfdir}/firebird/conf.d/
297 cp -p %{SOURCE108} $RPM_BUILD_ROOT%{_sysconfdir}/firebird/conf.d/
298 install -p %{_sourcedir}/fb_config $RPM_BUILD_ROOT%{_bindir}/fb_config
301 rm -rf $RPM_BUILD_ROOT
304 %groupadd -g 145 firebird
305 %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
308 if [ "$1" = "0" ]; then
310 %groupremove firebird
313 %post lib -p /sbin/ldconfig
314 %postun lib -p /sbin/ldconfig
317 /sbin/chkconfig --add firebird
318 %service firebird restart
319 %systemd_post firebird.service
322 if [ "$1" = "0" ]; then
323 %service firebird stop
324 /sbin/chkconfig --del firebird
326 %systemd_preun firebird.service
332 %systemd_post firebird-classic@.service firebird-classic.socket
335 %systemd_preun firebird-classic@.service firebird-classic.socket
340 %triggerpostun -- %{name} < 2.1.1.17910-2
341 if [ -f %{ibdir}/firebird.conf.rpmsave ]; then
342 mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf
346 %defattr(644,root,root,755)
347 %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
348 %dir %{_sysconfdir}/firebird
349 %dir %{_sysconfdir}/firebird/conf.d
350 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/databases.conf
351 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/fbtrace.conf
352 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/firebird.conf
353 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/plugins.conf
354 %{_sysconfdir}/firebird/intl
355 %{_sysconfdir}/firebird/UDF
356 %{_sysconfdir}/firebird/bin
357 %{_sysconfdir}/firebird/firebird.msg
358 %{_sysconfdir}/firebird/plugins
359 %attr(755,root,root) %{_bindir}/fb_isql
360 %attr(755,root,root) %{_bindir}/fb_lock_print
361 %attr(755,root,root) %{_bindir}/gbak
362 %attr(755,root,root) %{_bindir}/gfix
363 %attr(755,root,root) %{_bindir}/gsec
364 %attr(755,root,root) %{_bindir}/gsplit
365 %attr(755,root,root) %{_bindir}/gstat
366 %attr(755,root,root) %{_bindir}/nbackup
367 %attr(755,root,root) %{_libdir}/libib_util.so
368 %attr(755,root,root) %{ibdir}/UDF
369 %attr(755,root,root) %{ibdir}/bin/*
370 %exclude %{ibdir}/bin/fb_config
371 %exclude %{ibdir}/bin/gpre
372 %exclude %{ibdir}/bin/fbguard
375 %attr(755,root,root) %{ibdir}/intl/fbintl
376 # should it be moved to %{_sysconfdir} and marked as config?
377 %{ibdir}/intl/fbintl.conf
378 %dir %{ibdir}/plugins
379 %attr(755,root,root) %{ibdir}/plugins/libfbtrace.so
380 %attr(755,root,root) %{ibdir}/plugins/libCryptKeyHolder_example.so
381 %attr(755,root,root) %{ibdir}/plugins/libDbCrypt_example.so
382 %attr(755,root,root) %{ibdir}/plugins/libEngine12.so
383 %attr(755,root,root) %{ibdir}/plugins/libLegacy_Auth.so
384 %attr(755,root,root) %{ibdir}/plugins/libLegacy_UserManager.so
385 %attr(755,root,root) %{ibdir}/plugins/libSrp.so
386 %attr(755,root,root) %{ibdir}/plugins/libudr_engine.so
387 %dir %{ibdir}/plugins/udr
388 %attr(755,root,root) %{ibdir}/plugins/udr/libudrcpp_example.so
389 %{ibdir}/plugins/udr_engine.conf
391 %{ibdir}/firebird.msg
392 %dir %attr(770,root,firebird) /var/lib/firebird
393 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security3.fdb
394 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log
398 %defattr(644,root,root,755)
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
405 %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2
407 # InterBase/old Firebird compatibility symlinks
408 %attr(755,root,root) %{_libdir}/libgds.so.0
409 # needed here - original libgds.so.0 didn't have soname, so some old
410 # (possibly not open-source) apps may be linked with libgds.so
411 %attr(755,root,root) %{_libdir}/libgds.so
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_bindir}/fb_config
416 %attr(755,root,root) %{_libdir}/libfbclient.so
417 %attr(755,root,root) %{ibdir}/bin/fb_config
418 %attr(755,root,root) %{ibdir}/bin/gpre
419 %attr(755,root,root) %{_bindir}/gpre
420 %{_pkgconfigdir}/fbclient.pc
421 %{_includedir}/firebird
422 %{_includedir}/ib_util.h
423 %{_includedir}/ibase.h
424 %{_includedir}/iberror.h
425 %{_includedir}/perf.h
426 %{_examplesdir}/%{name}-%{version}
429 %defattr(644,root,root,755)
433 %defattr(644,root,root,755)
434 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/conf.d/server_mode-ss.conf
435 %attr(754,root,root) /etc/rc.d/init.d/firebird
436 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
437 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tmpfiles.d/firebird.conf
438 %attr(755,root,root) %{ibdir}/bin/fbguard
439 %dir %attr(770,root,firebird) /run/firebird
440 %{systemdunitdir}/firebird.service
443 %defattr(644,root,root,755)
444 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/conf.d/server_mode-classic.conf
445 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
446 %{systemdunitdir}/firebird-classic@.service
447 %{systemdunitdir}/firebird-classic.socket