# Update to 1.4.1 %bcond_with check # comment out when not a pre-release #define prerel rc2 %define rel 1.1 Name: meson Version: 1.5.1 Release: %{?prerel: -c %{prerel}} %{rel}%{?dist} Summary: High productivity build system Group: System/Packaging License: ASL 2.0 URL: http://mesonbuild.com/ Source0: https://github.com/mesonbuild/meson/releases/download/%{version}%{?prerel:%{prerel}}/%{name}-%{version}%{?prerel:%{prerel}}.tar.gz Source1: https://github.com/mesonbuild/meson/releases/download/%{version}%{?prerel:%{prerel}}/%{name}-%{version}%{?prerel:%{prerel}}.tar.gz.asc # Backported from upstream commit # # Based on patch from # https://github.com/mesonbuild/meson/pull/11484 Patch101: 0001-Add-support-for-runstatedir.patch BuildArch: noarch BuildRequires: git-core BuildRequires: pkgconfig(python3) BuildRequires: (python3dist(pip) or python3-pip) BuildRequires: (python3dist(setuptools) or python3-setuptools) %if %{with check} BuildRequires: locales BuildRequires: (ninja or ninja-build) # Various languages BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gcc-gfortran BuildRequires: gcc-objc BuildRequires: gcc-objc++ BuildRequires: java-devel BuildRequires: libasan-devel BuildRequires: llvm-devel BuildRequires: mono-core BuildRequires: pkgconfig(mono) BuildRequires: rust # Various libs support BuildRequires: bison BuildRequires: flex BuildRequires: gettext BuildRequires: git BuildRequires: gtk-doc BuildRequires: itstool BuildRequires: locales-en BuildRequires: vala BuildRequires: vala-tools BuildRequires: boost-devel BuildRequires: gnustep-base-devel BuildRequires: cups-devel BuildRequires: libwmf-devel BuildRequires: pcap-devel BuildRequires: qtbase5-devel BuildRequires: qttools5 BuildRequires: wxgtk3.0-devel BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-sharp-2.0) BuildRequires: pkgconfig(gmock) BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(ompi) BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(zlib) BuildRequires: python3-gobject3 BuildRequires: python3dist(cython) %endif Requires: (ninja or ninja-build) Requires: (python3dist(setuptools) or python3-setuptools) %description Meson is a build system designed to optimize programmer productivity. It aims to do this by providing simple, out-of-the-box support for modern software development tools and practices, such as unit tests, coverage reports, Valgrind, CCache and the like. %prep %autosetup -p1 %{?prerel: -n %{name}-%{version}%{prerel}} %if 0%{?mageia} || 0%{?centos} %py3_shebang_fix . %endif # Remove MPI tests for now because it is complicated to run. rm -rf "test cases/frameworks/17 mpi" %build # In pyproject-rpm-macros, which isn't automatically installed; this macro is # tested because the others are complicated macros that produce errors when # expanded in an if statement. %if "%{?pyproject_files}" != "" %pyproject_wheel %else %py3_build %endif %install %if "%{?pyproject_files}" != "" %pyproject_install %pyproject_save_files mesonbuild %else %py3_install %endif # install meson rpm macro helper install -D -m 0644 data/macros.%{name} %{buildroot}%{_rpmmacrodir}/macros.%{name} install -D -m 0644 -t %{buildroot}%{_datadir}/bash-completion/completions/ data/shell-completions/bash/meson install -D -m 0644 -t %{buildroot}%{_datadir}/zsh/site-functions/ data/shell-completions/zsh/_meson %if %{with check} %check export MESON_PRINT_TEST_OUTPUT=1 export LC_ALL=UTF-8 %{__python3} ./run_tests.py %endif %if "%{?pyproject_files}" != "" %files -f %{pyproject_files} %else %files %endif %doc README.md %license COPYING %{_bindir}/%{name} %{_mandir}/man1/%{name}.1.* %{_rpmmacrodir}/macros.%{name} %if "%{?pyproject_files}" == "" %{python3_sitelib}/mesonbuild/ %{python3_sitelib}/%{name}-%{version}%{?prerel:%{prerel}}-py%{python3_version}.egg-info/ %endif %{_datadir}/polkit-1/actions/com.mesonbuild.install.policy %{_datadir}/bash-completion/completions/meson %{_datadir}/zsh/site-functions/_meson