X-Git-Url: http://git.pld-linux.org/?p=packages%2FFirebird.git;a=blobdiff_plain;f=Firebird.spec;h=3f52bf16e5980cc8945960dcfb66749504e00988;hp=8073ae3f6df4ea4cf16cf7293b8b603cea1de72b;hb=57758f3140620552e5c2d0da67e9e892aada16ca;hpb=9fa49beb4eb8ba7edab1ac1215cf63e6fc62f3f8 diff --git a/Firebird.spec b/Firebird.spec index 8073ae3..3f52bf1 100644 --- a/Firebird.spec +++ b/Firebird.spec @@ -2,25 +2,37 @@ Summary: Firebird SQL Database Server and Client tools Summary(pl): Firebird - serwer baz danych SQL oraz narzêdzia klienckie Name: Firebird # FirebirdCS/FirebirdSS (Classic Server/Super Server)? -Version: 1.0.0.796 -Release: 1 +Version: 1.5.1.4500 +Release: 0.1 License: Interbase Public License 1.0 Group: Applications/Databases -Source0: ftp://ftp.sourceforge.net/pub/sourceforge/firebird/%{name}-%{version}.src.tar.gz -Source1: ftp://ftp.sourceforge.net/pub/sourceforge/firebird/bootkit-%{version}.tar.gz -# missing isc4.gbak generated by: make isql || : ; make gdef gsec secutity_db -Source2: %{name}-isc4.gbak -# missing save.c generated by gpre after building pixar w/o save.o and then other stuff -Patch0: %{name}-bootkit-missing.patch -# dirty "fixes" for missing error contants and conflict with isql from unixODBC -Patch1: %{name}-fix.patch -# ksh supports only [! ] globs, not [^ ] -Patch2: %{name}-ksh.patch +Source0: http://dl.sourceforge.net/firebird/firebird-%{version}.tar.bz2 +# Source0-md5: d4594415a3615dd06192abdad57ae04d +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 +Patch0: %{name}-chmod.patch +Patch1: %{name}-editline.patch +Patch2: %{name}-env-overflows.patch +Patch3: %{name}-va.patch +Patch4: %{name}-morearchs.patch URL: http://firebird.sourceforge.net/ -Requires: %{name}-lib = %{version} +BuildRequires: libstdc++-devel +BuildRequires: ncurses-devel +BuildRequires: unzip +Requires: %{name}-lib = %{version}-%{release} +# official ports are x86, sparc and amd64 +# ppc added in morearchs patch +# see morearchs patch if you want to add support for more archs +ExclusiveArch: %{ix86} amd64 sparc sparcv9 ppc BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define ibdir %{_libdir}/interbase +%define specflags -fno-strict-aliasing +%define debugcflags -O1 -g -Wall -fno-strict-aliasing %description Firebird is a powerful, high-performance relational database designed @@ -46,7 +58,8 @@ Biblioteka wsp Summary: Header files for Firebird library Summary(pl): Pliki nag³ówkowe biblioteki Firebird Group: Development/Libraries -Requires: %{name}-lib = %{version} +Requires: %{name}-lib = %{version}-%{release} +Requires: libstdc++-devel %description devel Header files for Firebird library. @@ -58,7 +71,7 @@ Pliki nag Summary: Static Firebird library Summary(pl): Statyczna biblioteka Firebird Group: Development/Libraries -Requires: %{name}-devel = %{version} +Requires: %{name}-devel = %{version}-%{release} %description static Static Firebird library (libgds). @@ -66,73 +79,131 @@ Static Firebird library (libgds). %description static -l pl Statyczna biblioteka Firebird (libgds). +%package doc +Summary: Extensive InterBase and Firebird documentation +Summary(pl): Obszerna dokumentacja do baz InterBase i Firebird +Group: Documentation + +%description doc +Extensive InterBase and Firebird documentation. + +%description doc -l pl +Obszerna dokumentacja do baz InterBase i Firebird. + %prep -%setup -q -n firebird-%{version} -a1 +%setup -q -n firebird-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 -chmod u+w -R . -cp -f %{SOURCE2} misc/isc4.gbak +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} %build -INTERBASE=/usr/lib/interbase; export INTERBASE -echo 'y' | ./Configure.sh PROD -. ./Configure_SetupEnv.sh - -%{__make} firebird \ - CC="%{__cc}" \ - PROD_CFLAGS="%{rpmcflags} -fpic -DFLINTSTONE" - -# classic/super - what's the difference? -#%{__make} super_firebird - -#-Isource/interbase/include" +cd src/extern/editline +cp -f /usr/share/automake/config.* . +%{__autoconf} +cd ../../.. +%{__libtoolize} +%{__aclocal} +%{__autoconf} + +%configure \ + --prefix=%{ibdir} \ + %{?debug:--enable-debug} +# --enable-superserver + +# OPTFLAGS for editline +export OPTFLAGS="%{rpmcflags}" +%ifarch amd64 +DARCH="-DAMD64" +%else +%ifarch sparc sparcv9 +DARCH="-Dsparc" +%else +DARCH="" +%endif +%endif +%{__make} -j1 \ + PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \ + DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \ + LIB_LINK_RPATH_LINE= \ + LIB_CLIENT_LINK_OPTIONS="-lpthread" %install rm -rf $RPM_BUILD_ROOT -INTERBASE=/usr/lib/interbase; export INTERBASE -. ./Configure_SetupEnv.sh -%{__make} buildclassicimage -f firebird/install/linux/Makefile +%{__make} -C src -f ../gen/Makefile.install buildImageDir install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \ $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -cd buildroot/opt/interbase -rm -f bin/isc4.gbak -cp -af UDF bin help intl interbase.msg isc4.gdb isc_config \ +install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} +cd gen/buildroot/%{ibdir} + +cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \ $RPM_BUILD_ROOT%{ibdir} install include/* $RPM_BUILD_ROOT%{_includedir} -install lib/* $RPM_BUILD_ROOT%{_libdir} +cp -df lib/* $RPM_BUILD_ROOT%{_libdir} install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +# or libfbembed? +ln -sf libfbclient.so.1.5.0 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 +ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so + +ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a + %clean rm -rf $RPM_BUILD_ROOT +%post lib -p /sbin/ldconfig +%postun lib -p /sbin/ldconfig + %files %defattr(644,root,root,755) -%doc builds_win32/install/{*License,Readme}.txt +%doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} %attr(755,root,root) %{_libdir}/libib_util.so %dir %{ibdir} %attr(755,root,root) %{ibdir}/UDF %attr(755,root,root) %{ibdir}/bin %{ibdir}/help -%{ibdir}/intl -%{ibdir}/interbase.msg -# following two files should be in /var and /etc resp.? -%{ibdir}/isc4.gdb -%{ibdir}/isc_config +%dir %{ibdir}/intl +%attr(755,root,root) %{ibdir}/intl/fbintl +%{ibdir}/firebird.msg +# following files should be in /var (*.fdb) and /etc (*.conf)? +%{ibdir}/security.fdb +%{ibdir}/aliases.conf +%{ibdir}/firebird.conf %files lib %defattr(644,root,root,755) -# .so link needed here - library doesn't have SONAME -%attr(755,root,root) %{_libdir}/libgds.so* +%attr(755,root,root) %{_libdir}/libfbclient.so.*.*.* +%attr(755,root,root) %{_libdir}/libfbembed.so.*.*.* +# InterBase/old Firebird compatibility symlinks +%attr(755,root,root) %{_libdir}/libgds.so.0 +# needed here - original libgds.so.0 didn't have soname, so some old +# (possibly not open-source) apps may be linked with libgds.so +%attr(755,root,root) %{_libdir}/libgds.so %files devel %defattr(644,root,root,755) -%{_includedir}/* +%attr(755,root,root) %{_libdir}/libfbclient.so +%attr(755,root,root) %{_libdir}/libfbembed.so +%{_includedir}/*.h %{_examplesdir}/%{name}-%{version} %files static %defattr(644,root,root,755) +%{_libdir}/libfbcommon.a +%{_libdir}/libfbstatic.a +# compat link %{_libdir}/libgds.a + +%files doc +%defattr(644,root,root,755) +%doc docs/*