File buildstream.spec of Package buildstream
#
# spec file for package buildstream
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pythons python3
Name: buildstream
Version: 1.95.6
Release: 0
Summary: A framework for modelling build pipelines in YAML
License: Apache-2.0
Group: Development/Tools/Building
URL: https://buildstream.build/
# Switch to https://files.pythonhosted.org/packages/source/b/buildstream/%{name}-%{version}.tar.gz
# once BuildStream 2 replaces version 1.
Source0: https://github.com/apache/buildstream/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python3-setuptools >= 36.6.0
BuildRequires: python3-wheel
BuildRequires: python3-Cython >= 0.29.25
BuildRequires: python3-packaging
BuildRequires: python3-pip
Requires: bubblewrap
Requires: fuse
Requires: fuse-devel
%description
BuildStream is an Open Source tool for building/integrating software stacks.
It takes inspiration, lessons and use-cases from various projects including
OBS, Reproducible Builds, Yocto, Baserock, Buildroot, Aboriginal, GNOME
Continuous, JHBuild, Flatpak Builder and Android repo.
BuildStream supports multiple build-systems (e.g. autotools, cmake, cpan,
distutils, make, meson, qmake), and can create outputs in a range of formats
(e.g. debian packages, flatpak runtimes, sysroots, system images) for
multiple platforms and chipsets.
%prep
%autosetup -p1
%build
%pyproject_wheel
%install
%pyproject_install
#
# Remove duplicate files
#
%fdupes %{buildroot}%{python3_sitearch}
#
# Empty files (E: zero-length)
#
echo bar > %{buildroot}%{python3_sitearch}/buildstream/_testing/_sourcetests/project/files/bar
echo foo > %{buildroot}%{python3_sitearch}/buildstream/_testing/_sourcetests/project/files/foo
#
# Fix shebang issues
#
sed -i '1s,%{_bindir}/env python3,# &,' %{buildroot}%{python3_sitearch}/buildstream/_testing/_update_cachekeys.py
sed -i '1s,/bin/sh,# &,' %{buildroot}%{python3_sitearch}/buildstream/data/build-all.sh.in
sed -i '1s,/bin/sh,# &,' %{buildroot}%{python3_sitearch}/buildstream/data/build-module.sh.in
%files
%license LICENSE
%doc COMMITTERS.rst CONTRIBUTING.rst NEWS NOTICE README.rst
%{_bindir}/bst
%{_datadir}/bash-completion/completions/bst
%{_mandir}/man1/bst*%{ext_man}
%{python3_sitearch}/BuildStream-%{version}.dist-info/
%{python3_sitearch}/buildstream/
%changelog