%define pkg_name %{name}-%{version}-0 %define major %(echo %version | cut -d. -f 1-3) Name: Firebird Version: 2.1.3.18185 Release: 1mamba Summary: SQL Relational Database Group: Applications/Databases Vendor: openmamba Distribution: openmamba Packager: gil URL: http://www.firebirdsql.org/ Source0: http://downloads.sourceforge.net/project/firebird/firebird/%{major}-Release/Firebird-%{version}-0.tar.bz2 Source1: Firebird-2.1.2.18118.0-profile.sh Source2: Firebird-2.1.2.18118.0-profile.csh Source3: Firebird-2.1.2.18118.0-logrotate Patch0: Firebird-2.1.3.18185-fix-initscript.patch Patch1: Firebird-2.1.2.18118.0-doc.patch Patch2: Firebird-2.1.2.18118.0-mcpu-to-mtune.patch Patch3: Firebird-2.1.2.18118.0-lock-file-location.patch Patch4: Firebird-2.1.3.18185-gcc-icu.patch License: Interbase Public license BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: libtool BuildRequires: libtermcap-devel ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libgcc BuildRequires: libicu-devel BuildRequires: libncurses-devel BuildRequires: libstdc++6-devel ## AUTOBUILDREQ-END Requires: libfbclient-%{name} BuildRoot: %{_tmppath}/%{name}-%{version}-root %description %{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. %{name} offers excellent concurrency, high performance,and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names, since 1981. The %{name} Project is a commercially independent project of C and C++ programmers, technical advisors and supporters developing and enhancing a multi-platform relational database management system based on the source code released by Inprise Corp (now known as Borland Software Corp) on 25 July, 2000. %package classic Group: Applications/Databases Summary: Classic (xinetd) server for %{name} SQL RDBMS Requires: xinetd Requires: %{name} = %{version}-%{release} Conflicts: %{name}-superserver Requires: libfbembed-%{name} = %{version}-%{release} %description classic %{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. This is the classic (xinetd) server %{name} SQL RDBMS. It can also be used as an embedded server, when paired with the client-embedded package. %package devel Group: Applications/Databases Summary: Development Libraries for %{name} SQL RDBMS Requires: libfbclient-%{name} = %{version}-%{release} Requires: libfbembed-%{name} = %{version}-%{release} %description devel %{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. This package contains development libraries for %{name}. %package doc Group: Documentation Summary: Documentation for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description doc %{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. This package contains documentation for %{name}. %package -n libfbclient-%{name} Group: System/Libraries Summary: Multi-threaded, non-local client libraries for Firebird SQL RDBMS %description -n libfbclient-%{name} %{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. This package contains multi-threaded, non-local client libraries for Firebird SQL Database %package -n libfbembed-%{name} Group: System/Libraries Summary: Multi-process, local client libraries for Firebird SQL RDBMS %description -n libfbembed-%{name} %{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. This package contains multi-process, local client libraries for Firebird SQL RDBMS %package superserver Group: Applications/Databases Summary: Superserver (single process) server for %{name} SQL RDBMS Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Conflicts: %{name}-classic %description superserver %{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. This is the Superserver (single process) %{name} SQL RDBMS. %prep %setup -q -n %{name}-%{version}-0 iconv -f ISO-8859-1 -t utf-8 -c doc/README.intl -o doc/README.intl %patch0 -p0 #%patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p0 %build # build classic autoreconf -vfi %configure \ --prefix=%{_libdir}/firebird \ --with-system-icu # parallel build is broken make cd gen ./install/makeInstallImage.sh mv ./buildroot/ buildroot-classic chmod 644 ./buildroot-classic%{_libdir}/firebird/help/help.fdb cd .. # build superserver %configure \ --prefix=%{_libdir}/firebird \ --enable-superserver \ --with-system-icu # parallel build is broken make cd gen ./install/makeInstallImage.sh mv ./buildroot/ buildroot-superserver chmod 644 ./buildroot-superserver%{_libdir}/firebird/help/help.fdb %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" install -d %{buildroot} cd %{buildroot} mkdir -p %{buildroot}%{_sysconfdir}/firebird mkdir -p %{buildroot}%{_initrddir} mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d mkdir -p %{buildroot}%{_sysconfdir}/profile.d mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d mkdir -p %{buildroot}%{_var}/run/firebird mkdir -p %{buildroot}%{_localstatedir}/lib/firebird/data mkdir -p %{buildroot}%{_localstatedir}/log/firebird mkdir -p %{buildroot}%{_includedir}/firebird mkdir -p %{buildroot}%{_libdir}/firebird/help mkdir -p %{buildroot}%{_libdir}/firebird/intl mkdir -p %{buildroot}%{_libdir}/firebird/lib mkdir -p %{buildroot}%{_libdir}/firebird/include mkdir -p %{buildroot}%{_libdir}/firebird/bin-classic mkdir -p %{buildroot}%{_libdir}/firebird/UDF-classic mkdir -p %{buildroot}%{_libdir}/firebird/bin-superserver mkdir -p %{buildroot}%{_libdir}/firebird/UDF-superserver mkdir -p %{buildroot}%{_bindir} pushd %{_builddir}/%{name}-%{version}-0/gen pushd buildroot-classic%{_libdir}/firebird cp examples/empbuild/employee.fdb %{buildroot}%{_localstatedir}/lib/firebird/data/employee.fdb cp help/help.fdb %{buildroot}%{_libdir}/firebird/help/help.fdb cp *.msg %{buildroot}%{_libdir}/firebird cp intl/fbintl %{buildroot}%{_libdir}/firebird/intl/fbintl cp lib/libib_util.so %{buildroot}%{_libdir}/firebird/lib/ cp lib/libfbclient.so.%{major} %{buildroot}%{_libdir}/firebird/lib/ cp lib/libfbembed.so.%{major} %{buildroot}%{_libdir}/firebird/lib/ cp bin/* %{buildroot}%{_libdir}/firebird/bin-classic/ cp UDF/* %{buildroot}%{_libdir}/firebird/UDF-classic/ popd pushd buildroot-superserver%{_libdir}/firebird cp bin/* %{buildroot}%{_libdir}/firebird/bin-superserver/ cp UDF/* %{buildroot}%{_libdir}/firebird/UDF-superserver/ popd popd ( cd %{buildroot}%{_libdir}/firebird/bin-superserver/ ln -s /fbmgr.bin ./fbmgr ) ( cd %{buildroot}%{_libdir}/firebird/lib/ ln -s libfbembed.so.%{major} %{buildroot}%{_libdir}/firebird/lib/libfbembed.so.2.1 ln -s libfbembed.so.2.1 %{buildroot}%{_libdir}/firebird/lib/libfbembed.so ln -s libfbclient.so.%{major} %{buildroot}%{_libdir}/firebird/lib/libfbclient.so.2 ln -s libfbclient.so.2 %{buildroot}%{_libdir}/firebird/lib/libfbclient.so ) ( cd %{buildroot}%{_libdir}/firebird/lib ln -s libfbembed.so %{buildroot}%{_libdir}/libfbembed.so ln -s libfbembed.so.2.1 %{buildroot}%{_libdir}/libfbembed.so.2.1 ln -s libfbembed.so.%{major} %{buildroot}%{_libdir}/libfbembed.so.%{major} ln -s libfbclient.so %{buildroot}%{_libdir}/libfbclient.so ln -s libfbclient.so.2 %{buildroot}%{_libdir}/libfbclient.so.2 ln -s libfbclient.so.%{major} %{buildroot}%{_libdir}/libfbclient.so.%{major} ln -s libib_util.so %{buildroot}%{_libdir}/libib_util.so ) echo 1 > %{buildroot}%{_localstatedir}/log/firebird/firebird.log ln -s %{_localstatedir}/log/firebird/firebird.log %{buildroot}%{_libdir}/firebird/firebird.log sed "s@firebird.log@%{_localstatedir}/log/firebird/firebird.log@g" %{SOURCE3} > %{buildroot}%{_sysconfdir}/logrotate.d/firebird cp %{_builddir}/%{name}-%{version}-0/gen/buildroot-classic%{_libdir}/firebird/include/* %{buildroot}%{_includedir}/firebird/ ( cd %{buildroot}%{_includedir}/firebird ln -s ibase.h %{buildroot}%{_libdir}/firebird/include/ibase.h ln -s iberror.h %{buildroot}%{_libdir}/firebird/include/iberror.h ln -s ib_util.h %{buildroot}%{_libdir}/firebird/include/ib_util.h ln -s perf.h %{buildroot}%{_libdir}/firebird/include/perf.h ) pushd %{_builddir}/%{name}-%{version}-0/gen cp buildroot-classic%{_libdir}/firebird/aliases.conf %{buildroot}%{_sysconfdir}/firebird/aliases.conf sed "s@%{_libdir}/firebird/examples/empbuild@%{_localstatedir}/lib/firebird/data@" -i %{buildroot}%{_sysconfdir}/firebird/aliases.conf cp buildroot-classic%{_libdir}/firebird/firebird.conf %{buildroot}%{_sysconfdir}/firebird/firebird.conf cp buildroot-classic%{_libdir}/firebird/intl/fbintl.conf %{buildroot}%{_sysconfdir}/firebird/fbintl.conf cp buildroot-classic%{_libdir}/firebird/security2.fdb %{buildroot}%{_sysconfdir}/firebird/security2.fdb ln -s %{_sysconfdir}/firebird/aliases.conf %{buildroot}%{_libdir}/firebird/aliases.conf ln -s %{_sysconfdir}/firebird/firebird.conf %{buildroot}%{_libdir}/firebird/firebird.conf ln -s %{_sysconfdir}/firebird/security2.fdb %{buildroot}%{_libdir}/firebird/security2.fdb ln -s %{_sysconfdir}/firebird/fbintl.conf %{buildroot}%{_libdir}/firebird/intl/fbintl.conf popd sed "s@__FIRE_DIR__@%{_libdir}/firebird@g" %{SOURCE1} > %{buildroot}%{_sysconfdir}/profile.d/firebird.sh sed "s@__FIRE_DIR__@%{_libdir}/firebird@g" %{SOURCE2} > %{buildroot}%{_sysconfdir}/profile.d/firebird.csh pushd %{_builddir}/%{name}-%{version}-0/gen cp buildroot-classic%{_libdir}/firebird/misc/firebird.xinetd \ %{buildroot}%{_sysconfdir}/xinetd.d/firebird cp buildroot-superserver%{_libdir}/firebird/misc/firebird.init.d.mandrake \ %{buildroot}%{_initrddir}/firebird popd sed "s@chkconfig: 345@chkconfig: -@" -i %{buildroot}%{_initrddir}/firebird ( cd %{buildroot} ln -s bin-superserver %{buildroot}%{_libdir}/firebird/bin ln -s %{_var}/run/firebird %{buildroot}%{_libdir}/firebird/run ln -s %{_libdir}/firebird/bin/isql %{buildroot}%{_bindir}/fbsql ln -s %{_libdir}/firebird/bin/gbak %{buildroot}%{_bindir}/gbak ln -s %{_libdir}/firebird/bin/gfix %{buildroot}%{_bindir}/gfix ln -s %{_libdir}/firebird/bin/gsec %{buildroot}%{_bindir}/gsec ln -s %{_libdir}/firebird/bin/nbackup %{buildroot}%{_bindir}/nbackup ln -s %{_libdir}/firebird/bin/gstat %{buildroot}%{_bindir}/gstat ) %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %dir %{_libdir}/firebird %dir %{_libdir}/firebird/lib %dir %{_sysconfdir}/firebird %config(noreplace) %attr(664,firebird,firebird) %{_sysconfdir}/firebird/aliases.conf %config(noreplace) %attr(664,firebird,firebird) %{_sysconfdir}/firebird/fbintl.conf %config(noreplace) %attr(664,firebird,firebird) %{_sysconfdir}/firebird/firebird.conf %config(noreplace) %attr(660,firebird,firebird) %{_sysconfdir}/firebird/security2.fdb %config(noreplace) %attr(644,root,root) %{_sysconfdir}/logrotate.d/firebird %config(noreplace) %attr(644,root,root) %{_sysconfdir}/profile.d/firebird.csh %config(noreplace) %attr(644,root,root) %{_sysconfdir}/profile.d/firebird.sh %dir %{_localstatedir}/log/firebird %attr(664,firebird,firebird) %{_localstatedir}/log/firebird/firebird.log %dir %attr(770,firebird,firebird) %{_localstatedir}/lib/firebird/data %attr(660,firebird,firebird) %{_localstatedir}/lib/firebird/data/employee.fdb %attr(755,root,root) %{_bindir}/fbsql %attr(755,root,root) %{_bindir}/gbak %attr(755,root,root) %{_bindir}/gfix %attr(755,root,root) %{_bindir}/gsec %attr(755,root,root) %{_bindir}/gstat %attr(755,root,root) %{_bindir}/nbackup %attr(755,root,root) %{_libdir}/firebird/intl/fbintl %attr(644,root,root) %{_libdir}/firebird/aliases.conf %attr(644,root,root) %{_libdir}/firebird/firebird.conf %attr(644,root,root) %{_libdir}/firebird/intl/fbintl.conf %attr(644,root,root) %{_libdir}/firebird/firebird.log %attr(644,root,root) %{_libdir}/firebird/firebird.msg %attr(644,root,root) %{_libdir}/firebird/help/help.fdb %attr(644,root,root) %{_libdir}/libib_util.so %attr(644,root,root) %{_libdir}/firebird/lib/libib_util.so %attr(660,root,root) %{_libdir}/firebird/security2.fdb %doc ChangeLog doc/license/IDPL.txt %doc doc/license/README.license.usage.txt %files classic %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/xinetd.d/firebird %dir %{_libdir}/firebird/bin-classic %dir %{_libdir}/firebird/UDF-classic %attr(755,root,root) %{_libdir}/firebird/bin-classic/* %attr(755,root,root) %{_libdir}/firebird/UDF-classic/*.so %attr(755,root,root) %{_libdir}/firebird/UDF-classic/*.sql %doc doc/license/IDPL.txt %doc doc/license/README.license.usage.txt %files devel %defattr(-,root,root) %dir %{_libdir}/firebird/include %attr(644,root,root) %{_libdir}/firebird/include/* %attr(644,root,root) %{_includedir}/* %attr(644,root,root) %{_libdir}/firebird/lib/libfbclient.so %attr(644,root,root) %{_libdir}/firebird/lib/libfbembed.so %attr(644,root,root) %{_libdir}/libfbclient.so %attr(644,root,root) %{_libdir}/libfbembed.so %files doc %defattr(-,root,root) %doc gen/buildroot-classic%{_libdir}/firebird/doc %doc gen/buildroot-classic%{_libdir}/firebird/examples %doc gen/buildroot-classic%{_libdir}/firebird/README %doc gen/buildroot-classic%{_libdir}/firebird/misc/intl.sql %doc gen/buildroot-classic%{_libdir}/firebird/misc/upgrade %files -n libfbclient-%{name} %defattr(-,root,root) %attr(755,root,root) %{_libdir}/libfbclient.so.* %attr(755,root,root) %{_libdir}/firebird/lib/libfbclient.so.* %doc doc/license/IDPL.txt %doc doc/license/README.license.usage.txt %files -n libfbembed-%{name} %defattr(-,root,root) %attr(755,root,root) %{_libdir}/libfbembed.so.* %attr(755,root,root) %{_libdir}/firebird/lib/libfbembed.so.* %doc doc/license/IDPL.txt %doc doc/license/README.license.usage.txt %files superserver %defattr(-,root,root) %{_libdir}/firebird/bin %dir %{_libdir}/firebird/bin-superserver %dir %{_libdir}/firebird/UDF-superserver %attr(755,root,root) %{_initrddir}/firebird %attr(755,root,root) %{_libdir}/firebird/bin-superserver/* %attr(755,root,root) %{_libdir}/firebird/UDF-superserver/*.so %attr(644,root,root) %{_libdir}/firebird/UDF-superserver/*.sql %attr(755,root,root) %{_libdir}/firebird/run %doc doc/license/IDPL.txt %doc doc/license/README.license.usage.txt %changelog * Wed Jun 30 2010 Automatic Build System 2.1.3.18185-1mamba - update to 2.1.3.18185 * Wed Jun 30 2010 Automatic Build System 2.1.2.18118-3mamba - automatic rebuild by autodist * Wed Jan 13 2010 Silvan Calarco 2.1.2.18118.0-2mamba - fix symlink to client binaries - changes to support automatic rebuilds * Tue May 12 2009 gil 2.1.2.18118.0-1mamba - package created by autospec