b07b34
%global major                   23
b07b34
%global cppmajor                8
b07b34
b07b34
# Notes about rpmlint
b07b34
# - crypto-policy-non-compliance-gnutls-{1,2} fixed with patch
b07b34
#   libprelude-3.1.0-gnutls_priority_set_direct.patch
b07b34
b07b34
Name:           libprelude
b07b34
Version:        3.1.0
70cf9d
Release:        27%{?dist}
b07b34
Summary:        Secure Connections between all Sensors and the Prelude Manager
b07b34
# Prelude is GPL-2.0+
b07b34
# libmissing is LGPL-2.1+
b07b34
License:        GPLv2+
b07b34
Group:          System Environment/Libraries
b07b34
URL:            https://www.prelude-siem.org/
b07b34
Source0:        https://www.prelude-siem.org/pkg/src/3.1.0/%{name}-%{version}.tar.gz
b07b34
# https://www.prelude-siem.org/issues/859
b07b34
Patch0:         libprelude-3.1.0-linking.patch
b07b34
# https://www.prelude-siem.org/issues/860
b07b34
Patch1:         libprelude-3.1.0-ruby_vendorarchdir.patch
b07b34
# https://www.prelude-siem.org/issues/862
b07b34
Patch2:         libprelude-3.1.0-gnutls_priority_set_direct.patch
b07b34
# https://www.prelude-siem.org/issues/863
b07b34
Patch3:         libprelude-3.1.0-fsf_address.patch
b07b34
# https://www.prelude-siem.org/issues/865
b07b34
Patch4:         libprelude-3.1.0-fix_timegm.patch
b07b34
BuildRequires:  bison
b07b34
BuildRequires:  chrpath
b07b34
BuildRequires:  flex
b07b34
BuildRequires:  gtk-doc
b07b34
BuildRequires:  swig
b07b34
BuildRequires:  libgcrypt-devel
b07b34
BuildRequires:  libgpg-error-devel
b07b34
BuildRequires:  libtool-ltdl-devel
b07b34
BuildRequires:  perl-devel
b07b34
BuildRequires:  perl-generators
b07b34
BuildRequires:  python2-devel
b07b34
BuildRequires:  python3-devel
b07b34
BuildRequires:  pkgconfig(gnutls)
b07b34
BuildRequires:  pkgconfig(lua) >= 5.2
b07b34
BuildRequires:  pkgconfig(ruby)
b07b34
BuildRequires:  pkgconfig(zlib)
b07b34
b07b34
%ifnarch s390
b07b34
BuildRequires:  valgrind
b07b34
%endif
b07b34
b07b34
# Upstream do not use explicit version of gnulib, just checkout
b07b34
# and update files. In libprelude 3.1.0, the checkout has been done
b07b34
# on 2016-06-16
b07b34
Provides:       bundled(gnulib) = 20160616
b07b34
b07b34
ExcludeArch:    ppc64 ppc64le aarch64 armv7hl
b07b34
b07b34
%description
b07b34
Libprelude is a collection of generic functions providing communication
b07b34
between all Sensors, like IDS (Intrusion Detection System), and the Prelude
b07b34
Manager. It provides a convenient interface for sending and receiving IDMEF
b07b34
(Information and Event Message Exchange Format) alerts to Prelude Manager with
b07b34
transparent SSL, fail-over and replication support, asynchronous events and
b07b34
timer interfaces, an abstracted configuration API (hooking at the command-line,
b07b34
the configuration line, or wide configuration, available from the Manager), and
b07b34
a generic plugin API. It allows you to easily turn your favorite security
b07b34
program into a Prelude sensor.
b07b34
b07b34
%package devel
b07b34
Summary:        Libraries and headers for developing Prelude sensors
b07b34
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b34
Requires:       libtool-ltdl-devel
b07b34
Provides:       %{name}%{?_isa}-devel = %{version}-%{release}
b07b34
Provides:       prelude-devel = %{version}-%{release}
b07b34
b07b34
%description devel
b07b34
Libraries and headers you can use to develop Prelude sensors using the Prelude
b07b34
Library. Libprelude is a collection of generic functions providing
b07b34
communication between all Sensors, like IDS (Intrusion Detection System),
b07b34
and the Prelude Manager. It provides a convenient interface for sending and
b07b34
receiving IDMEF (Information and Event Message Exchange Format) alerts to
b07b34
Prelude Manager with transparent SSL, fail-over and replication support,
b07b34
asynchronous events and timer interfaces, an abstracted configuration API
b07b34
(hooking at the command-line, the configuration line, or wide configuration,
b07b34
available from the Manager), and a generic plugin API. It allows you to easily
b07b34
turn your favorite security program into a Prelude sensor.
b07b34
b07b34
%package -n prelude-tools
b07b34
Summary:        Command-line tools for %{name}
b07b34
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b34
b07b34
%description -n prelude-tools
b07b34
Provides a convenient interface for sending alerts to Prelude
b07b34
Manager.
b07b34
b07b34
%package -n python2-prelude
b07b34
Summary:        Python 2 bindings for prelude
b07b34
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b34
%{?python_provide:%python_provide python2-prelude}
b07b34
b07b34
%description -n python2-prelude
b07b34
Provides python 2 bindings for prelude.
b07b34
b07b34
%package -n python3-prelude
b07b34
Summary:        Python 3 bindings for prelude
b07b34
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b34
%{?python_provide:%python_provide python3-prelude}
b07b34
b07b34
%description -n python3-prelude
b07b34
Provides python 3 bindings for prelude.
b07b34
b07b34
%package -n perl-prelude
b07b34
Summary:        Perl bindings for prelude
b07b34
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b34
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
b07b34
b07b34
%description -n perl-prelude
b07b34
Provides perl bindings for prelude.
b07b34
b07b34
%package -n ruby-prelude
b07b34
Summary:        Ruby bindings for prelude
b07b34
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b34
b07b34
%description -n ruby-prelude
b07b34
Provides ruby bindings for prelude.
b07b34
b07b34
%package -n lua-prelude
b07b34
Summary:        Lua bindings for prelude
b07b34
Requires:       %{name}%{?_isa} = %{version}-%{release}
b07b34
Requires:       lua
b07b34
b07b34
%description -n lua-prelude
b07b34
Provides Lua bindings for prelude generated by SWIG.
b07b34
b07b34
%package doc
b07b34
Summary:        Documentation for prelude
b07b34
BuildArch:      noarch
b07b34
b07b34
%description doc
b07b34
Provides documentation for prelude generated by gtk-doc.
b07b34
b07b34
%prep
b07b34
%autosetup -p1
b07b34
b07b34
%build
b07b34
%configure \
b07b34
    --without-included-ltdl \
b07b34
    --disable-static \
b07b34
    --enable-shared \
b07b34
    --with-swig \
b07b34
    --with-python2 \
b07b34
    --with-python3 \
b07b34
    --with-ruby \
b07b34
    --with-lua \
b07b34
    --with-perl-installdirs=vendor \
b07b34
    --without-included-regex \
b07b34
    --includedir=%{_includedir}/%{name} \
b07b34
    --enable-gtk-doc \
b07b34
    --with-html-dir=%{_docdir}/%{name}-devel
b07b34
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
b07b34
%make_build
b07b34
b07b34
%install
b07b34
%make_install
b07b34
b07b34
chrpath -d %{buildroot}%{_libdir}/*.so.*
b07b34
b07b34
find %{buildroot} -name '*.la' -delete
b07b34
find %{buildroot} -name 'perllocal.pod' -delete
b07b34
find %{buildroot} -name '.packlist' -delete
b07b34
b07b34
%check
b07b34
make distcheck
b07b34
b07b34
%post -n %{name} -p /sbin/ldconfig
b07b34
%postun -n %{name} -p /sbin/ldconfig
b07b34
b07b34
%files
b07b34
%{_libdir}/%{name}.so.%{major}
b07b34
%{_libdir}/%{name}.so.%{major}.*
b07b34
%{_libdir}/%{name}cpp.so.%{cppmajor}
b07b34
%{_libdir}/%{name}cpp.so.%{cppmajor}.*
b07b34
%license COPYING LICENSE.README HACKING.README
b07b34
%doc AUTHORS README NEWS
b07b34
b07b34
%files devel
b07b34
%{_datadir}/%{name}
b07b34
%{_bindir}/%{name}-config
b07b34
%{_libdir}/%{name}.so
b07b34
%{_libdir}/%{name}cpp.so
b07b34
%{_libdir}/pkgconfig/%{name}.pc
b07b34
%{_includedir}/%{name}
b07b34
%{_datadir}/aclocal/%{name}.m4
b07b34
%{_mandir}/man1/%{name}-config.1.gz
b07b34
b07b34
%files -n prelude-tools
b07b34
# Force default attrs because libprelude force others
b07b34
%defattr(- , root, root, 755)
b07b34
%{_bindir}/prelude-adduser
b07b34
%{_bindir}/prelude-admin
b07b34
%{_mandir}/man1/prelude-admin.1.gz
b07b34
%dir %{_sysconfdir}/prelude
b07b34
%dir %{_sysconfdir}/prelude/default
b07b34
%dir %{_sysconfdir}/prelude/profile
b07b34
%config(noreplace) %{_sysconfdir}/prelude/default/client.conf
b07b34
%config(noreplace) %{_sysconfdir}/prelude/default/global.conf
b07b34
%config(noreplace) %{_sysconfdir}/prelude/default/idmef-client.conf
b07b34
%config(noreplace) %{_sysconfdir}/prelude/default/tls.conf
b07b34
%dir %{_var}/spool/prelude
b07b34
b07b34
%files -n python2-prelude
b07b34
%{python2_sitearch}/_prelude.*so
b07b34
%{python2_sitearch}/prelude-%{version}-py?.?.egg-info
b07b34
%{python2_sitearch}/prelude.{py,pyc,pyo}
b07b34
b07b34
%files -n python3-prelude
b07b34
%{python3_sitearch}/_prelude.*so
b07b34
%{python3_sitearch}/__pycache__/prelude.cpython-??.*pyc
b07b34
%{python3_sitearch}/prelude-%{version}-py?.?.egg-info
b07b34
%{python3_sitearch}/prelude.py
b07b34
b07b34
%files -n perl-prelude
b07b34
%{perl_vendorarch}/Prelude.pm
b07b34
%dir %{perl_vendorarch}/auto/Prelude
b07b34
# Force attrs because libprelude set it to 555
b07b34
%attr(755, root, root) %{perl_vendorarch}/auto/Prelude/Prelude.so
b07b34
b07b34
%files -n ruby-prelude
b07b34
%{ruby_vendorarchdir}/Prelude.so
b07b34
b07b34
%files -n lua-prelude
b07b34
%{_libdir}/lua/*/prelude.so
b07b34
b07b34
%files doc
b07b34
%{_docdir}/%{name}-devel
b07b34
%license COPYING LICENSE.README HACKING.README
b07b34
%doc AUTHORS ChangeLog README NEWS
b07b34
b07b34
%changelog
70cf9d
* Mon Feb 02 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 3.1.0-27
70cf9d
- Fix GnuTLS patch
70cf9d
b07b34
* Wed Oct 19 2016 Thomas Andrejak <thomas.andrejak@gmail.com> - 3.1.0-26
b07b34
- Bump version
b07b34
b07b34
* Sun Mar 10 2013 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-17
b07b34
- Rebuild with new gnutls
b07b34
b07b34
* Thu Sep 06 2012 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-16
b07b34
- Add provides bundled gnulib
b07b34
b07b34
* Wed Aug 08 2012 Petr Pisar <ppisar@redhat.com> - 1:1.0.0-15
b07b34
- Fix building with glibc-2.16.6 (bug #839602)
b07b34
b07b34
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-14
b07b34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b07b34
b07b34
* Thu Jun 07 2012 Petr Pisar <ppisar@redhat.com> - 1:1.0.0-13
b07b34
- Perl 5.16 rebuild
b07b34
b07b34
* Tue Mar 13 2012 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-12
b07b34
- Drop support for ruby
b07b34
b07b34
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-11
b07b34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b07b34
b07b34
* Tue Jul 19 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.0.0-10
b07b34
- Perl mass rebuild
b07b34
b07b34
* Fri Jun 24 2011 Steve Grubb <sgrubb@redhat.com> - 1:1.0.0-9
b07b34
- Fix gcc 4.6 C++ bug (#715983)
b07b34
b07b34
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.0.0-8
b07b34
- Perl mass rebuild
b07b34
b07b34
* Thu Jun 09 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.0.0-7
b07b34
- Perl 5.14 mass rebuild
b07b34
b07b34
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-6
b07b34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b07b34
b07b34
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.0.0-5
b07b34
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
b07b34
b07b34
* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 1:1.0.0-4
b07b34
- Mass rebuild with perl-5.12.0
b07b34
b07b34
* Sun May 02 2010 Steve Grubb <sgrubb@redhat.com> - 1.0.0-3
b07b34
- Fix requires statements
b07b34
b07b34
* Fri Apr 30 2010 Steve Grubb <sgrubb@redhat.com> - 1.0.0-2
b07b34
- New upstream release
b07b34
b07b34
* Sat Jan 30 2010 Steve Grubb <sgrubb@redhat.com> - 1.0.0rc1-1
b07b34
- New upstream release