ocaml-mysql/ocaml-mysql.spec

124 lines
3.2 KiB
RPMSpec
Raw Normal View History

2008-03-04 18:21:59 +00:00
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
Name: ocaml-mysql
Version: 1.0.4
Release: 8%{?dist}
2008-03-04 18:21:59 +00:00
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)
BuildRequires: ocaml >= 3.10.0
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-camlp4-devel
BuildRequires: mysql-devel
BuildRequires: chrpath
Requires: mysql-libs
2008-03-04 18:21:59 +00:00
%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
./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
* 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.
2008-12-04 19:27:50 +00:00
* Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-5
- Rebuild for OCaml 3.11.0+rc1.
2008-11-24 11:39:00 +00:00
* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-4
- Rebuild for OCaml 3.11.0
2008-04-23 11:10:52 +00:00
* Wed Apr 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-3
- Rebuild for OCaml 3.10.2
2008-03-04 18:21:59 +00:00
* 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.