Blob Blame Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:		libprelude
Version:	0.9.17.1
Release:	1%{?dist}
Summary:	The prelude library        

Group:		System Environment/Libraries 
License:	GPLv2+
URL:		http://prelude-ids.org/
Source0:	http://www.prelude-ids.org/download/releases/%{name}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	gnutls-devel, python-devel 

%description
The Prelude Library is a collection of generic functions providing
communication between the Prelude Hybrid IDS suite components. It
provides a convenient interface for sending alerts to Prelude
Manager with transparent SSL, failover and replication support,
asynchronous events and timer interfaces, an abstracted
configuration API (hooking at the commandline, the configuration
line, or wide configuration, available from the Manager), and a
generic plugin API. It allows you to easily turn your favorite
security program into a Prelude sensor.

%package devel
Summary: 	Header files and libraries for libprelude development
Group:		System Environment/Libraries    
Requires: 	libprelude = %{version}-%{release}, automake, gnutls-devel

%description devel
Libraries, include files, etc you can use to develop Prelude IDS
sensors using the Prelude Library. The Prelude Library is a
collection of generic functions providing communication between
the Prelude Hybrid IDS suite componentst It provides a convenient
interface for sending alerts to Prelude Manager with transparent
SSL, failover and replication support, asynchronous events and
timer interfaces, an abstracted configuration API (hooking at the
commandline, the configuration line, or wide configuration,
available from the Manager), and a generic plugin API. It allows
you to easily turn your favorite security program into a Prelude
sensor.

%package python
Summary:	Header files and libraries for libprelude development
Group:		System Environment/Libraries
Requires:	libprelude = %{version}-%{release}

%description python
Python bindings for libprelude.

%package perl
Summary:	Header files and libraries for libprelude development
Group:		System Environment/Libraries
BuildRequires:	perl-devel
Requires:	libprelude = %{version}-%{release}

%description perl
Perl bindings for libprelude.

%prep
%setup -q


%build
%configure	--disable-static \
		--with-html-dir=%{_defaultdocdir}/%{name}-%{version}/html 

# removing rpath
sed -i.rpath -e 's|LD_RUN_PATH=""||' bindings/Makefile.in
make %{?_smp_mflags} 

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}
mkdir -p %{buildroot}%{perl_vendorarch}
make install DESTDIR=%{buildroot} INSTALL="%{__install} -c -p"
cp -p AUTHORS ChangeLog README NEWS COPYING LICENSE.README HACKING.README \
%{buildroot}%{_defaultdocdir}/%{name}-%{version}
mv %{buildroot}%{perl_sitearch}/* %{buildroot}%{perl_vendorarch}
rm -f %{buildroot}/%{_libdir}/libprelude.la
rm -f %{buildroot}%{python_sitelib}/auto/.packlist
rm -f %{buildroot}%{python_sitelib}/auto/Prelude.bs
rm -f %{buildroot}%{perl_vendorarch}/auto/Prelude/.packlist
rm -f %{buildroot}%{perl_vendorarch}/auto/Prelude/Prelude.bs
rm -f %{buildroot}%{perl_archlib}/perllocal.pod
# Fix time stamp for both 32 and 64 bit libraries
touch -r ./configure.in %{buildroot}%{_sysconfdir}/prelude/default/*

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/prelude-admin
%{_bindir}/prelude-adduser
%{_libdir}/*.so.*
%{_mandir}/man1/prelude-admin.1.gz
%config(noreplace) %{_sysconfdir}/*
%{_localstatedir}/spool/*
%dir %{_defaultdocdir}/%{name}-%{version}/
%doc %{_defaultdocdir}/%{name}-%{version}/*

%files devel
%defattr(-,root,root)
%{_bindir}/libprelude-config
%{_libdir}/*.so
%dir %{_includedir}/libprelude/
%{_includedir}/libprelude/*
%{_datadir}/aclocal/libprelude.m4

%files python
%{python_sitearch}/*

%files perl
%defattr(0755,root,root)
%attr(0644,root,root) %{perl_vendorarch}/Prelude.pm
%{perl_vendorarch}/auto/*


%changelog
* Wed May 14 2008 Steve Grubb <sgrubb@redhat.com> 0.9.17.1-1
- New upstream version

* Thu Apr 24 2008 Steve Grubb <sgrubb@redhat.com> 0.9.17-1
- New upstream version

* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.16.2-2
- Autorebuild for GCC 4.3

* Wed Jan 23 2008 Steve Grubb <sgrubb@redhat.com> 0.9.16.2-1
- New upstream version

* Mon Jan 14 2008 Steve Grubb <sgrubb@redhat.com> 0.9.16.1-1
- moved to new upstream version 0.9.16.1

* Tue Feb 20 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.13-1
- moved to new upstream version 0.9.13-1

* Fri Jan 05 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.12.1-1
- moved to new upstream version 0.9.12.1

* Tue Dec 30 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.12-6
- fixed x86_86 arch problem

* Tue Dec 30 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.12-5
- added ExcludeArch

* Tue Dec 29 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.12-4
- resolved permission problems
- added new docs 

* Tue Dec 25 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.12-3
- changed dir owner and preserved timestamps when building the package
- resolved rpath problems

* Fri Dec 22 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.12-2
- moved perl_sidearch into perl_vendorarch
- minor corrections in the spec file

* Fri Dec 22 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.12-1
- upgrade to latest upstream version 0.9.12
- minor corrections in the spec file

* Wed Dec 20 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.11-4
- removing smp-flag to debug perl- and python-problems
- added perl-bindings again

* Wed Dec 20 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.11-3
- disabled perl-bindings

* Mon Nov 20 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.11-2
- Some minor fixes in requirements

* Tue Oct 24 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.11-1
- New Fedora build based on release 0.9.11