Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > 6edb93dbd0d5a4496ede7986a5d4b17e > files > 3

libpq++-4.0-7mdk.src.rpm

%define	name	libpq++
%define	version	4.0
%define	release	7mdk

%define	major	4
%define libname	%mklibname pq++ %{major}

Summary:	C++ interface for PostgreSQL
Name:		%{name}
Version:	%{version}
Release:	%{release}
URL:		http://gborg.postgresql.org/project/libpqpp/projdisplay.php
License:	BSD
Source0:	%{name}-%{version}.tar.bz2
Patch0:		libpq++-4.0-Makefile.patch.bz2
Group:		System/Libraries
BuildRequires:	postgresql-devel
BuildRequires:	postgresql-libs-devel
BuildRequires:	libgcc
BuildRequires:	libstdc++-devel
BuildRequires:	openssl-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
This is the C++ interface that has shipped as part of PostgreSQL
until v7.2.3.

%package -n	%{libname}
Summary:	C++ interface for PostgreSQL
Group:          System/Libraries

%description -n	%{libname}
This is the C++ interface that has shipped as part of PostgreSQL
until v7.2.3.

%package -n	%{libname}-devel
Summary:	Development library and header files for %{name}
Group:		Development/C++
Requires:	%{libname} = %{version}
Provides:	pq++-devel
Provides:	libpq++-devel

%description -n	%{libname}-devel
This is the C++ interface that has shipped as part of PostgreSQL
until v7.2.3.

This package contains the %{name} library and its header files
needed to compile applications such as PowerDNS, etc.

%prep

%setup -q -n %{name}-%{version}
%patch0 -p0

# clean up CVS stuff
for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -r $i; fi >&/dev/null
done

%build

%serverbuild

%make CFLAGS="%{optflags} -fPIC" CXXFLAGS="%{optflags} -fPIC"

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_libdir}
install -d %{buildroot}%{_includedir}/pgsql/libpq++

install -m644 libpq++.h %{buildroot}%{_includedir}/pgsql/
install -m644 pgconnection.h %{buildroot}%{_includedir}/pgsql/libpq++/
install -m644 pgdatabase.h %{buildroot}%{_includedir}/pgsql/libpq++/
install -m644 pgtransdb.h %{buildroot}%{_includedir}/pgsql/libpq++/
install -m644 pgcursordb.h %{buildroot}%{_includedir}/pgsql/libpq++/
install -m644 pglobject.h %{buildroot}%{_includedir}/pgsql/libpq++/

install -m755 libpq++.so.%{major}.0 %{buildroot}%{_libdir}/
install -m755 libpq++.a %{buildroot}%{_libdir}/
ln -s libpq++.so.%{major}.0 %{buildroot}%{_libdir}/libpq++.so.%{major}
ln -s libpq++.so.%{major}.0 %{buildroot}%{_libdir}/libpq++.so

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%files -n %{libname}
%defattr(-,root,root)
%doc CHANGES README
%{_libdir}/lib*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%doc docs/*
%{_includedir}/pgsql/*.h
%{_includedir}/pgsql/libpq++/*.h
%{_libdir}/lib*.so
%{_libdir}/lib*.a

%changelog
* Wed Apr 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.0-7mdk
- rebuilt against new postgresql libs
- fix requires-on-release

* Sun Jun 06 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.0-6mdk
- rebuilt against new deps and with gcc v3.4.x
- fix deps

* Mon Oct 27 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0-5mdk
- fix invalid-build-requires
- provide pq++-devel
- drop the static-devel sub package
- misc spec file fixes

* Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0-4mdk
- rebuild

* Sun Jun 29 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0-3mdk
- really build against new PostgreSQL libs

* Sun Jun 29 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0-2mdk
- built against new PostgreSQL libs
- use macros
- misc spec file fixes

* Sat Jan 18 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0-1mdk
- initial cooker contrib
- added P0