File linuxdeploy.spec of Package linuxdeploy

#
# spec file for package linuxdeploy
#
# Copyright (c) 2021 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/
#


# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
Name:           linuxdeploy
Version:        0.1751829341.3fa1530
Release:        0
Summary:        A helper application for AppImage
License:        GPL-3.0-only
# FIXME: use correct group or remove it, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group:          Development/Tools/Building
URL:            https://github.com/linuxdeploy/linuxdeploy
Source0:        %{name}-%{version}.tar.xz
Source1:        excludelist
Patch1:         avoid_download.patch
Patch2:         overwrite_git_version.patch
Patch3:         build_fixes.patch
Patch4:         do_not_build_linuxdeploy-desktopfile.patch
BuildRequires:  CImg-devel
BuildRequires:  c++_compiler
BuildRequires:  cmake
# for libmagic headers
BuildRequires:  file-devel
BuildRequires:  glibc-devel-static
BuildRequires:  gmock
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  zlib-devel
BuildRequires:  liblinuxdeploy_desktopfile-devel
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_regex-devel
BuildRequires:  gtest
BuildRequires:  patchelf
Requires:       appimagetool
Requires:       patchelf
Requires:       liblinuxdeploy_desktopfile
#Requires:  pkgconfig(Qt5Quick)

%description
Makes Linux applications self-contained by copying in the Qt libraries and plugins that the application uses.

The tool is working also for non-Qt applications.

%prep
%autosetup -p1
cp %{SOURCE1} .
cp %{S:1} .
cd src/core
bash ./generate-excludelist.sh
cd -
mkdir build

%build
cd build
export TRAVIS_BUILD_NUMBER=%{release}
export RPM_COMMIT_VERSION=%{version}
# FIXME: you should use the %%cmake macros
cmake -DBUILD_TESTING=ON -DUSE_SYSTEM_BOOST=ON -DUSE_SYSTEM_CIMG=ON -DUSE_CCACHE=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
%make_build

%install
cd build
mkdir -p %{buildroot}/%{_bindir}
install -m 0755 bin/linuxdeploy %{buildroot}/%{_bindir}/

%check
cd build
./bin/plugin_test || exit 1
# missing test data
#./bin/appdir_test || exit 1

%files
%license LICENSE.txt
%doc README.md
%attr(0755,root,root) %{_bindir}/*

%changelog
openSUSE Build Service is sponsored by