ocaml-cairo/ocaml-cairo.spec

334 lines
12 KiB
RPMSpec
Raw Normal View History

%ifarch %{ocaml_native_compiler}
%global native_compiler 1
%else
%global native_compiler 0
%endif
# Important note!
# There are at least two quite separate OCaml cairo projects.
#
# This is (packaged in Fedora >= 23):
# http://forge.ocamlcore.org/projects/cairo/
# https://github.com/Chris00/ocaml-cairo
#
# The other one (which used to be packaged in Fedora <= 22) is:
# http://cairographics.org/cairo-ocaml/
# Packaging git pre-releases here.
2016-11-05 09:28:26 +00:00
%global commit be5a298c28d90b2c44b7c00066902b53834720b3
%global shortcommit %(c=%{commit}; echo ${c:0:7})
2008-03-01 19:03:48 +00:00
Name: ocaml-cairo
Epoch: 2
Version: 0.4.7
2019-12-06 15:31:38 +00:00
Release: 0.26.git%{shortcommit}%{?dist}
2008-03-01 19:03:48 +00:00
Summary: OCaml library for accessing cairo graphics
License: LGPLv3+
URL: https://github.com/Chris00/%{name}
Source0: https://github.com/Chris00/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
2008-03-01 19:03:48 +00:00
Source1: ocaml-cairo-META
BuildRequires: ocaml >= 3.10.0
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-lablgtk-devel
BuildRequires: cairo-devel >= 1.2.0
2008-03-01 19:03:48 +00:00
BuildRequires: gtk2-devel
%description
Cairo is a multi-platform library providing anti-aliased vector-based
rendering for multiple target backends. Paths consist of line segments
and cubic splines and can be rendered at any width with various join
and cap styles. All colors may be specified with optional translucence
(opacity/alpha) and combined using the extended Porter/Duff
compositing algebra as found in the X Render Extension.
Cairo exports a stateful rendering API similar in spirit to the path
construction, text, and painting operators of PostScript, (with the
significant addition of translucence in the imaging model). When
complete, the API is intended to support the complete imaging model of
PDF 1.4.
This package contains OCaml bindings for Cairo.
2008-03-01 19:03:48 +00:00
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: ocaml-lablgtk-devel
2008-03-01 19:03:48 +00:00
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%setup -q -n %{name}-%{commit}
2008-03-01 19:03:48 +00:00
cp %{SOURCE1} META
%build
# The upstream package uses some crackpot build system which is
# not supported in Fedora. Just build the files by hand instead.
pushd src
# OCaml files.
ocamlfind ocamlc -package lablgtk2 -g -c cairo.mli
ocamlfind ocamlc -package lablgtk2 -g -c cairo.ml
ocamlfind ocamlc -package lablgtk2 -g -c cairo_gtk.mli
ocamlfind ocamlc -package lablgtk2 -g -c cairo_gtk.ml
%if %{native_compiler}
ocamlfind ocamlopt -package lablgtk2 -g -c cairo.ml
ocamlfind ocamlopt -package lablgtk2 -g -c cairo_gtk.ml
%endif
# C files.
CFLAGS="%{optflags} -fPIC `pkg-config gtk+-2.0 --cflags` -I%{_libdir}/ocaml -I%{_libdir}/ocaml/lablgtk2"
gcc $CFLAGS -c cairo_stubs.c
gcc $CFLAGS -c cairo_gtk_stubs.c
# Build the two libraries, twice (bytecode & native).
ocamlfind ocamlmklib -o cairo2 cairo_stubs.o cairo.cmo \
`pkg-config gtk+-2.0 --libs`
ocamlfind ocamlmklib -o cairo_gtk cairo_gtk_stubs.o cairo_gtk.cmo \
`pkg-config gtk+-2.0 --libs`
%if %{native_compiler}
ocamlfind ocamlmklib -o cairo2 cairo_stubs.o cairo.cmx \
`pkg-config gtk+-2.0 --libs`
ocamlfind ocamlmklib -o cairo_gtk cairo_gtk_stubs.o cairo_gtk.cmx \
`pkg-config gtk+-2.0 --libs`
%endif
popd
2008-03-01 19:03:48 +00:00
%install
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
%if %{native_compiler}
ocamlfind install cairo2 src/{*.mli,*.cmi,*.cma,*.a,*.cmxa,*.cmx,dll*.so} META
%else
ocamlfind install cairo2 src/{*.mli,*.cmi,*.cma,dll*.so} META
%endif
2008-03-01 19:03:48 +00:00
%files
%{_libdir}/ocaml/cairo2
%if %{native_compiler}
%exclude %{_libdir}/ocaml/cairo2/*.a
%exclude %{_libdir}/ocaml/cairo2/*.cmxa
%exclude %{_libdir}/ocaml/cairo2/*.cmx
2008-03-01 19:03:48 +00:00
%endif
%exclude %{_libdir}/ocaml/cairo2/*.mli
2008-03-01 19:03:48 +00:00
%{_libdir}/ocaml/stublibs/*.so
%{_libdir}/ocaml/stublibs/*.so.owner
%files devel
# XXX The tutorial doesn't build.
%doc examples
%if %{native_compiler}
%{_libdir}/ocaml/cairo2/*.a
%{_libdir}/ocaml/cairo2/*.cmxa
%{_libdir}/ocaml/cairo2/*.cmx
2008-03-01 19:03:48 +00:00
%endif
%{_libdir}/ocaml/cairo2/*.mli
2008-03-01 19:03:48 +00:00
%changelog
2019-12-06 15:31:38 +00:00
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.26.gitbe5a298
- OCaml 4.09.0 (final) rebuild.
2019-08-16 16:38:41 +00:00
* Fri Aug 16 2019 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.25.gitbe5a298
- OCaml 4.08.1 (final) rebuild.
2019-08-01 07:42:43 +00:00
* Thu Aug 01 2019 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.24.gitbe5a298
- OCaml 4.08.1 (rc2) rebuild.
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.23.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.22.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.21.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2018-07-11 17:54:18 +00:00
* Wed Jul 11 2018 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.20.gitbe5a298
- OCaml 4.07.0 (final) rebuild.
2018-06-20 19:07:18 +00:00
* Wed Jun 20 2018 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.19.gitbe5a298
- OCaml 4.07.0-rc1 rebuild.
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.18.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2017-11-17 23:41:59 +00:00
* Fri Nov 17 2017 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.17.gitbe5a298
- OCaml 4.06.0 rebuild.
2017-08-08 19:31:54 +00:00
* Tue Aug 08 2017 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.16.gitbe5a298
- OCaml 4.05.0 rebuild.
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.15.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.14.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2017-06-26 21:33:15 +00:00
* Mon Jun 26 2017 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.13.gitbe5a298
- OCaml 4.04.2 rebuild.
2017-05-12 14:28:03 +00:00
* Fri May 12 2017 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.12.gitbe5a298
- OCaml 4.04.1 rebuild.
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.11.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2016-11-05 09:28:26 +00:00
* Sat Nov 05 2016 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.10
- Move to latest git commit upstream.
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.9.git675e51b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2015-07-28 17:04:26 +00:00
* Tue Jul 28 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.8.git675e51b
- OCaml 4.02.3 rebuild.
* Wed Jul 22 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.7.git675e51b
- Move to latest git commit upstream.
- Enable bytecode builds.
2015-06-24 19:08:14 +00:00
* Wed Jun 24 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.6.git5c1df15
- ocaml-4.02.2 final rebuild.
2015-06-17 19:00:12 +00:00
* Wed Jun 17 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.5.git5c1df15
- ocaml-4.02.2 rebuild.
* Thu Mar 19 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.4.git5c1df15
- Switch bindings to https://github.com/Chris00/ocaml-cairo
- See: https://lists.fedoraproject.org/pipermail/devel/2015-March/209182.html
2015-02-17 09:29:08 +00:00
* Tue Feb 17 2015 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.20.git872c9bc92e6
- ocaml-4.02.1 rebuild.
2014-10-31 15:47:28 +00:00
* Fri Oct 31 2014 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.19.git872c9bc92e6
- Update to latest git
2014-08-30 19:54:05 +00:00
* Sat Aug 30 2014 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.18.git08b40192975
- ocaml-4.02.0 final rebuild.
2014-08-23 17:43:58 +00:00
* Sat Aug 23 2014 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.17.git08b40192975
- ocaml-4.02.0+rc1 rebuild.
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.16.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Aug 02 2014 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.15.git08b40192975
- ocaml-4.02.0-0.8.git10e45753.fc22 rebuild.
2014-07-23 11:19:25 +00:00
* Wed Jul 23 2014 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.14.git08b40192975
- OCaml 4.02.0 beta rebuild.
2014-07-14 16:05:47 +00:00
* Mon Jul 14 2014 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.13.git08b40192975
- Rebuild for OCaml 4.02
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.12.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Sep 14 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.11.git08b40192975
- Rebuild for OCaml 4.01.0.
- Enable debuginfo.
- Modernize the spec file.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.10.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.9.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2012-10-17 15:56:45 +00:00
* Wed Oct 17 2012 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.8.git08b40192975
- Rebuild for OCaml 4.00.1.
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.7.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-06-08 15:38:43 +00:00
* Fri Jun 8 2012 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.6.git08b40192975
- Rebuild for OCaml 4.00.0.
* Fri Jan 6 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.5.git08b40192975
- Update to git commit 08b40192975 (dated 2011-09-11).
- Rebuild for OCaml 3.12.1.
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.4.gita5c5ee9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2011-01-05 16:09:04 +00:00
* Wed Jan 5 2011 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.3.gita5c5ee9f
- Rebuild for OCaml 3.12
2009-12-30 13:47:49 +00:00
* Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.2.gita5c5ee9f
- Rebuild for OCaml 3.11.2.
* Mon Dec 7 2009 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.1.gita5c5ee9f
- So we are wrong, version numbers did NOT roll backwards.
- Revert to current git head (a5c5ee9f) which is a pre-release of 1.2.0
(RHBZ#541542).
- Replace %%define with %%global.
- Patch0 is now upstream.
- Checked package with rpmlint - no problems.
* Thu Nov 26 2009 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.0-2
- ocaml-cairo-devel requires ocaml-lablgtk-devel (RHBZ#541427).
* Thu Oct 8 2009 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.0-1
- New upstream version 1.0.0.
- Yes, version number really did roll backwards, so now we're using Epoch.
- Patch for compatibility with OCaml 3.11.1 (renamed bigarray structs).
2009-09-29 15:16:06 +00:00
* Tue Sep 29 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080301-11
- Force rebuild against newer lablgtk.
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0.cvs20080301-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2009-05-23 09:05:28 +00:00
* Sat May 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080301-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.2.0.cvs20080301-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2009-02-07 09:25:18 +00:00
* Sat Feb 7 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080301-7
- Rebuild against updated lablgtk.
* Tue Dec 9 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080301-6
- Include cairo.a and cairo_lablgtk.a (fixes BZ 475349).
2008-12-04 12:40:29 +00:00
* Thu Dec 4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080301-5
- Rebuild.
2008-11-24 10:49:32 +00:00
* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080301-4
- Rebuild for OCaml 3.11.0
2008-04-23 16:17:01 +00:00
* Wed Apr 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080301-3
- Rebuild for OCaml 3.10.2
2008-03-01 19:06:48 +00:00
* Sat Mar 1 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080301-2
2008-03-01 19:03:48 +00:00
- Upgrade to latest CVS.
- Include instructions on how check out versions from CVS.
2008-03-01 19:06:48 +00:00
- Build for ppc64.
2008-03-01 19:03:48 +00:00
* Fri Feb 29 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080224-2
- Added BRs for automake and gtk2-devel.
* Sun Feb 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080224-1
- Initial RPM release.