File linuxdeploy-desktopfile.spec of Package linuxdeploy-desktopfile
#
# 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: liblinuxdeploy_desktopfile
Version: 0.1621091501.b9e6f2a
Release: 0
Summary: Dependency-free C++11 desktop file library
License: GPL-3.0-only
# FIXME: use correct group or remove it, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Libraries/C and C++
URL: https://github.com/linuxdeploy/linuxdeploy-desktopfile
Source0: linuxdeploy-desktopfile-%{version}.tar.xz
Patch0: disable_local_gtest.patch
BuildRequires: c++_compiler
BuildRequires: cmake
BuildRequires: gtest
%description
Dependency-free C++11 desktop file library.
Parse and write desktop files. Working on standard conformance!
%package -n linuxdeploy-desktopfile-devel
Summary: Dependency-free C++11 desktop file library
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description -n linuxdeploy-desktopfile-devel
Dependency-free C++11 desktop file library.
Parse and write desktop files. Working on standard conformance!
%prep
%setup -q -n linuxdeploy-desktopfile-%{version}
%patch0 -p1
mkdir build
%build
cd build
# FIXME: you should use the %%cmake macros
cmake ..
%make_build
%install
cd build
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}/linuxdeploy/desktopfile
install -m 0655 ../include/linuxdeploy/desktopfile/*.h %{buildroot}%{_includedir}/linuxdeploy/desktopfile/
install -m 0655 src/liblinuxdeploy_desktopfile.so %{buildroot}%{_libdir}/
install -m 0655 src/liblinuxdeploy_desktopfile_static.a %{buildroot}%{_libdir}/
%check
cd build
make test
%files
%license LICENSE.txt
%attr(0655,root,root) %{_libdir}/*.so
%files -n linuxdeploy-desktopfile-devel
%dir %{_includedir}/linuxdeploy
%dir %{_includedir}/linuxdeploy/desktopfile
%attr(0655,root,root) %{_libdir}/*.a
%attr(0655,root,root) %{_includedir}/linuxdeploy/desktopfile
%changelog