diff options
author | Fabiano Fidêncio <fidencio@redhat.com> | 2019-09-05 11:44:10 +0200 |
---|---|---|
committer | Fabiano Fidêncio <fidencio@redhat.com> | 2019-09-25 13:26:31 +0200 |
commit | aedb45b1ad047ac6651290b3bdea82b45cfe41a2 (patch) | |
tree | 33dc33c5c46cf348b6ec2d2fb6a2da94e545ed92 | |
parent | 6b48b4a274bd90cd149d8b6cea1dc25f305be0e7 (diff) | |
download | libosinfo-aedb45b1ad047ac6651290b3bdea82b45cfe41a2.tar.gz |
spec: Adapt to use meson
The changes needed in the spec files are not so intrusive.
One thing that has to be mentioned is the requirement for
mingw-filesystem >= 107 (which is only present on Fedora 30+) in order
to generate the mingw rpms for osinfo-db-tools. This huge bump in the
version happened because the `%mingw_ninja_install` was only recently
introduced to mingw-filesystem package.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
-rw-r--r-- | libosinfo.spec.in | 22 | ||||
-rw-r--r-- | mingw-libosinfo.spec.in | 21 |
2 files changed, 21 insertions, 22 deletions
diff --git a/libosinfo.spec.in b/libosinfo.spec.in index 2c58e74..9fb65cf 100644 --- a/libosinfo.spec.in +++ b/libosinfo.spec.in @@ -5,8 +5,9 @@ Name: libosinfo Version: @VERSION@ Release: 1%{?dist} License: LGPLv2+ -Source: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz +Source: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.xz URL: https://libosinfo.org/ +BuildRequires: meson BuildRequires: gcc BuildRequires: gettext-devel BuildRequires: glib2-devel @@ -47,23 +48,19 @@ Libraries, includes, etc. to compile with the libosinfo library %setup -q %build -%configure --enable-introspection=yes --enable-vala=yes -%__make %{?_smp_mflags} V=1 +%meson \ + -Denable-gtk-doc=true \ + -Denable-tests=true \ + -Denable-introspection=enabled \ + -Denable-vala=enabled %install -rm -fr %{buildroot} -%__make install DESTDIR=%{buildroot} -rm -f %{buildroot}%{_libdir}/*.a -rm -f %{buildroot}%{_libdir}/*.la +%meson_install %find_lang %{name} %check -if ! make check -then - cat tests/test-suite.log || true - exit 1 -fi +%meson_test %ldconfig_scriptlets @@ -89,6 +86,7 @@ fi %dir %{_datadir}/vala %dir %{_datadir}/vala/vapi +%{_datadir}/vala/vapi/libosinfo-1.0.deps %{_datadir}/vala/vapi/libosinfo-1.0.vapi %changelog diff --git a/mingw-libosinfo.spec.in b/mingw-libosinfo.spec.in index aa552b5..96e86c2 100644 --- a/mingw-libosinfo.spec.in +++ b/mingw-libosinfo.spec.in @@ -5,15 +5,16 @@ Version: @VERSION@ Release: 1%{?dist} Summary: MinGW Windows port of a library for managing OS information for virtualization License: LGPLv2+ -Source: https://releases.pagure.org/libosinfo/libosinfo-%{version}.tar.gz +Source: https://releases.pagure.org/libosinfo/libosinfo-%{version}.tar.xz URL: https://libosinfo.org/ BuildArch: noarch +BuildRequires: meson BuildRequires: gettext -BuildRequires: mingw32-filesystem >= 95 -BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw32-filesystem >= 107 +BuildRequires: mingw64-filesystem >= 107 BuildRequires: mingw32-gcc BuildRequires: mingw64-gcc BuildRequires: mingw32-binutils @@ -67,15 +68,15 @@ combination. %setup -q -n libosinfo-%{version} %build -%mingw_configure \ - --enable-introspection=no \ - --enable-tests=no - -%mingw_make %{?_smp_mflags} - +%mingw_meson \ + -Denable-gtk-doc=false \ + -Denable-tests=false \ + -Denable-introspection=disabled \ + -Denable-vala=disabled +%mingw_ninja %install -%mingw_make_install DESTDIR=$RPM_BUILD_ROOT +%mingw_ninja_install # Remove static libraries but DON'T remove *.dll.a files. rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/libosinfo-1.0.a |