%global fbroot %{_libdir}/%{name} %global major 3.0 %global _hardened_build 1 Summary: SQL relational database management system Name: firebird Version: 3.0 Release: 1.20160226git6127d1e8%{?dist} Group: Applications/Databases License: Interbase URL: http://www.firebirdsql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot Source0: firebird-6127d1e8.tar.gz # from OpenSuse Patch101: allow-creating-buildRoot-as-non-root-user.patch Patch102: add-pkgconfig-files.patch # from Debian # from upstream BuildRequires: autoconf BuildRequires: automake BuildRequires: libtommath-devel BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: libtermcap-devel BuildRequires: libicu-devel BuildRequires: libedit-devel BuildRequires: gcc-c++ BuildRequires: libstdc++-static BuildRequires: systemd-units BuildRequires: chrpath BuildRequires: zlib-devel Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Requires(postun): /usr/sbin/userdel Requires(postun): /usr/sbin/groupdel Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/useradd Requires: libfbclient2 Requires: logrotate %description Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird 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. %package devel Group: Development/Libraries/C and C++ Requires: %{name} = %{version} Summary: UDF support library for Firebird SQL server %description devel This package is needed for development of client applications and user defined functions (UDF) for Firebird SQL server. Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird 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. %package -n libfbclient2 Group: System Environment/Libraries Summary: Firebird SQL server client library %description -n libfbclient2 Shared client library for Firebird SQL server. Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird 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. %package -n libfbclient2-devel Group: System Environment/Libraries Summary: Development libraries and headers for Firebird SQL server Requires: %{name}-devel Requires: libfbclient2 = %{version} %description -n libfbclient2-devel Development files for Firebird SQL server client library. Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird 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. %package doc Group: Applications/Databases Requires: %{name} = %{version} Summary: Documentation for Firebird SQL server BuildArch: noarch %description doc Documentation for Firebird SQL server. Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird 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. %prep %setup -q -n %{name} %patch101 -p1 %patch102 -p1 %build NOCONFIGURE=1 ./autogen.sh %configure --prefix=%{_prefix} \ --disable-binreloc \ --with-system-icu --with-system-editline \ --with-fbbin=%{_bindir} --with-fbsbin=%{_sbindir} \ --with-fbconf=%{_sysconfdir}/%{name} \ --with-fblib=%{_libdir} --with-fbinclude=%{_includedir}/%{name} \ --with-fbdoc=%{_docdir}/%{name} \ --with-fbudf=%{_libdir}/%{name}/udf \ --with-fbsample=%{_docdir}/%{name}/sample \ --with-fbsample-db=%{_libdir}/%{name}/sample \ --with-fbhelp=%{_libdir}/%{name}/lib \ --with-fbintl=%{_libdir}/%{name}/intl \ --with-fbmisc=%{_datadir}/%{name}/misc \ --with-fbsecure-db=%{_localstatedir}/lib/%{name}/secdb \ --with-fbmsg=%{_libdir}/%{name}/lib \ --with-fblog=%{_localstatedir}/log/%{name} \ --with-fbglock=%{_localstatedir}/run/%{name} \ --with-fbplugins=%{_libdir}/%{name}/plugins make %{?_smp_mflags} cd gen make -f Makefile.install buildRoot chmod -R u+w buildroot%{_docdir}/%{name} %install chmod u+rw,a+rx gen/buildroot/usr/include/firebird/firebird/impl cp -r gen/buildroot/* ${RPM_BUILD_ROOT}/ mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig cp -v gen/install/misc/*.pc ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig/ cd ${RPM_BUILD_ROOT} mkdir -p .%{_libdir}/%{name}/utils mv -v .%{_sbindir}/*.sh .%{_libdir}/%{name}/utils/ mv -v .%{_sbindir}/fb_config .%{_libdir}/%{name}/utils/ rm -vf .%{_includedir}/%{name}/perf.h rm -vf .%{_libdir}/libicu*.so rm -vf .%{_includedir}/*.h chmod -R u+w .%{_docdir}/%{name} rm -vf .%{_datadir}/%{name}/misc/firebird.init.* rm -vf .%{_datadir}/%{name}/misc/rc.config.firebird mv -v .%{_sysconfdir}/%{name}/README .%{_sysconfdir}/%{name}/WhatsNew \ .%{_docdir}/%{name}/ mv -v .%{_sysconfdir}/%{name}/IDPLicense.txt .%{_docdir}/%{name}/ mv -v .%{_sysconfdir}/%{name}/IPLicense.txt .%{_docdir}/%{name}/ %clean rm -Rf %{buildroot} %files %{_bindir}/* %{_sbindir}/* %{_libdir}/%{name}/utils %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/*.conf %{_libdir}/libib_util.so %dir %{_libdir}/%{name} %dir %{_datadir}/%{name} %{_libdir}/%{name}/lib %{_libdir}/%{name}/intl %{_datadir}/%{name}/misc %{_libdir}/%{name}/plugins %{_libdir}/%{name}/udf %attr(755,root,root) /etc/init.d/firebird %{_docdir}/%{name}/IDPLicense.txt %{_docdir}/%{name}/IPLicense.txt %dir %{_localstatedir}/lib/%{name} %dir %{_localstatedir}/lib/%{name}/secdb %attr(0600,firebird,firebird) %config(noreplace) %{_localstatedir}/lib/%{name}/secdb/security3.fdb %dir %{_libdir}/%{name}/sample %attr(0600,firebird,firebird) %{_libdir}/%{name}/sample/* %attr(0750,firebird,firebird) %{_localstatedir}/log/%{name} %files devel %defattr(-,root,root) %{_includedir}/%{name} %files -n libfbclient2 %defattr(-,root,root) %{_libdir}/libfbclient.so.* %files -n libfbclient2-devel %defattr(-,root,root) %{_libdir}/libfbclient.so %{_libdir}/pkgconfig/fbclient.pc %files doc %{_docdir}/%{name} %exclude %{_docdir}/%{name}/sample %exclude %{_docdir}/%{name}/IDPLicense.txt %exclude %{_docdir}/%{name}/IPLicense.txt %changelog * Fri Feb 26 2016 Philippe Makowski - 3.0-1.20160226git6127d1e8 - Update to git: 6127d1e8 * Wed Feb 24 2016 Philippe Makowski - - first version for Epel7