ocaml-mysql/ocaml-mysql.spec

150 lines
4.3 KiB
RPMSpec

%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
Name: ocaml-mysql
Version: 1.0.4
Release: 14%{?dist}
Summary: OCaml library for accessing MySQL databases
Group: Development/Libraries
License: LGPLv2+ with exceptions
URL: http://raevnos.pennmush.org/code/ocaml-mysql/
Source0: http://raevnos.pennmush.org/code/ocaml-mysql/ocaml-mysql-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: sparc64 s390 s390x
Patch0: ocaml-mysql-1.0.4-CVE-2009-2942-missing-escape.patch
BuildRequires: ocaml >= 3.10.0
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-camlp4-devel
BuildRequires: mysql-devel
BuildRequires: chrpath
Requires: mysql-libs
%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
ocaml-mysql is a package for ocaml that provides access to mysql
databases. It consists of low level functions implemented in C and a
module Mysql intended for application development.
%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
%patch0 -p1
./configure --libdir=%{_libdir}
%build
make
%if %opt
make opt
%endif
strip dll*.so
chrpath --delete dll*.so
%install
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 COPYING
%{_libdir}/ocaml/mysql
%if %opt
%exclude %{_libdir}/ocaml/mysql/*.a
%exclude %{_libdir}/ocaml/mysql/*.cmxa
%exclude %{_libdir}/ocaml/mysql/*.cmx
%endif
%exclude %{_libdir}/ocaml/mysql/*.mli
%{_libdir}/ocaml/stublibs/*.so
%{_libdir}/ocaml/stublibs/*.so.owner
%files devel
%defattr(-,root,root,-)
%doc COPYING CHANGES doc/html README VERSION
%if %opt
%{_libdir}/ocaml/mysql/*.a
%{_libdir}/ocaml/mysql/*.cmxa
%{_libdir}/ocaml/mysql/*.cmx
%endif
%{_libdir}/ocaml/mysql/*.mli
%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jan 06 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-13
- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12).
* Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-12
- Rebuild for OCaml 3.11.2.
* Fri Oct 16 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-11
- Patch for CVE 2009-2942 Missing escape function (RHBZ#529321).
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sat May 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-9
- Rebuild for OCaml 3.11.1
* Thu Apr 16 2009 S390x secondary arch maintainer <fedora-s390x@lists.fedoraproject.org>
- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs
(added sparc64 per request from the sparc maintainer)
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-7
- Force another rebuild to try to get updated MySQL client deps.
* Sat Jan 17 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-6
- Requires mysql-libs, not automatically found.
* Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-5
- Rebuild for OCaml 3.11.0+rc1.
* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-4
- Rebuild for OCaml 3.11.0
* Wed Apr 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-3
- Rebuild for OCaml 3.10.2
* Mon Mar 3 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-2
- Don't need 'ExcludeArch: ppc64' any more.
- Add missing BR for ocaml-camlp4-devel.
- Test build in mock.
* Sun Feb 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-1
- Initial RPM release.