SPECS: libpreludedb.spec - up to 0.9.11 by Tomasz Rutkowski

arekm arekm at pld-linux.org
Fri Jan 5 18:58:13 CET 2007


Author: arekm                        Date: Fri Jan  5 17:58:12 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- up to 0.9.11 by Tomasz Rutkowski

---- Files affected:
SPECS:
   libpreludedb.spec (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SPECS/libpreludedb.spec
diff -u SPECS/libpreludedb.spec:1.5 SPECS/libpreludedb.spec:1.6
--- SPECS/libpreludedb.spec:1.5	Sat Apr 15 23:51:15 2006
+++ SPECS/libpreludedb.spec	Fri Jan  5 18:58:07 2007
@@ -1,25 +1,35 @@
 # $Revision$, $Date$
+#
+%bcond_without	perl
+%bcond_without	python		# needed by prewikka
+%bcond_without	postgresql	# 
+%bcond_without	mysql		# one from those is needed by prewikka
+%bcond_without	sqlite3		# 
+
 %include	/usr/lib/rpm/macros.perl
 Summary:	The PreludeDB Library
 Summary(pl):	Biblioteka PreludeDB
 Name:		libpreludedb
-Version:	0.9.7.1
-Release:	0.1
+Version:	0.9.11
+Release:	1
 License:	GPL
 Group:		Libraries
 Source0:	http://www.prelude-ids.org/download/releases/%{name}-%{version}.tar.gz
-# Source0-md5:	7137575a3c907348296a386206ecc941
+# Source0-md5:	f0b2a1229784419be1f9602f3f06d539
 URL:		http://www.prelude-ids.org/
 BuildRequires:	bison
 BuildRequires:	flex
-BuildRequires:	gtk-doc
-BuildRequires:	libprelude-devel >= 0.9.6
-BuildRequires:	mysql-devel
-BuildRequires:	perl-devel
+BuildRequires:	libprelude-devel >= 0.9.9
+%{?with_perl:BuildRequires:	perl-devel}
+%{?with_python:BuildRequires:	python-devel}
+%{?with_postgresql:BuildRequires:	postgresql-devel}
+%{?with_mysql:BuildRequires:	mysql-devel}
+%{?with_sqlite3:BuildRequires:	sqlite3-devel}
+BuildRequires:	gtk-doc >= 1.0
 BuildRequires:	pkgconfig
-BuildRequires:	postgresql-devel
-BuildRequires:	python-devel
 BuildRequires:	rpm-perlprov
+Requires:	%{name}(DB_driver) = %{version}-%{release}
+Requires:	%{name}-libs = %{version}-%{release}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -36,11 +46,61 @@
 nie martwiąc się o SQL i dostawać się do bazy niezależnie od jej
 rodzaju/formatu.
 
+%package libs
+Summary:	Libpreludedb library
+Summary(pl):	Biblioteka libpreludedb
+Group:		Libraries
+
+%description libs
+Libpreludedb library
+
+%description libs -l pl
+Biblioteka libpreludedb
+
+%package db-pgsql
+Summary:	PostgreSQL backend for libpreludedb
+Summary(pl):	Interfejs do PostgreSQL dla libpreludedb
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Provides:	%{name}(DB_driver) = %{version}-%{release}
+
+%description db-pgsql
+PostgreSQL backend for libpreludedb
+
+%description db-pgsql -l pl
+Interfejs do PostgreSQL do libpreludedb
+
+%package db-mysql
+Summary:	MySQL backend for libpreludedb
+Summary(pl):	Interfejs do MySQL dla libpreludedb
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Provides:	%{name}(DB_driver) = %{version}-%{release}
+
+%description db-mysql
+MySQL backend for libpreludedb
+
+%description db-mysql -l pl
+Interfejs do MySQL do libpreludedb
+
+%package db-sqlite3
+Summary:	SQLite3 backend for libpreludedb
+Summary(pl):	Interfejs do SQLite3 dla libpreludedb
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Provides:	%{name}(DB_driver) = %{version}-%{release}
+
+%description db-sqlite3
+SQLite3 backend for libpreludedb
+
+%description db-sqlite3 -l pl
+Interfejs do SQLite3 do libpreludedb
+
 %package devel
 Summary:	Header files and development documentation for libpreludedb
 Summary(pl):	Pliki nagłówkowe i dokumentacja programistyczna do libpreludedb
 Group:		Development/Libraries
-Requires:	%{name} = %{version}-%{release}
+Requires:	%{name}-libs = %{version}-%{release}
 
 %description devel
 Header files and development documentation for libpreludedb.
@@ -89,10 +149,13 @@
 %configure \
 	--enable-shared \
 	--enable-static \
-	--enable-perl \
-	--enable-python \
+	--%{!?with_perl:dis}%{?with_perl:en}able-perl \
+	--%{!?with_python:dis}%{?with_python:en}able-python \
+	--%{!?with_postgresql:dis}%{?with_postgresql:en}able-pgsql \
+	--%{!?with_mysql:dis}%{?with_mysql:en}able-mysql \
+	--%{!?with_sqlite3:dis}%{?with_sqlite3:en}able-sqlite3 \
 	--enable-gtk-doc \
-	--with-html-dir=%{_gtkdocdir}/libpreludedb
+	--with-html-dir=%{_gtkdocdir}/libpreludedb \
 
 %{__make}
 
@@ -102,38 +165,92 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with perl}
 cd bindings/perl && %{__perl} Makefile.PL \
         INSTALLDIRS=vendor
 cd ../..
 %{__make} -C bindings/perl install \
 	DESTDIR=$RPM_BUILD_ROOT
+%endif
 
+%if %{with python}
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post	-p /sbin/ldconfig
-%postun	-p /sbin/ldconfig
+%post
+if [ "$1" = 1 ]; then
+%banner -e %{name} <<EOF
+
+Create new database and database user for prelude
+(or update an existing one if needed) using templates from
+%{_datadir}/%{name}/classic
+for reference visit %{url}
+
+EOF
+fi
+
+%postun
+
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
+%post db-pgsql -p /sbin/ldconfig
+%postun db-pgsql -p /sbin/ldconfig
+
+%post db-mysql -p /sbin/ldconfig
+%postun db-mysql -p /sbin/ldconfig
+
+%post db-sqlite3 -p /sbin/ldconfig
+%postun db-sqlite3 -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README
+
+%files libs
+%defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/preludedb-admin
 %attr(755,root,root) %{_libdir}/lib*.so.*.*
 %dir %{_libdir}/%{name}
 %dir %{_libdir}/%{name}/plugins
-%dir %{_libdir}/%{name}/plugins/*
-%attr(755,root,root) %{_libdir}/%{name}/plugins/*/*.so
-%{_libdir}/%{name}/plugins/*/*.la
-%{_datadir}/%{name}
+%dir %{_libdir}/%{name}/plugins/formats
+%dir %{_libdir}/%{name}/plugins/sql
+%attr(755,root,root) %{_libdir}/%{name}/plugins/formats/*.so
+# needed for normal operational
+%{_libdir}/%{name}/plugins/formats/*.la
+%{_libdir}/lib*.la
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/classic
+
+%if %{with postgresql}
+%files db-pgsql
+%defattr(644,root,root,755)
+%dir %{_libdir}/%{name}/plugins/sql/*pgsql*
+%{_datadir}/%{name}/classic/*pgsql*
+%endif
+
+%if %{with mysql}
+%files db-mysql
+%defattr(644,root,root,755)
+%dir %{_libdir}/%{name}/plugins/sql/*mysql*
+%{_datadir}/%{name}/classic/*mysql*
+%endif
+
+%if %{with sqlite3}
+%files db-sqlite3
+%defattr(644,root,root,755)
+%dir %{_libdir}/%{name}/plugins/sql/*sqlite*
+%{_datadir}/%{name}/classic/*sqlite*
+%endif
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/libpreludedb-config
 %attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
 %{_includedir}/libpreludedb
 %{_aclocaldir}/*.m4
 %{_gtkdocdir}/libpreludedb
@@ -141,18 +258,23 @@
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/lib*.a
+%{_libdir}/%{name}/plugins/*/*.a
 
+%if %{with perl}
 %files -n perl-libpreludedb
 %defattr(644,root,root,755)
 %dir %{perl_vendorarch}/auto/PreludeDB
 %attr(755,root,root) %{perl_vendorarch}/auto/PreludeDB/*.so
 %{perl_vendorarch}/auto/PreludeDB/*.bs
 %{perl_vendorarch}/PreludeDB.pm
+%endif
 
+%if %{with python}
 %files -n python-libpreludedb
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/*.so
  %{py_sitedir}/*.py[co]
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -160,6 +282,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.6  2007/01/05 17:58:07  arekm
+- up to 0.9.11 by Tomasz Rutkowski
+
 Revision 1.5  2006/04/15 21:51:15  qboosh
 - simplified setup
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/libpreludedb.spec?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list