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}-ReleaseCandidate1.tar.bz2
19 # Source0-md5: 69c0fff7c4022e430df6e1eb842e5aaa
20 Source1: http://www.firebirdsql.org/pdfmanual/Firebird-2.0-QuickStart.pdf
21 # Source1-md5: 1ded6a5f6c1ec36a2b8a8b06370afc1a
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: 7883243a5685560330430d8b423d2eba
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: libstdc++-devel
60 BuildRequires: libtool
61 BuildRequires: ncurses-devel
62 BuildRequires: psmisc >= 22.5-2
63 BuildRequires: rpmbuild(macros) >= 1.268
64 Requires: %{name}-lib = %{version}-%{release}
66 Requires(post,preun): /sbin/chkconfig
69 # official ports are x86, sparc and x86_64
70 # alpha and ppc added in morearchs patch
71 # see morearchs patch if you want to add support for more archs
72 ExclusiveArch: %{ix86} %{x8664} sparc sparcv9 alpha ppc
73 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75 %define ibdir %{_libdir}/interbase
76 %define specflags -fno-strict-aliasing
77 %define debugcflags -O1 -g -Wall -fno-strict-aliasing
80 Firebird is a powerful, high-performance relational database designed
81 to be embedded into applications on multiple platforms.
83 %description -l pl.UTF-8
84 Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz
85 danych zaprojektowanym do osadzania w aplikacjach na wielu
88 %description -l de.UTF-8
89 Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von
90 Borland vertriebenen relationalen Datenbankmanagementsystemes
91 InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe
92 der Version 6 des kommerziellen Vorgängers Interbase bei Borland
93 ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
96 Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine
97 Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann.
98 Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass
99 auch Datenbankdateien über 2GB erzeugt werden können.
102 Summary: Firebird shared library
103 Summary(pl.UTF-8): Biblioteka współdzielona Firebird
107 Firebird shared library (libgds).
109 %description lib -l pl.UTF-8
110 Biblioteka współdzielona Firebird (libgds).
113 Summary: Header files for Firebird library
114 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird
115 Group: Development/Libraries
116 Requires: %{name}-lib = %{version}-%{release}
117 Requires: libstdc++-devel
120 Header files for Firebird library.
122 %description devel -l pl.UTF-8
123 Pliki nagłówkowe biblioteki Firebird.
126 Summary: Static Firebird library
127 Summary(pl.UTF-8): Statyczna biblioteka Firebird
128 Group: Development/Libraries
129 Requires: %{name}-devel = %{version}-%{release}
132 Static Firebird library (libgds).
134 %description static -l pl.UTF-8
135 Statyczna biblioteka Firebird (libgds).
138 Summary: Extensive InterBase and Firebird documentation
139 Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird
143 Extensive InterBase and Firebird documentation.
145 %description doc -l pl.UTF-8
146 Obszerna dokumentacja do baz InterBase i Firebird.
149 %setup -q -n Firebird-%{version}-ReleaseCandidate1
155 # looks obsolete (but not fully)
169 rm -f src/dsql/parse.cpp
178 --with-system-editline \
181 %{?with_ss:--enable-superserver} \
183 %{?debug:--enable-debug}
185 # OPTFLAGS for editline
186 export OPTFLAGS="%{rpmcflags}"
191 %ifarch sparc sparcv9
201 PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
202 DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
203 LIB_LINK_RPATH_LINE= \
204 LIB_CLIENT_LINK_OPTIONS="-lpthread"
206 # my name is hack. dirty hack.
207 # why isn't that build in previous make call?
208 %{__make} -C src -f ../gen/Makefile.libfbembed libfbembed \
211 PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
212 DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
213 LIB_LINK_RPATH_LINE= \
214 LIB_CLIENT_LINK_OPTIONS="-lpthread"
216 # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...)
217 fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
220 rm -rf $RPM_BUILD_ROOT
222 %{__make} -C src -f ../gen/Makefile.install buildImageDir
224 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd}
225 install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \
226 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
228 install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
229 install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
230 cd gen/buildroot/%{ibdir}
232 cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \
233 $RPM_BUILD_ROOT%{ibdir}
234 install include/* $RPM_BUILD_ROOT%{_includedir}
235 cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
236 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
239 ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
240 ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so
242 ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
245 install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
246 install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
248 install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
252 rm -rf $RPM_BUILD_ROOT
255 %groupadd -g 145 firebird
256 %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
260 /sbin/chkconfig --add firebird
261 %service firebird restart
264 if [ "$1" = "0" ]; then
265 %service firebird stop
266 /sbin/chkconfig --del firebird
271 if [ "$1" = "0" ]; then
273 %groupremove firebird
276 %post lib -p /sbin/ldconfig
277 %postun lib -p /sbin/ldconfig
280 %defattr(644,root,root,755)
281 %doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
282 %attr(755,root,root) %{_libdir}/libib_util.so
283 %dir %attr(770,root,firebird) %{ibdir}
284 %attr(755,root,root) %{ibdir}/UDF
285 %attr(755,root,root) %{ibdir}/bin
287 %dir %attr(770,root,firebird) %{ibdir}/intl
288 %attr(755,root,root) %{ibdir}/intl/fbintl
289 %{ibdir}/firebird.msg
290 # following files should be in /var (*.fdb) and /etc (*.conf)?
291 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security.fdb
292 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/aliases.conf
293 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/firebird.conf
295 %attr(754,root,root) /etc/rc.d/init.d/firebird
296 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
298 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
304 %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.[0-9]
305 %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.*
306 %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.[0-9]
308 # InterBase/old Firebird compatibility symlinks
309 %attr(755,root,root) %{_libdir}/libgds.so.0
310 # needed here - original libgds.so.0 didn't have soname, so some old
311 # (possibly not open-source) apps may be linked with libgds.so
312 %attr(755,root,root) %{_libdir}/libgds.so
315 %defattr(644,root,root,755)
316 %attr(755,root,root) %{_libdir}/libfbclient.so
317 %attr(755,root,root) %{_libdir}/libfbembed.so
319 %{_examplesdir}/%{name}-%{version}
322 %defattr(644,root,root,755)
323 %{_libdir}/libfbcommon.a
324 %{_libdir}/libfbstatic.a
329 %defattr(644,root,root,755)