# # Conditional build: %bcond_without python2 # Python 2.x bindings (needed by prewikka) %bcond_without python3 # Python 3.x bindings %bcond_without static_libs # static library %bcond_without pgsql # PostgreSQL plugin %bcond_without mysql # MySQL plugin %bcond_without sqlite3 # SQLite3 plugin # Summary: The PreludeDB Library Summary(pl.UTF-8): Biblioteka PreludeDB Name: libpreludedb Version: 5.1.0 Release: 2 License: GPL v2 or commercial Group: Libraries #Source0Download: https://www.prelude-siem.org/projects/prelude/files Source0: https://www.prelude-siem.org/attachments/download/1171/%{name}-%{version}.tar.gz # Source0-md5: 372b2e7b40e1cc451833370e19bb4ec7 Patch0: %{name}-lt.patch Patch1: %{name}-link.patch Patch2: %{name}-python-install.patch Patch3: gtk-doc-1.32.patch URL: https://www.prelude-siem.org/ BuildRequires: autoconf >= 2.59 BuildRequires: automake >= 1:1.9 BuildRequires: bison BuildRequires: flex BuildRequires: gtk-doc >= 1.0 BuildRequires: libprelude-devel >= %{version} BuildRequires: libprelude-c++-devel >= %{version} BuildRequires: libprelude-swig >= %{version} BuildRequires: libstdc++-devel BuildRequires: libtool >= 2:1.5 %{?with_mysql:BuildRequires: mysql-devel} BuildRequires: pkgconfig %{?with_pgsql:BuildRequires: postgresql-devel} %{?with_python2:BuildRequires: python-devel >= 1:2.5} %{?with_python3:BuildRequires: python3-devel >= 1:3.2} BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.219 %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3.0.0} BuildRequires: swig-python Requires(post): /sbin/ldconfig Requires: %{name}(DB_driver) = %{version}-%{release} Requires: libprelude-libs >= %{version} Obsoletes: perl-libpreludedb BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description The PreludeDB Library provides an abstraction layer upon the type and the format of the database used to store IDMEF alerts. It allows developers to use the Prelude IDMEF database easily and efficiently without worrying about SQL, and to access the database independently of the type/format of the database. %description -l pl.UTF-8 Biblioteka PreludeDB dostarcza warstwę abstrakcji ponad rodzajem i formatem bazy danych używanej do przechowywania alarmów IDMEF. Pozwala programistom łatwo i wydajnie używać bazy danych IDMEF Prelude nie martwiąc się o SQL i dostawać się do bazy niezależnie od jej rodzaju/formatu. %package devel Summary: Header files and development documentation for libpreludedb Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programistyczna do libpreludedb Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: libprelude-devel >= %{version} %description devel Header files and development documentation for libpreludedb. %description devel -l pl.UTF-8 Pliki nagłówkowe i dokumentacja programistyczna do libpreludedb. %package static Summary: Static libpreludedb library Summary(pl.UTF-8): Statyczna biblioteka libpreludedb Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} %description static Static libpreludedb library. %description static -l pl.UTF-8 Statyczna biblioteka libpreludedb. %package c++ Summary: C++ binding for libpreludedb Summary(pl.UTF-8): Interfejs C++ do libpreludedb Group: Libraries Requires: %{name} = %{version}-%{release} Requires: libprelude-c++ >= %{version} %description c++ C++ binding for libpreludedb. %description c++ -l pl.UTF-8 Interfejs C++ do libpreludedb. %package c++-devel Summary: Header files for libpreludedbcpp Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libpreludedbcpp Group: Development/Libraries Requires: %{name}-c++ = %{version}-%{release} Requires: %{name}-devel = %{version}-%{release} Requires: libprelude-c++-devel >= %{version} Requires: libstdc++-devel %description c++-devel Header files for libpreludedbcpp. %description c++-devel -l pl.UTF-8 Pliki nagłówkowe biblioteki libpreludedbcpp. %package c++-static Summary: Static libpreludedbcpp library Summary(pl.UTF-8): Statyczna biblioteka libpreludedbcpp Group: Development/Libraries Requires: %{name}-c++-devel = %{version}-%{release} %description c++-static Static libpreludedbcpp library. %description c++-static -l pl.UTF-8 Statyczna biblioteka libpreludedbcpp. %package pgsql Summary: PostgreSQL backend for libpreludedb Summary(pl.UTF-8): Interfejs do PostgreSQL dla libpreludedb Group: Libraries Requires: %{name} = %{version}-%{release} Provides: %{name}(DB_driver) = %{version}-%{release} %description pgsql PostgreSQL backend for libpreludedb %description pgsql -l pl.UTF-8 Interfejs do PostgreSQL do libpreludedb %package mysql Summary: MySQL backend for libpreludedb Summary(pl.UTF-8): Interfejs do MySQL dla libpreludedb Group: Libraries Requires: %{name} = %{version}-%{release} Provides: %{name}(DB_driver) = %{version}-%{release} %description mysql MySQL backend for libpreludedb %description mysql -l pl.UTF-8 Interfejs do MySQL do libpreludedb %package sqlite3 Summary: SQLite3 backend for libpreludedb Summary(pl.UTF-8): Interfejs do SQLite3 dla libpreludedb Group: Libraries Requires: %{name} = %{version}-%{release} Provides: %{name}(DB_driver) = %{version}-%{release} %description sqlite3 SQLite3 backend for libpreludedb %description sqlite3 -l pl.UTF-8 Interfejs do SQLite3 do libpreludedb %package -n python-libpreludedb Summary: Python 2.x bindings for libpreludedb Summary(pl.UTF-8): Wiązania Pythona 2.x do libpreludedb Group: Development/Languages/Python Requires: %{name}-c++ = %{version}-%{release} %description -n python-libpreludedb Python 2.x bindings for libpreludedb. %description -n python-libpreludedb -l pl.UTF-8 Wiązania Pythona 2.x do libpreludedb. %package -n python3-libpreludedb Summary: Python 3.x bindings for libpreludedb Summary(pl.UTF-8): Wiązania Pythona 3.x do libpreludedb Group: Development/Languages/Python Requires: %{name}-c++ = %{version}-%{release} %description -n python3-libpreludedb Python 3.x bindings for libpreludedb. %description -n python3-libpreludedb -l pl.UTF-8 Wiązania Pythona 3.x do libpreludedb. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %if %{with python3} %{__rm} bindings/python/{_preludedb.cxx,preludedb.py} %endif %{__sed} -i -e '1s,/usr/bin/env python,%{?with_python3:%{__python3}}%{!?with_python3:%{__python}},' \ preludedb-admin %build %{__gtkdocize} %{__libtoolize} %{__aclocal} -I m4 -I libmissing/m4 %{__autoconf} %{__autoheader} %{__automake} %configure \ --enable-gtk-doc \ %{?with_static_libs:--enable-static} \ --with-html-dir=%{_gtkdocdir}/libpreludedb \ --with-mysql%{!?with_mysql:=no} \ --with-postgresql%{!?with_pgsql:=no} \ --with-python2%{!?with_python2:=no} \ --with-python3%{!?with_python3:=no} \ --with-sqlite%{!?with_sqlite3:=no} \ --with-swig %{__make} %install rm -rf $RPM_BUILD_ROOT %{__make} -j1 install \ DESTDIR=$RPM_BUILD_ROOT \ pythondir=%{py_sitescriptdir} \ pyexecdir=%{py_sitedir} \ python3dir=%{py3_sitescriptdir} \ py3execdir=%{py3_sitedir} %if %{without pgsql} && %{without mysql} && %{without sqlite3} install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/sql %endif # no *.la for plugins %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/*/*.la \ %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/*/*.a} %if %{with python2} %py_postclean %endif %clean rm -rf $RPM_BUILD_ROOT %post /sbin/ldconfig if [ "$1" = 1 ]; then %banner -e %{name} <