2 # - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha
3 # - create classic server/super server subpackages and drop bcond
4 # (see firebird2 on debian how to do it)
7 %bcond_with ss # Super Server (standalone daemon instead of inetd service)
9 Summary: Firebird SQL Database Server and Client tools
10 Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems
11 Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie
13 # FirebirdCS/FirebirdSS (Classic Server/Super Server)?
16 License: Interbase Public License 1.0
17 Group: Applications/Databases
18 Source0: http://dl.sourceforge.net/firebird/Firebird-%{version}-0.tar.bz2
19 # Source0-md5: e663417416b4dc808d6ace991e6b783f
20 Source1: http://www.firebirdsql.org/pdfmanual/Firebird-2.0-QuickStart.pdf
21 # Source1-md5: d77105c5b24202fe7adbf2a011e71b35
22 Source2: http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf
23 # Source2-md5: 9eb90583c200bdd7292a80ecc1df1178
24 Source3: http://www.firebirdsql.org/pdfmanual/Firebird-Null-Guide.pdf
25 # Source3-md5: d1f8ba75fe3bb9eb9d203ce3f82a1a1a
26 Source4: http://www.firebirdsql.org/pdfmanual/Firebird-Generator-Guide.pdf
27 # Source4-md5: 44e7568ef477072a8ad5f381c3e12a75
28 Source5: http://www.firebirdsql.org/pdfmanual/MSSQL-to-Firebird.pdf
29 # Source5-md5: 1bd4a168e550910fc899e2aa125d83a3
30 Source6: http://www.firebirdsql.org/pdfmanual/Firebird-nbackup.pdf
31 # Source6-md5: 4e195bc085dba520b0f7cd9dcd1f995c
32 Source7: http://www.firebirdsql.org/pdfmanual/Firebird-Utils-WIP.pdf
33 # Source7-md5: 39b9a4f3c9d9e27d985e9277ae163ceb
34 Source8: http://www.firebirdnews.org/docs/fb2min.pdf
35 # Source8-md5: ebac312c0afbe97b1850bdc74c553c28
36 Source9: http://www.firebirdsql.org/doc/contrib/fb_2_0_errorcodes.pdf
37 # Source9-md5: 2acf2ff63c4ba3a1c590989e19bb253e
38 Source100: firebird.init
39 Source101: firebird.sysconfig
40 Source102: firebird.inetd
41 Patch0: %{name}-chmod.patch
42 Patch1: %{name}-editline.patch
43 Patch2: %{name}-va.patch
44 Patch3: %{name}-morearchs.patch
45 Patch4: %{name}-gcc4.patch
46 Patch5: %{name}-fix-os-detection.dpatch
47 Patch6: %{name}-fix-pthreads-detect.dpatch
48 Patch7: %{name}-link-with-g++.dpatch
49 Patch8: %{name}-no-custom-errno-and-sys_XXerrXX.dpatch
50 Patch9: %{name}-opt-bypass-redundant-sort.dpatch
51 Patch10: %{name}-security-remote-preauth-crash.dpatch
52 Patch11: %{name}-separate-file-and-sem-perms.dpatch
53 Patch12: %{name}-ppc.patch
54 Patch13: %{name}-64bit.patch
55 URL: http://www.firebirdsql.org/
56 BuildRequires: autoconf
57 BuildRequires: automake
59 BuildRequires: libicu-devel
60 BuildRequires: libstdc++-devel
61 BuildRequires: libtool
62 BuildRequires: ncurses-devel
63 BuildRequires: psmisc >= 22.5-2
64 BuildRequires: rpmbuild(macros) >= 1.268
65 Requires: %{name}-lib = %{version}-%{release}
67 Requires(post,preun): /sbin/chkconfig
70 # official ports are x86, sparc and x86_64
71 # alpha and ppc added in morearchs patch
72 # see morearchs patch if you want to add support for more archs
73 ExclusiveArch: %{ix86} %{x8664} sparc sparcv9 alpha ppc
74 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76 %define ibdir %{_libdir}/interbase
77 %define specflags -fno-strict-aliasing
78 %define debugcflags -O1 -g -Wall -fno-strict-aliasing
81 Firebird is a powerful, high-performance relational database designed
82 to be embedded into applications on multiple platforms.
84 %description -l pl.UTF-8
85 Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz
86 danych zaprojektowanym do osadzania w aplikacjach na wielu
89 %description -l de.UTF-8
90 Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von
91 Borland vertriebenen relationalen Datenbankmanagementsystemes
92 InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe
93 der Version 6 des kommerziellen Vorgängers Interbase bei Borland
94 ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
97 Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine
98 Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann.
99 Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass
100 auch Datenbankdateien über 2GB erzeugt werden können.
103 Summary: Firebird shared library
104 Summary(pl.UTF-8): Biblioteka współdzielona Firebird
108 Firebird shared library (libgds).
110 %description lib -l pl.UTF-8
111 Biblioteka współdzielona Firebird (libgds).
114 Summary: Header files for Firebird library
115 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird
116 Group: Development/Libraries
117 Requires: %{name}-lib = %{version}-%{release}
118 Requires: libstdc++-devel
121 Header files for Firebird library.
123 %description devel -l pl.UTF-8
124 Pliki nagłówkowe biblioteki Firebird.
127 Summary: Static Firebird library
128 Summary(pl.UTF-8): Statyczna biblioteka Firebird
129 Group: Development/Libraries
130 Requires: %{name}-devel = %{version}-%{release}
133 Static Firebird library (libgds).
135 %description static -l pl.UTF-8
136 Statyczna biblioteka Firebird (libgds).
139 Summary: Extensive InterBase and Firebird documentation
140 Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird
144 Extensive InterBase and Firebird documentation.
146 %description doc -l pl.UTF-8
147 Obszerna dokumentacja do baz InterBase i Firebird.
150 %setup -q -n Firebird-%{version}-0
156 # looks obsolete (but not fully)
170 rm -f src/dsql/parse.cpp
179 --with-system-editline \
182 %{?with_ss:--enable-superserver} \
184 %{?debug:--enable-debug}
186 # OPTFLAGS for editline
187 export OPTFLAGS="%{rpmcflags}"
192 %ifarch sparc sparcv9
202 PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
203 DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
204 LIB_LINK_RPATH_LINE= \
205 LIB_CLIENT_LINK_OPTIONS="-lpthread"
207 # my name is hack. dirty hack.
208 # why isn't that build in previous make call?
209 %{__make} -C src -f ../gen/Makefile.libfbembed libfbembed \
212 PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
213 DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
214 LIB_LINK_RPATH_LINE= \
215 LIB_CLIENT_LINK_OPTIONS="-lpthread"
217 # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...)
218 fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
221 rm -rf $RPM_BUILD_ROOT
223 %{__make} -C src -f ../gen/Makefile.install buildImageDir
225 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd}
226 install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \
227 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
229 install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
230 install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
231 cd gen/buildroot/%{ibdir}
233 cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \
234 $RPM_BUILD_ROOT%{ibdir}
235 install include/* $RPM_BUILD_ROOT%{_includedir}
236 cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
237 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
240 ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
241 ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so
243 ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
246 install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
247 install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
249 install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
253 rm -rf $RPM_BUILD_ROOT
256 %groupadd -g 145 firebird
257 %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
261 /sbin/chkconfig --add firebird
262 %service firebird restart
265 if [ "$1" = "0" ]; then
266 %service firebird stop
267 /sbin/chkconfig --del firebird
272 if [ "$1" = "0" ]; then
274 %groupremove firebird
277 %post lib -p /sbin/ldconfig
278 %postun lib -p /sbin/ldconfig
281 %defattr(644,root,root,755)
282 %doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
283 %attr(755,root,root) %{_libdir}/libib_util.so
284 %dir %attr(770,root,firebird) %{ibdir}
285 %attr(755,root,root) %{ibdir}/UDF
286 %attr(755,root,root) %{ibdir}/bin
288 %dir %attr(770,root,firebird) %{ibdir}/intl
289 %attr(755,root,root) %{ibdir}/intl/fbintl
290 %{ibdir}/firebird.msg
291 # following files should be in /var (*.fdb) and /etc (*.conf)?
292 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security.fdb
293 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/aliases.conf
294 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/firebird.conf
296 %attr(754,root,root) /etc/rc.d/init.d/firebird
297 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
299 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
303 %defattr(644,root,root,755)
304 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
305 %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.[0-9]
306 %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.*
307 %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.[0-9]
309 # InterBase/old Firebird compatibility symlinks
310 %attr(755,root,root) %{_libdir}/libgds.so.0
311 # needed here - original libgds.so.0 didn't have soname, so some old
312 # (possibly not open-source) apps may be linked with libgds.so
313 %attr(755,root,root) %{_libdir}/libgds.so
316 %defattr(644,root,root,755)
317 %attr(755,root,root) %{_libdir}/libfbclient.so
318 %attr(755,root,root) %{_libdir}/libfbembed.so
320 %{_examplesdir}/%{name}-%{version}
323 %defattr(644,root,root,755)
324 %{_libdir}/libfbcommon.a
325 %{_libdir}/libfbstatic.a
330 %defattr(644,root,root,755)