diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa4eb7a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/cairomm-1.16.0.tar.xz +/cairomm-1.16.0.tar.xz.sha1 +/cairomm-1.16.0.tar.xz.sha1.asc diff --git a/cairomm1.16.rpmlintrc b/cairomm1.16.rpmlintrc new file mode 100644 index 0000000..4be171f --- /dev/null +++ b/cairomm1.16.rpmlintrc @@ -0,0 +1,4 @@ +# Explicit dependencies among documentation packages are indeed reasonable +addFilter(r' explicit-lib-dependency .*-doc[s]?$') +# All of the documentation is in the -doc subpackage, of course! +addFilter(r' no-documentation$') diff --git a/cairomm1.16.spec b/cairomm1.16.spec new file mode 100644 index 0000000..ae3fcd1 --- /dev/null +++ b/cairomm1.16.spec @@ -0,0 +1,164 @@ +%global so_version 1 +%global apiver 1.16 + +# “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 + +Name: cairomm%{apiver} +Summary: C++ API for the cairo graphics library +Version: 1.16.0 +Release: 1%{?dist} + +URL: https://www.cairographics.org +License: LGPLv2+ + +%global src_base https://www.cairographics.org/releases +Source0: %{src_base}/cairomm-%{version}.tar.xz +# We cannot verify GPG signatures at this time because there is no published +# keychain or keyserver to get the signing key. (Additionally, the signature is +# over a cryptographically-weak SHA1 checksum.) See +# https://gitlab.freedesktop.org/cairo/cairomm/-/issues/25. +Source1: %{src_base}/cairomm-%{version}.tar.xz.sha1 +Source2: %{src_base}/cairomm-%{version}.tar.xz.sha1.asc +# Source3 reserved for future GPG keyring + +# https://gitlab.freedesktop.org/cairo/cairomm/-/issues/25 +# BuildRequires: gnupg2 + +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: pkgconfig + +BuildRequires: meson + +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(mm-common-libstdc++) +BuildRequires: pkgconfig(sigc++-3.0) +BuildRequires: pkgconfig(fontconfig) + +%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 + +# 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) + +# For tests: +BuildRequires: boost-devel + +%description +This library provides a C++ interface to cairo. + +The API/ABI version series is %{apiver}. + + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for developing +applications that use %{name}. + +The API/ABI version series is %{apiver}. + + +%package doc +Summary: Documentation for %{name} +BuildArch: noarch +Requires: libstdc++-docs +Requires: libsigc++20-doc + +%description doc +Documentation for %{name} can be viewed either through the devhelp +documentation browser or through a web browser at +%{_datadir}/doc/%{name}-%{apiver}/. + +The API/ABI version series is %{apiver}. + + +%prep +# https://gitlab.freedesktop.org/cairo/cairomm/-/issues/25 +pushd "$(dirname %{SOURCE1})" +sha1sum -c "$(basename %{SOURCE1})" +popd +# %%{gpgverify} --keyring='%%{SOURCE3}' --signature='%%{SOURCE2}' \ +# --data='%%{SOURCE1}' +%autosetup -n cairomm-%{version} +# 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/cairomm-%{apiver}.tag \ + untracked/docs/reference/cairomm-%{apiver}.devhelp2 + + +%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 + + +%install +%meson_install +find %{buildroot} -type f -name '*.la' -print -delete + +install -t %{buildroot}%{_datadir}/doc/cairomm-%{apiver} -m 0644 -p \ + AUTHORS ChangeLog MAINTAINERS NEWS README +cp -rp examples %{buildroot}%{_datadir}/doc/cairomm-%{apiver}/ + + +%check +%meson_test + + +%files +%license COPYING +%{_libdir}/libcairomm-%{apiver}.so.%{so_version} +%{_libdir}/libcairomm-%{apiver}.so.%{so_version}.* + + +%files devel +%{_includedir}/cairomm-%{apiver} +%{_libdir}/libcairomm-%{apiver}.so +%{_libdir}/pkgconfig/cairomm-%{apiver}.pc +%{_libdir}/pkgconfig/cairomm-*-%{apiver}.pc +%{_libdir}/cairomm-%{apiver} + + +%files doc +%license COPYING +%doc %{_datadir}/doc/cairomm-%{apiver}/ +%doc %{_datadir}/devhelp/ + + +%changelog +* Wed Feb 17 2021 Benjamin A. Beasley - 1.16.0-1 +- New multi-version cairomm1.16 package to provide the version 1.16 API/ABI; + based on the spec file from cairomm-1.14.2-5 diff --git a/sources b/sources new file mode 100644 index 0000000..61fa73a --- /dev/null +++ b/sources @@ -0,0 +1,3 @@ +SHA512 (cairomm-1.16.0.tar.xz) = 51929620feeac45377da5d486ea7a091bbd10ad8376fb16525328947b9e6ee740cdc8e8bd190a247b457cc9fec685a829c81de29b26cabaf95383ef04cce80d3 +SHA512 (cairomm-1.16.0.tar.xz.sha1) = 3c33c3fde4857fc2977698e46997c33051814550607c9fb8e024a029ef7b5167d9a5991ef26f716c2df296e2648b1784614ee9ef198b71da4df6dcdefb20c605 +SHA512 (cairomm-1.16.0.tar.xz.sha1.asc) = f26e421b393da03de6874af08dab34e89dda42ccf7a4de91609b78443918aa86968a1a8dd726caaedc0b06eb12433c49f271097fb8c9a0461a06c2db406fa585