%define groupid 65055 %define userid 65055 %define pkg_name %{name}-%{version}-0 %define major %(echo %version | cut -d. -f 1-3) %define major_ %(echo %version | cut -d. -f 1-3 | tr . _) %define majver %(echo %version | cut -d. -f 1-2) Name: firebird Version: 3.0.3.32900 Release: 1mamba Summary: SQL Relational Database Group: Applications/Databases Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.firebirdsql.org/ Source0: https://github.com/FirebirdSQL/firebird/releases/download/R%{major_}/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 Source4: firebird.service Source5: firebird-tmpfiles.conf Source6: firebird-sysusers.conf Source7: firebird-default.password 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 Patch5: %{name}-2.1.4.18393-gcc45.patch Patch6: firebird-2.1.4-gcc-4.7.patch Patch7: firebird-2.1.5-system-icu.patch Patch8: firebird-2.5.2.26540-makeInstallImage-noroot.patch Patch9: firebird-3.0.1.32609-gcc-6.2.0.patch Patch10: firebird-3.0.2.32703-c++11.patch Patch11: firebird-3.0.2.32703-c++14.patch Patch12: firebird-3.0.3.32900-icu-60.patch License: MPL 1.1 ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libedit-devel BuildRequires: libgcc BuildRequires: libncurses-devel BuildRequires: libstdc++6-devel BuildRequires: libtommath-devel ## AUTOBUILDREQ-END BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: libtool BuildConflicts: libfbclient < 3.0 #BuildConflicts: libfbembed-firebird Requires: libfbclient = %{version}-%{release} Provides: Firebird Obsoletes: Firebird %systemd_requires Provides: firebird-classic Obsoletes: firebird-classic 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} Provides: Firebird-classic Obsoletes: Firebird-classic %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 = %{version}-%{release} #Requires: libfbembed-%{name} = %{version}-%{release} Provides: Firebird-devel Obsoletes: Firebird-devel %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} Provides: Firebird-doc Obsoletes: Firebird-doc %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 Group: System/Libraries Summary: Multi-threaded, non-local client libraries for Firebird SQL RDBMS Provides: libfbclient-Firebird Obsoletes: libfbclient-Firebird Provides: libfbclient-firebird Obsoletes: libfbclient-firebird %description -n libfbclient %{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 Group: System/Libraries Summary: Multi-process, local client libraries for Firebird SQL RDBMS Provides: libfbembed-Firebird Obsoletes: libfbembed-Firebird Provides: libfbembed-firebird Obsoletes: libfbembed-firebird %description -n libfbembed %{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 Provides: Firebird-superserver Obsoletes: Firebird-superserver %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 Firebird-%{version}-0 #-D -T #:<< __EOF #%patch10 -p1 #%patch11 -p0 %patch12 -p1 %build #:<< __EOF # build superserver ./autogen.sh #autoreconf -vfi #autoreconf %configure \ --prefix=%{_prefix} \ --with-fbbin=%{_bindir} \ --with-fbconf=%{_sysconfdir}/firebird \ --with-fbdoc=%{_docdir}/firebird \ --with-fbglock=/run/firebird \ --with-fbhelp=%{_docdir}/firebird/help \ --with-fbinclude=%{_includedir}/firebird \ --with-fblib=%{_libdir} \ --with-fblock=/run/firebird \ --with-fblog=/var/log/ \ --with-fbmsg=%{_libdir}/firebird/msg \ --with-fbplugins=%{_libdir}/firebird/plugins \ --with-fbsbin=%{_libdir}/firebird/bin \ --with-fbudf=%{_libdir}/firebird/UDF \ --with-fbsecure-db=/var/lib/firebird/system \ --with-fbintl=%{_libdir}/firebird/intl \ --without-fbmisc \ --without-fbsample \ --without-fbsample-db \ --enable-superserver \ --with-system-icu \ --with-system-editline #chmod u+w gen/* -R # FIXME: 3.0.1.32609 segfaults when creating fdb files %make -j1 CXXFLAGS='-flifetime-dse=1' %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" sed -i "s|whoami|echo root|;s|chown|#chown|;" gen/install/makeInstallImage.sh cd gen ./install/makeInstallImage.sh cd .. install -d -m0755 %{buildroot} cp -av gen/buildroot/* %{buildroot}/ install -Dm644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/firebird.conf install -Dm644 %{SOURCE6} %{buildroot}%{_sysusersdir}/firebird.conf install -Dm644 %{SOURCE4} %{buildroot}%{_unitdir}/firebird.service install -Dm440 %{SOURCE7} %{builroott}/var/lib/firebird/system/SYSDBA.password install -Dm644 %{buildroot}%{_sysconfdir}/firebird/I{,D}PLicense.txt -t %{buildroot}%{_datadir}/licenses/%{name} # Remove unused files and dirs rm %{buildroot}%{_sysconfdir}/firebird/I{,D}PLicense.txt rm %{buildroot}%{_sysconfdir}/firebird/README rm %{buildroot}%{_sysconfdir}/firebird/WhatsNew rm -rf %{buildroot}/var/log rm -rf %{buuildroot}/run mv %{buildroot}%{_bindir}/isql{,-fb} chmod -R ugo-w %{buildroot}%{_docdir}/firebird chmod -R o= %{buildroot}/var/lib/firebird chmod u+w -R %{buildroot}%{_docdir}/firebird #chown -R 184:184 $pkgdir/var/lib/firebird ln -s %{_libdir}/firebird/bin/fb_config %{buildroot}%{_bindir}/fb_config %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" rm -rf gen %pre if [ $1 -ge 1 ]; then /usr/sbin/groupadd firebird -g %{groupid} 2>/dev/null /usr/sbin/useradd -u %{userid} -c 'Firebird user' -d /dev/null -g firebird \ -s /bin/false firebird 2>/dev/null fi exit 0 %preun if [ $1 -eq 0 ]; then /usr/sbin/userdel firebird 2>/dev/null /usr/sbin/groupdel firebird 2>/dev/null fi exit 0 %files %defattr(-,root,root) %dir %{_sysconfdir}/firebird %config %{_sysconfdir}/firebird/databases.conf %config %{_sysconfdir}/firebird/plugins.conf %config %{_sysconfdir}/firebird/fbtrace.conf %config(noreplace) %attr(664,firebird,firebird) %{_sysconfdir}/firebird/firebird.conf %{_bindir}/fbsvcmgr %{_bindir}/fbtracemgr #%{_bindir}/gdef %{_bindir}/gpre %{_bindir}/gsplit %{_bindir}/isql-fb %{_bindir}/qli %{_bindir}/gbak %{_bindir}/gfix %{_bindir}/gsec %{_bindir}/gstat %{_bindir}/nbackup #%{_unitdir}/firebird-classic.socket #%{_unitdir}/firebird-classic@.service %dir %{_libdir}/firebird #%{_libdir}/firebird/databases.conf #%{_libdir}/firebird/firebird.conf %{_libdir}/firebird/intl/fbintl.conf #%{_libdir}/firebird/plugins.conf #%dir %{_libdir}/firebird/lib #%{_libdir}/firebird/fbtrace.conf %dir %{_libdir}/firebird/UDF #%{_libdir}/firebird/UDF/fbudf.so %{_libdir}/firebird/UDF/fbudf.sql #%{_libdir}/firebird/UDF/ib_udf.so %{_libdir}/firebird/UDF/ib_udf.sql %{_libdir}/firebird/UDF/ib_udf2.sql %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 -n libfbclient %defattr(-,root,root) %attr(755,root,root) %{_libdir}/libfbclient.so.* %dir %{_libdir}/firebird %dir %{_libdir}/firebird/plugins %{_libdir}/firebird/plugins/*.so %dir %{_libdir}/firebird/plugins/udr %{_libdir}/firebird/plugins/udr/*.so %{_libdir}/firebird/plugins/udr_engine.conf %dir %{_libdir}/firebird/UDF %{_libdir}/firebird/UDF/*.so %{_libdir}/firebird/intl/fbintl #%{_libdir}/firebird/msg/de_DE.msg %{_libdir}/firebird/msg/firebird.msg #%{_libdir}/firebird/msg/fr_FR.msg %dir %{_libdir}/firebird/bin %{_libdir}/firebird/bin/* ##%doc doc/license/IDPL.txt ##%doc doc/license/README.license.usage.txt %files devel %defattr(-,root,root) %{_bindir}/fb_config %{_includedir}/*.h %dir %{_includedir}/firebird %{_includedir}/firebird/* %{_libdir}/libfbclient.so %{_libdir}/libib_util.so %files doc %defattr(-,root,root) %dir %{_datadir}/licenses/firebird %{_datadir}/licenses/firebird/* %dir %{_datadir}/doc/firebird %{_datadir}/doc/firebird/* #%files -n libfbembed #%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) %{_unitdir}/firebird.service %{_sysusersdir}/firebird.conf %{_tmpfilesdir}/firebird.conf %attr(660,firebird,firebird) %{_localstatedir}/lib/firebird/system/security3.fdb #%doc doc/license/IDPL.txt #%doc doc/license/README.license.usage.txt %changelog * Fri May 04 2018 Silvan Calarco 3.0.3.32900-1mamba - update to 3.0.3.32900 * Fri May 04 2018 Silvan Calarco 3.0.2.32703-1mamba - update to 3.0.2.32703 * Wed May 02 2018 Silvan Calarco 2.5.7.27050-2mamba - move %{_libdir}/firebird/bin/* from -superserver to libfbclient * Sat Jan 06 2018 Silvan Calarco 2.5.7.27050-1mamba - update to 2.5.7.27050 * Tue Jun 04 2013 Automatic Build System 2.5.2.26540-1mamba - update to 2.5.2.26540 * Fri Sep 21 2012 Automatic Build System 2.1.5.18496-1mamba - update to 2.1.5.18496 * Fri Apr 08 2011 Silvan Calarco 2.1.4.18393-1mamba - update to 2.1.4.18393 - removed duplicated csh profile.d script - renamed from Firebird to firebird - create firebird user and group as required * 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