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)
5 %bcond_with ss # Super Server
6 Summary: Firebird SQL Database Server and Client tools
7 Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems
8 Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie
10 # FirebirdCS/FirebirdSS (Classic Server/Super Server)?
13 License: Interbase Public License 1.0
14 Group: Applications/Databases
15 Source0: http://dl.sourceforge.net/firebird/firebird-%{version}.tar.bz2
16 # Source0-md5: 6655190f760217845623a75001b6ddd4
17 Source1: http://www.ibphoenix.com/downloads/60All.zip
18 # Source1-md5: f86a132012361cd4ae88563105741a4c
19 Source2: http://www.ibphoenix.com/downloads/ib_4_0_docs.tar.gz
20 # Source2-md5: f4176d5dec952ee774bb8ee74c1f715d
21 Source3: http://www.ibphoenix.com/downloads/isc_docs.zip
22 # Source3-md5: 66eef71c188215d10988788282c014a7
23 Source4: firebird.init
24 Source5: firebird.sysconfig
25 Source6: firebird.inetd
26 Patch0: %{name}-chmod.patch
27 Patch1: %{name}-editline.patch
28 Patch2: %{name}-va.patch
29 Patch3: %{name}-morearchs.patch
30 Patch4: %{name}-gcc4.patch
31 Patch5: %{name}-fix-os-detection.dpatch
32 Patch6: %{name}-fix-pthreads-detect.dpatch
33 Patch7: %{name}-link-with-g++.dpatch
34 Patch8: %{name}-no-custom-errno-and-sys_XXerrXX.dpatch
35 Patch9: %{name}-opt-bypass-redundant-sort.dpatch
36 Patch10: %{name}-security-remote-preauth-crash.dpatch
37 Patch11: %{name}-separate-file-and-sem-perms.dpatch
38 Patch12: %{name}-ppc.patch
39 Patch13: %{name}-64bit.patch
40 URL: http://www.firebirdsql.org/
41 BuildRequires: autoconf
42 BuildRequires: automake
44 BuildRequires: libstdc++-devel
45 BuildRequires: libtool
46 BuildRequires: ncurses-devel
47 BuildRequires: rpmbuild(macros) >= 1.268
49 Requires: %{name}-lib = %{version}-%{release}
51 Requires(post,preun): /sbin/chkconfig
54 # official ports are x86, sparc and x86_64
55 # alpha and ppc added in morearchs patch
56 # see morearchs patch if you want to add support for more archs
57 ExclusiveArch: %{ix86} %{x8664} sparc sparcv9 alpha ppc
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 %define ibdir %{_libdir}/interbase
61 %define specflags -fno-strict-aliasing
62 %define debugcflags -O1 -g -Wall -fno-strict-aliasing
65 Firebird is a powerful, high-performance relational database designed
66 to be embedded into applications on multiple platforms.
68 %description -l pl.UTF-8
69 Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz
70 danych zaprojektowanym do osadzania w aplikacjach na wielu
73 %description -l de.UTF-8
74 Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von
75 Borland vertriebenen relationalen Datenbankmanagementsystemes
76 InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe
77 der Version 6 des kommerziellen Vorgängers Interbase bei Borland
78 ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
81 Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine
82 Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann.
83 Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass
84 auch Datenbankdateien über 2GB erzeugt werden können.
87 Summary: Firebird shared library
88 Summary(pl.UTF-8): Biblioteka współdzielona Firebird
92 Firebird shared library (libgds).
94 %description lib -l pl.UTF-8
95 Biblioteka współdzielona Firebird (libgds).
98 Summary: Header files for Firebird library
99 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird
100 Group: Development/Libraries
101 Requires: %{name}-lib = %{version}-%{release}
102 Requires: libstdc++-devel
105 Header files for Firebird library.
107 %description devel -l pl.UTF-8
108 Pliki nagłówkowe biblioteki Firebird.
111 Summary: Static Firebird library
112 Summary(pl.UTF-8): Statyczna biblioteka Firebird
113 Group: Development/Libraries
114 Requires: %{name}-devel = %{version}-%{release}
117 Static Firebird library (libgds).
119 %description static -l pl.UTF-8
120 Statyczna biblioteka Firebird (libgds).
123 Summary: Extensive InterBase and Firebird documentation
124 Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird
128 Extensive InterBase and Firebird documentation.
130 %description doc -l pl.UTF-8
131 Obszerna dokumentacja do baz InterBase i Firebird.
134 %setup -q -n firebird-%{version}
150 install -d docs/{IB3.0,IB4.0,IB6.0}
151 unzip -q %{SOURCE1} -d docs/IB6.0
152 tar xzf %{SOURCE2} -C docs/IB4.0
153 unzip -q %{SOURCE3} -d docs/IB3.0
154 # standardize extension, also avoids gzipping by compress-doc
155 mv -f docs/IB6.0/LANGREF.{PDF,pdf}
158 rm -f src/dsql/parse.cpp
161 cd src/extern/editline
162 cp -f /usr/share/automake/config.* .
170 %{?with_ss:--enable-superserver} \
172 %{?debug:--enable-debug}
174 # OPTFLAGS for editline
175 export OPTFLAGS="%{rpmcflags}"
180 %ifarch sparc sparcv9
190 PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
191 DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
192 LIB_LINK_RPATH_LINE= \
193 LIB_CLIENT_LINK_OPTIONS="-lpthread"
195 # my name is hack. dirty hack.
196 # why isn't that build in previous make call?
197 %{__make} -C src -f ../gen/Makefile.libfbembed libfbembed \
200 PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
201 DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
202 LIB_LINK_RPATH_LINE= \
203 LIB_CLIENT_LINK_OPTIONS="-lpthread"
205 # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...)
206 /sbin/fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
209 rm -rf $RPM_BUILD_ROOT
211 %{__make} -C src -f ../gen/Makefile.install buildImageDir
213 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd}
214 install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \
215 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
217 install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
218 install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
219 cd gen/buildroot/%{ibdir}
221 cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \
222 $RPM_BUILD_ROOT%{ibdir}
223 install include/* $RPM_BUILD_ROOT%{_includedir}
224 cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
225 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
228 ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
229 ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so
231 ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
233 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
234 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/firebird
235 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
238 rm -rf $RPM_BUILD_ROOT
241 %groupadd -g 145 firebird
242 %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
246 /sbin/chkconfig --add firebird
247 %service firebird restart
250 if [ "$1" = "0" ]; then
251 %service firebird stop
252 /sbin/chkconfig --del firebird
257 if [ "$1" = "0" ]; then
259 %groupremove firebird
262 %post lib -p /sbin/ldconfig
263 %postun lib -p /sbin/ldconfig
266 %defattr(644,root,root,755)
267 %doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
268 %attr(755,root,root) %{_libdir}/libib_util.so
269 %dir %attr(770,root,firebird) %{ibdir}
270 %attr(755,root,root) %{ibdir}/UDF
271 %attr(755,root,root) %{ibdir}/bin
273 %dir %attr(770,root,firebird) %{ibdir}/intl
274 %attr(755,root,root) %{ibdir}/intl/fbintl
275 %{ibdir}/firebird.msg
276 # following files should be in /var (*.fdb) and /etc (*.conf)?
277 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security.fdb
278 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/aliases.conf
279 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/firebird.conf
281 %attr(754,root,root) /etc/rc.d/init.d/firebird
282 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
284 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
288 %defattr(644,root,root,755)
289 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
290 %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.[0-9]
291 %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.*
292 %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.[0-9]
294 # InterBase/old Firebird compatibility symlinks
295 %attr(755,root,root) %{_libdir}/libgds.so.0
296 # needed here - original libgds.so.0 didn't have soname, so some old
297 # (possibly not open-source) apps may be linked with libgds.so
298 %attr(755,root,root) %{_libdir}/libgds.so
301 %defattr(644,root,root,755)
302 %attr(755,root,root) %{_libdir}/libfbclient.so
303 %attr(755,root,root) %{_libdir}/libfbembed.so
305 %{_examplesdir}/%{name}-%{version}
308 %defattr(644,root,root,755)
309 %{_libdir}/libfbcommon.a
310 %{_libdir}/libfbstatic.a
315 %defattr(644,root,root,755)