ocaml-postgresql/ocaml-postgresql.spec

127 lines
3.6 KiB
RPMSpec

%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
Name: ocaml-postgresql
Version: 1.12.3
Release: 1%{?dist}.2
Summary: OCaml library for accessing PostreSQL databases
Group: Development/Libraries
License: LGPLv2+ with exceptions
URL: http://www.ocaml.info/home/ocaml_sources.html#toc13
Source0: http://hg.ocaml.info/release/postgresql-ocaml/archive/release-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ocaml >= 3.10.0
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc
BuildRequires: postgresql-devel
BuildRequires: chrpath
BuildRequires: rpm >= 4.4.2.3-2
%define _use_internal_dependency_generator 0
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
%description
This OCaml-library provides an interface to PostgreSQL, an efficient
and reliable, open source, relational database. Almost all
functionality available through the C-API (libpq) is replicated in a
type-safe way. This library uses objects for representing database
connections and results of queries.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%setup -q -n postgresql-ocaml-release-%{version}
%build
make
strip lib/dll*.so
chrpath --delete lib/dll*.so
%install
# These rules work if the library uses 'ocamlfind install' to install itself.
rm -rf $RPM_BUILD_ROOT
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
make install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc LICENSE
%{_libdir}/ocaml/postgresql
%if %opt
%exclude %{_libdir}/ocaml/postgresql/*.a
%exclude %{_libdir}/ocaml/postgresql/*.cmxa
%endif
%exclude %{_libdir}/ocaml/postgresql/*.mli
%{_libdir}/ocaml/stublibs/*.so
%{_libdir}/ocaml/stublibs/*.so.owner
%files devel
%defattr(-,root,root,-)
%doc LICENSE AUTHORS Changelog README.txt examples
%if %opt
%{_libdir}/ocaml/postgresql/*.a
%{_libdir}/ocaml/postgresql/*.cmxa
%endif
%{_libdir}/ocaml/postgresql/*.mli
%changelog
* Fri Oct 16 2009 Richard W.M. Jones <rjones@redhat.com> - 1.12.3-1.fc10.2
- Fix build process for new upstream tarball layout.
* Fri Oct 16 2009 Richard W.M. Jones <rjones@redhat.com> - 1.12.3-1
- New upstream version 1.12.3.
- This contains a SECURITY fix for:
https://bugzilla.redhat.com/show_bug.cgi?id=529325
CVE-2009-2943 ocaml-postgresql: Missing escape function (DSA-1909-1)
HOWEVER you are not protected until you change your code to
use the new connection#escape_string method.
* Wed Apr 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.8.2-4
- Rebuild for OCaml 3.10.2
* Fri Apr 18 2008 Richard W.M. Jones <rjones@redhat.com> - 1.8.2-3
- Can't spell. prm -> rpm.
* Fri Apr 18 2008 Richard W.M. Jones <rjones@redhat.com> - 1.8.2-2
- Rebuild against updated RPM (see bug 443114).
* Fri Apr 4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.8.2-1
- New upstream version 1.8.2.
* Tue Mar 4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-3
- Rebuild for ppc64.
* Mon Mar 3 2008 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-2
- Only include LICENSE doc in main package.
- Include extra documentation and examples in devel package.
- Check it builds in mock.
* Sun Feb 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-1
- Initial RPM release.