X-Git-Url: http://git.pld-linux.org/?p=packages%2FFirebird.git;a=blobdiff_plain;f=Firebird.spec;h=88671e894364472c0c8d49bc3b5f0eca3a64cae3;hp=a2c5e6e35b429a3108021e364090fda266d1c912;hb=f09ba703c57996d75e4195b442d7ed682633e539;hpb=7d87f9e073c0279ff262631dfaa238da56e3f4d9 diff --git a/Firebird.spec b/Firebird.spec index a2c5e6e..88671e8 100644 --- a/Firebird.spec +++ b/Firebird.spec @@ -1,60 +1,73 @@ # TODO: # - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha +# - check if it's fixed now (RISC_ALIGNMENT is defined) # - create classic server/super server subpackages and drop bcond # (see firebird2 on debian how to do it) -%bcond_with ss # Super Server +# - logrotate script +# +# 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 -Release: 2 -License: Interbase Public License 1.0 +Version: 2.1.3.18185 +Release: 1 +License: Interbase Public License 1.0, Initial Developer's 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: ec42bd5c85dc2f65baef185228bcc5ca +Source1: http://www.firebirdsql.org/pdfmanual/Firebird-2.1-QuickStart.pdf +# Source1-md5: 46bb1af4b94e8c8acee1d6ef2055b2d3 +# distfiles refuses this, would require some audit to allow '('/')' chars +#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_1_errorcodes.pdf +# Source9-md5: 9ab392dc349657dbcf9a9c35acd8e8db +Source100: firebird.init +Source101: firebird.sysconfig +Source102: firebird.inetd Patch0: %{name}-chmod.patch Patch1: %{name}-editline.patch Patch2: %{name}-va.patch Patch3: %{name}-morearchs.patch -Patch4: %{name}-gcc4.patch -Patch5: %{name}-fix-os-detection.dpatch -Patch6: %{name}-fix-pthreads-detect.dpatch -Patch7: %{name}-link-with-g++.dpatch -Patch8: %{name}-no-custom-errno-and-sys_XXerrXX.dpatch -Patch9: %{name}-opt-bypass-redundant-sort.dpatch -Patch10: %{name}-security-remote-preauth-crash.dpatch -Patch11: %{name}-separate-file-and-sem-perms.dpatch -Patch12: %{name}-ppc.patch -Patch13: %{name}-64bit.patch +Patch4: %{name}-FHS.patch +Patch5: %{name}-64bit.patch URL: http://www.firebirdsql.org/ -BuildRequires: autoconf +BuildRequires: autoconf >= 2.56 BuildRequires: automake BuildRequires: bison +BuildRequires: libedit-devel +BuildRequires: libicu-devel BuildRequires: libstdc++-devel BuildRequires: libtool -BuildRequires: ncurses-devel +BuildRequires: psmisc >= 22.5-2 BuildRequires: rpmbuild(macros) >= 1.268 -BuildRequires: unzip +BuildRequires: sed >= 4.0 +Requires: %{name}-dirs = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release} %if %{with ss} Requires(post,preun): /sbin/chkconfig Requires: rc-scripts %endif -# official ports are x86, sparc and x86_64 -# alpha and ppc added in morearchs patch -# see morearchs patch if you want to add support for more archs -ExclusiveArch: %{ix86} %{x8664} sparc sparcv9 alpha ppc +# official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64 +# alpha is added in morearchs patch +# see morearchs patch if you want more +ExclusiveArch: %{ix86} %{x8664} arm ia64 mips mipsel ppc sparc sparcv9 alpha BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define ibdir %{_libdir}/interbase @@ -83,6 +96,17 @@ Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann. Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass auch Datenbankdateien über 2GB erzeugt werden können. +%package dirs +Summary: Firebird SQL Database common directories +Summary(pl.UTF-8): Firebird - wspólne katalogi +Group: Applications/Databases + +%description dirs +Firebird SQL Database common directories. + +%description dirs -l pl.UTF-8 +Firebird - wspólne katalogi. + %package lib Summary: Firebird shared library Summary(pl.UTF-8): Biblioteka współdzielona Firebird @@ -98,6 +122,7 @@ Biblioteka współdzielona Firebird (libgds). Summary: Header files for Firebird library Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird Group: Development/Libraries +Requires: %{name}-dirs = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release} Requires: libstdc++-devel @@ -131,48 +156,37 @@ Extensive InterBase and Firebird documentation. 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 -%patch13 -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} + +%{__sed} -i 's,@prefix@,%{_prefix},' builds/install/misc/fb_config.in # force rebuild rm -f src/dsql/parse.cpp +mkdir docs +cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} docs + %build -cd src/extern/editline -cp -f /usr/share/automake/config.* . -%{__autoconf} -cd ../../.. %{__libtoolize} %{__aclocal} %{__autoconf} %configure \ + --with-editline \ + --with-gnu-ld \ + --with-gpre-pascal \ + --with-system-editline \ + --with-system-icu \ %{?with_ss:--enable-superserver} \ --prefix=%{ibdir} \ %{?debug:--enable-debug} -# OPTFLAGS for editline -export OPTFLAGS="%{rpmcflags}" DARCH="" %ifarch %{x8664} DARCH="-DAMD64" @@ -192,47 +206,43 @@ DARCH="-DPPC" LIB_LINK_RPATH_LINE= \ LIB_CLIENT_LINK_OPTIONS="-lpthread" -# my name is hack. dirty hack. -# why isn't that build in previous make call? -%{__make} -C src -f ../gen/Makefile.libfbembed libfbembed \ - CC="%{__cc}" \ - CXX="%{__cxx}" \ - 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" - # 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 %{__make} -C src -f ../gen/Makefile.install buildImageDir -install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd} +install -d $RPM_BUILD_ROOT/etc/{firebird,rc.d/init.d,sysconfig/rc-inetd} install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \ +install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \ $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir} -cd gen/buildroot/%{ibdir} +touch $RPM_BUILD_ROOT/var/log/firebird.log -cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \ - $RPM_BUILD_ROOT%{ibdir} +cd gen/buildroot/%{ibdir} +install security2.fdb $RPM_BUILD_ROOT/var/lib/firebird +install *.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird install include/* $RPM_BUILD_ROOT%{_includedir} +cp -af UDF bin help intl firebird.msg $RPM_BUILD_ROOT%{ibdir} cp -df lib/* $RPM_BUILD_ROOT%{_libdir} -install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} # or libfbembed? -ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 -ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so +ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 +ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so 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 @@ -262,21 +272,36 @@ fi %post lib -p /sbin/ldconfig %postun lib -p /sbin/ldconfig +%triggerpostun -- %{name} < 2.1.1.17910-2 +if [ -f %{ibdir}/aliases.conf.rpmsave ]; then + mv -f %{ibdir}/aliases.conf.rpmsave %{_sysconfdir}/firebird/aliases.conf +fi +if [ -f %{ibdir}/firebird.conf.rpmsave ]; then + mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf +fi +if [ -f %{ibdir}/security2.fdb.rpmsave ]; then + mv -f %{ibdir}/security2.fdb.rpmsave /var/lib/firebird/security2.fdb +fi + %files %defattr(644,root,root,755) -%doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} +%doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} +%dir %{_sysconfdir}/firebird +%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/*.conf %attr(755,root,root) %{_libdir}/libib_util.so -%dir %attr(770,root,firebird) %{ibdir} %attr(755,root,root) %{ibdir}/UDF -%attr(755,root,root) %{ibdir}/bin +%attr(755,root,root) %{ibdir}/bin/* +%exclude %{ibdir}/bin/fb_config %{ibdir}/help %dir %attr(770,root,firebird) %{ibdir}/intl %attr(755,root,root) %{ibdir}/intl/fbintl +# should it be moved to /etc and marked as config? +%{ibdir}/intl/fbintl.conf %{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(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 +%dir %attr(770,root,firebird) /var/lib/firebird +%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security2.fdb +%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log + %if %{with ss} %attr(754,root,root) /etc/rc.d/init.d/firebird %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird @@ -284,12 +309,17 @@ fi %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird %endif +%files dirs +%defattr(644,root,root,755) +%dir %{ibdir} +%dir %{ibdir}/bin + %files lib %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libfbclient.so.[0-9] +%attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2 %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libfbembed.so.[0-9] +%attr(755,root,root) %ghost %{_libdir}/libfbembed.so.2.1 # InterBase/old Firebird compatibility symlinks %attr(755,root,root) %{_libdir}/libgds.so.0 @@ -301,12 +331,15 @@ fi %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libfbclient.so %attr(755,root,root) %{_libdir}/libfbembed.so -%{_includedir}/*.h +%attr(755,root,root) %{ibdir}/bin/fb_config +%{_includedir}/ib_util.h +%{_includedir}/ibase.h +%{_includedir}/iberror.h +%{_includedir}/perf.h %{_examplesdir}/%{name}-%{version} %files static %defattr(644,root,root,755) -%{_libdir}/libfbcommon.a %{_libdir}/libfbstatic.a # compat link %{_libdir}/libgds.a