Sophie

Sophie

distrib > Fedora > 16 > x86_64 > media > updates-src > by-pkgid > cc84d676783f11e224582aa746bcb286 > files > 2

libcprops-0.1.12-1.1.fc16.src.rpm

%global _name cprops

%bcond_without	postgres
%bcond_without	mysql

Name:		lib%{_name}
Version:	0.1.12
Release:	1.1%{?dist}
Summary:	C prototyping tools

Group:		System Environment/Libraries
License:	LGPLv2+
URL:		http://%{_name}.sourceforge.net/
Source0:	http://downloads.sourceforge.net/%{_name}/%{name}-%{version}.tar.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	autoconf, automake, libtool, openssl-devel, flex, bison

%if %with postgres
BuildRequires:	postgresql-devel
%endif
%if %with mysql
BuildRequires: mysql-devel
%endif


%description
the c prototyping tools library provides thread-safe linked list, priority
queue, hash table, hash list, AVL tree and trie implementations, as well
as a thread pool and thread management framework, a tcp and http socket
api, and a dbms abstraction layer.

%package devel
Summary:	Development files for %{name}
Group:		Development/Libraries
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q


%build
libtoolize %{?rhel:--force}
aclocal
autoconf
%configure \
	--disable-static \
	--disable-cpsvc \
	--disable-cpsp \
	--enable-shared \
	--with-ssl=%{_prefix} \
	%{?with_postgres:--with-postgres-includes=%{_includedir}/pgsql} \
	%{?with_postgres:--with-postgres-libs=%{_libdir}} \
	%{?with_mysql:--with-mysql-includes=%{_includedir}/mysql} \
	%{?with_mysql:--with-mysql-libs=%{_libdir}/mysql}

sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
    -e 's|func_apped|func_append|' \
    -e 's|CC -shared|CC -shared -Wl,--as-needed|g' \
    -i libtool


make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%{__install} -p -d $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%{__install} -p -c -m 444 ChangeLog COPYING README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

# or mock won't build
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%{_docdir}/%{name}-%{version}/

%files devel
%defattr(-,root,root,-)
%{_mandir}/man3/*
%{_includedir}/%{_name}/
%exclude %{_libdir}/*.so


%changelog
* Tue Jan 31 2012 Philip Prindeville <philipp@fedoraproject.org> 0.1.12-1.1
 - Fix build issues on EL6 with older libtool.

* Mon Jan 23 2012 Philip Prindeville <philipp@fedoraproject.org> 0.1.12-1
 - Version bump which fixes "library calling exit()" warning from rpmlint.

* Mon Jan 09 2012 Philip Prindeville <philipp@fedoraproject.org> 0.1.11-1
 - Fix review comments.

* Fri Dec 09 2011 Philip Prindeville <philipp@fedoraproject.org> 0.1.10-0.1
 - Enable trie module.

* Thu Nov 10 2011 Philip Prindeville <philipp@fedoraproject.org> svn36-0.1
 - Fixes for documentation warnings.
 - Fixes for compiler warnings.

* Sun Oct 30 2011 Philip Prindeville <philipp@fedoraproject.org> 0.1.8-0.1
 - Initial packaging.