cairomm/cairomm.spec

175 lines
5.1 KiB
RPMSpec
Raw Normal View History

%global so_version 1
%global apiver 1.0
# “Let mm-common-get copy some files to untracked/”, i.e., replace scripts from
# the tarball with those from mm-common. This is (potentially) required if
# building an autotools-generated tarball with meson, or vice versa.
%bcond_without maintainer_mode
2010-07-14 15:01:58 +00:00
2015-09-22 12:24:11 +00:00
Name: cairomm
2021-02-10 23:42:39 +00:00
Summary: C++ API for the cairo graphics library
Version: 1.14.2
2021-07-20 18:48:02 +00:00
Release: %autorelease -b 3
2021-02-10 23:42:39 +00:00
2021-02-11 14:50:45 +00:00
URL: https://www.cairographics.org
2015-09-22 12:24:11 +00:00
License: LGPLv2+
2021-02-10 23:42:39 +00:00
%global src_base https://www.cairographics.org/releases
Source0: %{src_base}/%{name}-%{version}.tar.xz
# No keyring with authorized GPG signing keys is published
# (https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/331), but we
# are able to verify the signature using the key for Kjell Ahlstedt from
# https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/290.
Source1: %{src_base}/cairomm-%{version}.tar.xz.asc
Source2: https://gitlab.freedesktop.org/freedesktop/freedesktop/uploads/0ac64e9582659f70a719d59fb02cd037/gpg_key.pub
BuildRequires: gnupg2
2021-02-10 23:42:39 +00:00
BuildRequires: gcc-c++
BuildRequires: meson
2021-02-10 23:42:39 +00:00
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(sigc++-2.0)
BuildRequires: pkgconfig(fontconfig)
# Everything mentioned in data/cairomm*.pc.in, except the Quartz and Win32
# libraries that do not apply to this platform:
BuildRequires: pkgconfig(cairo-ft)
BuildRequires: pkgconfig(cairo-pdf)
BuildRequires: pkgconfig(cairo-png)
BuildRequires: pkgconfig(cairo-ps)
BuildRequires: pkgconfig(cairo-svg)
BuildRequires: pkgconfig(cairo-xlib)
BuildRequires: pkgconfig(cairo-xlib-xrender)
%if %{with maintainer_mode}
# mm-common-get
BuildRequires: mm-common
%endif
BuildRequires: perl-interpreter
BuildRequires: perl(Getopt::Long)
BuildRequires: doxygen
# dot
BuildRequires: graphviz
# xsltproc
BuildRequires: libxslt
BuildRequires: pkgconfig(mm-common-libstdc++)
# For tests:
BuildRequires: boost-devel
# Based on discussion in
# https://src.fedoraproject.org/rpms/pangomm/pull-request/2, cairomm will
# continue to provide API/ABI version 1.0 indefinitely, with the cairomm1.16
# package providing the new 1.16 API/ABI series. This virtual Provides is
# therefore no longer required, as dependent packages requiring the 1.0 API/ABI
# may safely require cairomm and its subpackages.
Provides: %{name}%{apiver}%{?_isa} = %{version}-%{release}
2021-02-10 23:53:15 +00:00
%description
This library provides a C++ interface to cairo.
The API/ABI version series is %{apiver}.
2021-02-10 23:42:39 +00:00
%package devel
2021-02-10 23:53:15 +00:00
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: %{name}%{apiver}-devel%{?_isa} = %{version}-%{release}
2021-02-10 23:53:15 +00:00
%description devel
The %{name}-devel package contains libraries and header files for developing
applications that use %{name}.
2007-07-21 05:06:40 +00:00
The API/ABI version series is %{apiver}.
2011-07-29 01:51:13 +00:00
%package doc
2021-02-10 23:53:15 +00:00
Summary: Documentation for %{name}
2011-07-29 01:51:13 +00:00
BuildArch: noarch
Requires: libstdc++-docs
Requires: libsigc++20-doc
2009-11-18 15:10:54 +00:00
Provides: %{name}%{apiver}-doc = %{version}-%{release}
2021-02-10 23:53:15 +00:00
%description doc
Documentation for %{name} can be viewed either through the devhelp
documentation browser or through a web browser at
%{_datadir}/doc/%{name}-%{apiver}/.
2009-11-18 15:10:54 +00:00
The API/ABI version series is %{apiver}.
2009-11-18 15:10:54 +00:00
%prep
# Import developers public GPG key to a keyring that we can use for signature
# verification.
workdir="$(mktemp --directory)"
gpg2 --homedir="${workdir}" --yes --import '%{SOURCE2}'
gpg2 --homedir="${workdir}" --export --export-options export-minimal \
> %{name}.gpg
rm -rf "${workdir}"
%{gpgverify} \
--keyring='%{name}.gpg' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup
# We must remove the jQuery/jQueryUI bundle with precompiled/minified/bundled
# JavaScript that is in untracked/docs/reference/html/jquery.js, since such
# sources are banned in Fedora. (Note also that the bundled JavaScript had a
# different license.) We also remove the tag file, which triggers a rebuild of
# the documentation. While we are at it, we might as well rebuild the devhelp
# XML too.
rm -rf untracked/docs/reference/html
rm untracked/docs/reference/%{name}-%{apiver}.tag \
untracked/docs/reference/%{name}-%{apiver}.devhelp2
2021-02-10 23:42:39 +00:00
%build
%meson \
-Dmaintainer-mode=%{?with_maintainer_mode:true}%{?!with_maintainer_mode:false} \
-Dbuild-documentation=true \
-Dbuild-examples=false \
-Dbuild-tests=true \
-Dboost-shared=true \
-Dwarnings=max
%meson_build
2021-02-10 23:42:39 +00:00
%install
%meson_install
find %{buildroot} -type f -name '*.la' -print -delete
install -t %{buildroot}%{_datadir}/doc/%{name}-%{apiver} -m 0644 -p \
AUTHORS ChangeLog MAINTAINERS NEWS README
cp -rp examples %{buildroot}%{_datadir}/doc/%{name}-%{apiver}/
2021-02-10 23:42:39 +00:00
%check
%meson_test
%files
2015-09-22 19:58:00 +00:00
%license COPYING
%{_libdir}/lib%{name}-%{apiver}.so.%{so_version}
%{_libdir}/lib%{name}-%{apiver}.so.%{so_version}.*
2021-02-10 23:42:39 +00:00
%files devel
2011-02-24 12:59:23 +00:00
%{_includedir}/%{name}-%{apiver}
%{_libdir}/lib%{name}-%{apiver}.so
%{_libdir}/pkgconfig/%{name}-%{apiver}.pc
%{_libdir}/pkgconfig/%{name}-*-%{apiver}.pc
2011-02-24 12:59:23 +00:00
%{_libdir}/%{name}-%{apiver}
2021-02-10 23:42:39 +00:00
2009-11-18 15:10:54 +00:00
%files doc
%license COPYING
2011-02-25 13:30:48 +00:00
%doc %{_datadir}/doc/%{name}-%{apiver}/
%doc %{_datadir}/devhelp/
2009-11-18 15:10:54 +00:00
2021-02-10 23:42:39 +00:00
%changelog
2021-07-20 18:36:53 +00:00
%autochangelog