libpreludedb/libpreludedb.spec
2020-09-22 23:47:05 +02:00

398 lines
13 KiB
RPMSpec

%if 0%{?python3_other_pkgversion}
%bcond_without python3_other
%else
%bcond_with python3_other
%endif
# API version for libpreludedb
%global major 7
# API version for libpreludedb c++ binding
%global cppmajor 2
Name: libpreludedb
Version: 5.2.0
Release: 1%{?dist}
Summary: Framework for easy access to the IDMEF database
# Prelude is GPL-2.0+
# libmissing is LGPL-2.1+
License: GPLv2+
URL: https://www.prelude-siem.org/
Source0: https://www.prelude-siem.org/pkg/src/%{version}/%{name}-%{version}.tar.gz
# https://www.prelude-siem.org/issues/867
Patch0: libpreludedb-5.2.0-undefined_non_weak_symbol.patch
Patch1: libpreludedb-5.2.0-fix_gtkdoc_1.32.patch
Patch2: libpreludedb-5.2.0-force_preludedb_admin_with_py3.patch
Patch3: libpreludedb-5.2.0-update_m4_postgresql.patch
Patch4: libpreludedb-5.2.0-Clean_libpreludedb-config.patch
BuildRequires: bison
BuildRequires: chrpath
BuildRequires: flex
BuildRequires: gtk-doc
BuildRequires: libgcrypt-devel
BuildRequires: libgpg-error-devel
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(libprelude) >= %{version}
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(gnutls)
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: python2-devel
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: pkgconfig(zlib)
%ifnarch s390
BuildRequires: valgrind
%endif
# Upstream do not use explicit version of gnulib, just checkout
# and update files. In libpreludedb 5.2.0, the checkout has been done
# on 2018-09-03
Provides: bundled(gnulib) = 20180903
%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.
%package devel
Summary: Libraries and headers for PreludeDB
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Libraries and headers you can use to access Prelude database using the Prelude
Library. 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.
%package -n preludedb-tools
Summary: Command-line tools for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n preludedb-tools
Provides a convenient interface for accessing Prelude alerts.
%package -n python2-preludedb
Summary: Python 2 bindings for preludedb
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python2-prelude
%{?python_provide:%python_provide python2-preludedb}
%description -n python2-preludedb
Provides python 2 bindings for preludedb.
%package -n python%{python3_pkgversion}-preludedb
Summary: Python 3 bindings for preludedb
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python%{python3_pkgversion}-prelude
%{?python_provide:%python_provide python%{python3_pkgversion}-preludedb}
%description -n python%{python3_pkgversion}-preludedb
Provides python 3 bindings for preludedb.
%if 0%{?with_python3_other}
%package -n python%{python3_other_pkgversion}-preludedb
Summary: Python 3 bindings for preludedb
BuildRequires: python%{python3_other_pkgversion}-devel
BuildRequires: python%{python3_other_pkgversion}-setuptools
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python%{python3_other_pkgversion}-prelude
%{?python_provide:%python_provide python%{python3_other_pkgversion}-preludedb}
%description -n python%{python3_other_pkgversion}-preludedb
Provides python 3 bindings for preludedb.
# with_python3_other
%endif
%package -n preludedb-mysql
Summary: Plugin to use prelude with a MySQL database
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n preludedb-mysql
This plugin authorize prelude to store alerts into a MySQL
database.
%package -n preludedb-pgsql
Summary: Plugin to use prelude with a PostgreSQL database
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n preludedb-pgsql
This plugin authorize prelude to store alerts into a PostgreSQL
database.
%package -n preludedb-sqlite3
Summary: Plugin to use prelude with a SQLite3 database
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n preludedb-sqlite3
This plugin authorize prelude to store alerts into a SQLite3
database.
%package doc
Summary: Documentation for preludedb
BuildArch: noarch
%description doc
Provides documentation for preludedb generated by gtk-doc.
%prep
%autosetup -p1
%build
%configure \
--disable-rpath \
--disable-static \
--enable-shared \
--includedir=%{_includedir}/%{name} \
--without-swig \
--with-python2 \
--with-python3 \
--enable-gtk-doc \
--with-html-dir=%{_docdir}/%{name}-devel
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
%make_build
cd %{_builddir}/%{name}-%{version}/bindings/python
%{?with_python3_other: %py3_other_build}
%install
%make_install
cd %{_builddir}/%{name}-%{version}/bindings/python
%{?with_python3_other: %py3_other_install}
chrpath -d %{buildroot}%{_libdir}/*.so.*
find %{buildroot} -name '*.la' -delete
find %{buildroot} -name 'perllocal.pod' -delete
find %{buildroot} -name '.packlist' -delete
chmod +x %{buildroot}%{_datadir}/%{name}/classic/mysql2pgsql.sh
chmod +x %{buildroot}%{_datadir}/%{name}/classic/mysql2sqlite.sh
%check
%make_build check
%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig
%files
%{_libdir}/%{name}.so.%{major}
%{_libdir}/%{name}.so.%{major}.*
%{_libdir}/%{name}cpp.so.%{cppmajor}
%{_libdir}/%{name}cpp.so.%{cppmajor}.*
%dir %{_libdir}/%{name}/
%dir %{_libdir}/%{name}/plugins
%dir %{_libdir}/%{name}/plugins/formats
%dir %{_libdir}/%{name}/plugins/sql
%{_libdir}/%{name}/plugins/formats/classic.so
%license COPYING LICENSE.README HACKING.README
%doc README NEWS
%files devel
%{_datadir}/%{name}
%{_bindir}/%{name}-config
%{_libdir}/%{name}.so
%{_libdir}/%{name}cpp.so
%{_includedir}/%{name}
%{_datadir}/aclocal/%{name}.m4
%{_mandir}/man1/%{name}-config.1.gz
%files -n preludedb-tools
%{_bindir}/preludedb-admin
%{_mandir}/man1/preludedb-admin.1.gz
%files -n python2-preludedb
%{python2_sitearch}/_preludedb.*so
%{python2_sitearch}/preludedb-%{version}-py?.?.egg-info
%{python2_sitearch}/preludedb.py
%{python2_sitearch}/preludedb.py?
%files -n python%{python3_pkgversion}-preludedb
%{python3_sitearch}/_preludedb.*so
%{python3_sitearch}/__pycache__/preludedb.cpython-??.*py?
%{python3_sitearch}/preludedb-%{version}-py?.?.egg-info
%{python3_sitearch}/preludedb.py
%if 0%{?with_python3_other}
%files -n python%{python3_other_pkgversion}-preludedb
%{python3_other_sitearch}/_preludedb.*so
%{python3_other_sitearch}/__pycache__/preludedb.cpython-??.*pyc
%{python3_other_sitearch}/__pycache__/preludedb.cpython-??.*pyo
%{python3_other_sitearch}/preludedb-%{version}-py?.?.egg-info
%{python3_other_sitearch}/preludedb.py
# with_python3_other
%endif
%files -n preludedb-mysql
%{_libdir}/%{name}/plugins/sql/mysql.so
%dir %{_datadir}/%{name}/classic
%{_datadir}/%{name}/classic/mysql*.sql
%files -n preludedb-pgsql
%{_libdir}/%{name}/plugins/sql/pgsql.so
%dir %{_datadir}/%{name}/classic
%{_datadir}/%{name}/classic/pgsql*.sql
%files -n preludedb-sqlite3
%{_libdir}/%{name}/plugins/sql/sqlite3.so
%dir %{_datadir}/%{name}/classic
%{_datadir}/%{name}/classic/sqlite*.sql
%files doc
%{_docdir}/%{name}-devel
%license COPYING LICENSE.README HACKING.README
%doc ChangeLog README NEWS
%changelog
* Thu Sep 17 2020 Thomas Andrejak <thomas.andrejak@gmail.com> - 5.2.0-1
- Bump version 5.2.0
* Mon Apr 06 2020 Thomas Andrejak <thomas.andrejak@gmail.com> - 5.1.0-2
- Rebuild
* Mon Apr 06 2020 Thomas Andrejak <thomas.andrejak@gmail.com> - 5.1.0-1
- Bump version 5.1.0
* Wed Jul 17 2019 Thomas Andrejak <thomas.andrejak@gmail.com> - 5.0.0-1
- Bump version 5.0.0
* Wed Jul 17 2019 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.1.0-3
- Rebuilt because soname bump of libprelude
* Thu Mar 07 2019 Troy Dawson <tdawson@redhat.com> - 4.1.0-2
- Rebuilt to change main python from 3.4 to 3.6
* Tue Mar 20 2018 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.1.0-1
- Bump version 4.1.0
* Sun Oct 1 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.0.0-1
- Bump version
* Mon Jan 9 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 3.1.0-1
- Bump version
* Sun Mar 10 2013 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-16
- Add -i to autoreconf to add missing test-driver
- Add libtool as build dependency
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Sep 06 2012 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-14
- Add provides bundled gnulib
* Wed Aug 08 2012 Petr Pisar <ppisar@redhat.com> - 1:1.0.0-13
- Fix building with glibc-2.16.6 (bug #839607)
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sun Jun 10 2012 Petr Pisar <ppisar@redhat.com> - 1:1.0.0-11
- Perl 5.16 rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri Jun 17 2011 Marcela Maslanova <mmaslano@redhat.com> - 1:1.0.0-9
- Perl mass rebuild
* Fri Jun 10 2011 Marcela Maslanova <mmaslano@redhat.com> - 1:1.0.0-8
- Perl 5.14 mass rebuild
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1:1.0.0-7
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 1:1.0.0-4
- Mass rebuild with perl-5.12.0
* Sun May 02 2010 Steve Grubb <sgrubb@redhat.com> 1.0.0-3
- Fix requires
* Fri Apr 30 2010 Steve Grubb <sgrubb@redhat.com> 1.0.0-2
- new upstream release
* Sat Jan 30 2010 Steve Grubb <sgrubb@redhat.com> 1.0.0rc1-1
- new upstream bugfix release
* Thu Dec 17 2009 Steve Grubb <sgrubb@redhat.com> 0.9.15.3-1
- new upstream bugfix release
* Mon Dec 7 2009 Stepan Kasal <skasal@redhat.com> - 0.9.15.1-6
- rebuild against perl 5.10.1
* Tue Aug 25 2009 Steve Grubb <sgrubb@redhat.com> - 0.9.15.1-5
- rebuild for new openssl
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.15.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 0.9.15.1-3
- rebuild for dependencies
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.15.1-2
- Rebuild for Python 2.6
* Sun Sep 14 2008 Steve Grubb <sgrubb@redhat.com> 0.9.15.1-1
- new upstream bugfix release
* Wed Aug 27 2008 Steve Grubb <sgrubb@redhat.com> 0.9.15-1
- new upstream release
* Fri Jul 04 2008 Steve Grubb <sgrubb@redhat.com> - 0.9.14.1-4
- Fix perl bindings (#453935)
* Wed Jun 25 2008 Tomas Mraz <tmraz@redhat.com> - 0.9.14.1-3
- rebuild with new gnutls
- fix install of perl bindings
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.14.1-2
- Autorebuild for GCC 4.3
* Mon Jan 14 2008 Steve Grubb <sgrubb@redhat.com> 0.9.14.1-1
- new upstream version 0.9.14.1
* Sun Dec 09 2007 <alexlan at fedoraproject dot org> - 0.9.11.1-4
- Add missing BR: perl-devel
* Thu Dec 06 2007 Release Engineering <rel-eng at fedoraproject dot org> - 0.9.11.1-3
- Rebuild for deps
* Fri Jan 05 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.11.1-2
- moved to new upstream version 0.9.11.1
* Mon Jan 01 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.11-4
- added x86_64-sqlite3.patch to resolve x86_86 build problems
* Sun Dec 31 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.11-3
- resolved macro problem in changelog
- changed several dirowner
- moved html docs into -devel
* Sat Dec 30 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.11-2
- corrected file list entries
- added new BuildReqs to the devel-package
- changed dirowner
- fixed x86_86 arch build problem with %%python_sitearch
* Fri Dec 29 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.11-1
- resolved rpath issue
- added python_sitearch and python_sitelib
- fixed permissions problem
- moved to new upstream version 0.9.11
* Mon Nov 20 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.10-2
- Some minor fixes in requirements
* Tue Oct 24 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.10-1
- New fedora build based on release 0.9.10
- New fedora build based on release 0.9.10