%global appstream_version 0.16.0
%global debugedit_version 5.0
%global glib2_version 2.66
%global ostree_version 2017.14
%global flatpak_version 0.99.1
%global __requires_exclude ^/usr/bin/python2$
Name: flatpak-builder
Version: 1.4.10
Release: 1
Summary: Tool to build flatpaks from source
License: LGPL-2.1-or-later and GPL-2.0-or-later
URL: https://flatpak.org/
Source0: https://github.com/flatpak/flatpak-builder/releases/download/%{version}/%{name}-%{version}.tar.xz
BuildRequires: appstream-compose >= %{appstream_version}
BuildRequires: gettext
BuildRequires: debugedit >= %{debugedit_version}
BuildRequires: docbook-dtds
BuildRequires: docbook-style-xsl
BuildRequires: flatpak >= %{flatpak_version}
BuildRequires: libcap-devel
BuildRequires: meson
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libelf)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(ostree-1) >= %{ostree_version}
BuildRequires: pkgconfig(yaml-0.1)
BuildRequires: /usr/bin/xmlto
BuildRequires: /usr/bin/xsltproc
Requires: appstream-compose >= %{appstream_version}
Requires: debugedit >= %{debugedit_version}
Requires: flatpak%{?_isa} >= %{flatpak_version}
Requires: glib2%{?_isa} >= %{glib2_version}
Requires: ostree-libs%{?_isa} >= %{ostree_version}
Requires: /usr/bin/rofiles-fuse
# Recommend various things that may or may not be needed depending on the code being built
Recommends: /usr/bin/bsdunzip
Recommends: /usr/bin/bzip2
Recommends: /usr/bin/eu-strip
Recommends: /usr/bin/git
Recommends: /usr/bin/patch
Recommends: /usr/bin/strip
Recommends: /usr/bin/tar
Recommends: /usr/bin/zstd
Recommends: ccache
%description
Flatpak-builder is a tool for building flatpaks from sources.
See https://flatpak.org/ for more information.
%package tests
Summary: Tests for %{name}
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description tests
This package contains installed tests for %{name}.
%prep
%autosetup -p1
%build
%meson \
-Ddocs=enabled \
-Dfuse=3 \
-Dinstalled_tests=true \
-Dyaml=enabled
%meson_build
%install
%meson_install
install -pm 644 NEWS README.md %{buildroot}/%{_pkgdocdir}
%files
%license COPYING
%doc %{_pkgdocdir}
%{_bindir}/flatpak-builder
%{_mandir}/man1/flatpak-builder.1*
%{_mandir}/man5/flatpak-manifest.5*
%files tests
%{_datadir}/installed-tests
%{_libexecdir}/installed-tests
%changelog
* Wed Jul 08 2026 dongqi <dongqi1@kylinos.cn> - 1.4.10-1
- update to version 1.4.10
- Rewrite locale migration to use fd-based traversal
- Various improvements to tests
* Fri May 08 2026 lvgenggeng <lvgenggeng@uniontech.com> - 1.4.8-1
- update to version 1.4.8
* Thu Dec 11 2025 liweigang <liweiganga@gmail.com> - 1.4.7-1
- update to version 1.4.7
* Fri Sep 20 2024 lvgenggeng <lvgenggeng@uniontech.com> - 1.3.5-2
- spec: add doc files
* Thu Nov 23 2023 zhangxianting <zhangxianting@uniontech.com> - 1.3.5-1
- update to version 1.3.5
* Tue Jun 21 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 1.2.2-1
- update to 1.2.2
* Mon Jun 20 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 1.0.14-3
- Add flatpak-builder.yaml
* Wed Jun 15 2022 wenlong ding <wenlong.ding@turbolinux.com.cn> - 1.0.14-2
- Add BuildRequires pkgconfig(libdw)
* Thu Aug 05 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 1.0.14-1
- Package init with 1.0.14