# - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha
# - create classic server/super server subpackages and drop bcond
# (see firebird2 on debian how to do it)
-%bcond_with ss # Super Server
+#
+# Conditional build:
+%bcond_with ss # Super Server (standalone daemon instead of inetd service)
+#
Summary: Firebird SQL Database Server and Client tools
Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems
Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie
Name: Firebird
# FirebirdCS/FirebirdSS (Classic Server/Super Server)?
-Version: 1.5.4.4910
+Version: 2.1.0.17798
Release: 1
License: Interbase Public License 1.0
Group: Applications/Databases
-Source0: http://dl.sourceforge.net/firebird/firebird-%{version}.tar.bz2
-# Source0-md5: 6655190f760217845623a75001b6ddd4
-Source1: http://www.ibphoenix.com/downloads/60All.zip
-# Source1-md5: f86a132012361cd4ae88563105741a4c
-Source2: http://www.ibphoenix.com/downloads/ib_4_0_docs.tar.gz
-# Source2-md5: f4176d5dec952ee774bb8ee74c1f715d
-Source3: http://www.ibphoenix.com/downloads/isc_docs.zip
-# Source3-md5: 66eef71c188215d10988788282c014a7
-Source4: firebird.init
-Source5: firebird.sysconfig
-Source6: firebird.inetd
+Source0: http://dl.sourceforge.net/firebird/Firebird-%{version}-0.tar.bz2
+# Source0-md5: e663417416b4dc808d6ace991e6b783f
+Source1: http://www.firebirdsql.org/pdfmanual/Firebird-2.0-QuickStart.pdf
+# Source1-md5: 676e5b294a04e3cd12b9298a776e19eb
+Source2: http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf
+# Source2-md5: 9eb90583c200bdd7292a80ecc1df1178
+Source3: http://www.firebirdsql.org/pdfmanual/Firebird-Null-Guide.pdf
+# Source3-md5: d1f8ba75fe3bb9eb9d203ce3f82a1a1a
+Source4: http://www.firebirdsql.org/pdfmanual/Firebird-Generator-Guide.pdf
+# Source4-md5: 44e7568ef477072a8ad5f381c3e12a75
+Source5: http://www.firebirdsql.org/pdfmanual/MSSQL-to-Firebird.pdf
+# Source5-md5: 1bd4a168e550910fc899e2aa125d83a3
+Source6: http://www.firebirdsql.org/pdfmanual/Firebird-nbackup.pdf
+# Source6-md5: 7ef8a8b9a899d06bec2a5da0bb5fea0e
+Source7: http://www.firebirdsql.org/pdfmanual/Firebird-Utils-WIP.pdf
+# Source7-md5: 39b9a4f3c9d9e27d985e9277ae163ceb
+Source8: http://www.firebirdnews.org/docs/fb2min.pdf
+# Source8-md5: ebac312c0afbe97b1850bdc74c553c28
+Source9: http://www.firebirdsql.org/doc/contrib/fb_2_0_errorcodes.pdf
+# Source9-md5: 2acf2ff63c4ba3a1c590989e19bb253e
+Source100: firebird.init
+Source101: firebird.sysconfig
+Source102: firebird.inetd
Patch0: %{name}-chmod.patch
Patch1: %{name}-editline.patch
Patch2: %{name}-va.patch
Patch10: %{name}-security-remote-preauth-crash.dpatch
Patch11: %{name}-separate-file-and-sem-perms.dpatch
Patch12: %{name}-ppc.patch
+Patch13: %{name}-64bit.patch
URL: http://www.firebirdsql.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
+BuildRequires: libicu-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
+BuildRequires: psmisc >= 22.5-2
BuildRequires: rpmbuild(macros) >= 1.268
-BuildRequires: unzip
Requires: %{name}-lib = %{version}-%{release}
%if %{with ss}
Requires(post,preun): /sbin/chkconfig
Obszerna dokumentacja do baz InterBase i Firebird.
%prep
-%setup -q -n firebird-%{version}
+%setup -q -n Firebird-%{version}-0
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-install -d docs/{IB3.0,IB4.0,IB6.0}
-unzip -q %{SOURCE1} -d docs/IB6.0
-tar xzf %{SOURCE2} -C docs/IB4.0
-unzip -q %{SOURCE3} -d docs/IB3.0
-# standardize extension, also avoids gzipping by compress-doc
-mv -f docs/IB6.0/LANGREF.{PDF,pdf}
+# OBSOLETE?
+# %patch1 -p1
+# ???
+# %patch2 -p1
+# looks obsolete (but not fully)
+# %patch3 -p1
+# %patch4 -p1
+# %patch5 -p1
+# %patch6 -p1
+# %patch7 -p1
+# %patch8 -p1
+# %patch9 -p1
+# %patch10 -p1
+# %patch11 -p1
+# %patch12 -p1
+# %patch13 -p1
# force rebuild
rm -f src/dsql/parse.cpp
%build
-cd src/extern/editline
-cp -f /usr/share/automake/config.* .
-%{__autoconf}
-cd ../../..
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%configure \
+ --with-editline \
+ --with-system-editline \
+ --with-system-icu \
+ --with-gnu-ld \
%{?with_ss:--enable-superserver} \
--prefix=%{ibdir} \
%{?debug:--enable-debug}
LIB_CLIENT_LINK_OPTIONS="-lpthread"
# fb_lock_mgr is started during build - try to stop it (if /proc is mounted...)
-/sbin/fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
+fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
%install
rm -rf $RPM_BUILD_ROOT
install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
cd gen/buildroot/%{ibdir}
-cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \
+cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security2.fdb \
$RPM_BUILD_ROOT%{ibdir}
install include/* $RPM_BUILD_ROOT%{_includedir}
cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/firebird
-install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
+%if %{with ss}
+install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
+install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
+%else
+install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{ibdir}/intl/fbintl
%{ibdir}/firebird.msg
# following files should be in /var (*.fdb) and /etc (*.conf)?
-%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security.fdb
+%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security2.fdb
%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/aliases.conf
%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/firebird.conf
%if %{with ss}