File libappimage.spec of Package libappimage

#
# spec file for package libappimage
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

%define sover 1_0

Name:           libappimage
Version:        1.0.3
Release:        0
Summary:        Core library of the AppImage project
License:        GPL-2.0+
Group:          System/Libraries
Url:            https://github.com/AppImage/libappimage
Source:         https://github.com/AppImage/libappimage/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM
Patch0:         linking.patch
BuildRequires:  extra-cmake-modules
BuildRequires:  update-desktop-files
BuildRequires:  clang
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  xdg-utils
BuildRequires:  wget
BuildRequires:  vim
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(liblzma)
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(squashfuse)
BuildRequires:  pkgconfig(libarchive)
BuildRequires:  pkgconfig(librsvg-2.0)
BuildRequires:  pkgconfig(libxdg-basedir)
BuildRequires:  cmake(XdgUtils)
BuildRequires:  libboost_filesystem-devel
BuildRequires:  lzo-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Implements functionality for dealing with AppImage files.

%package -n libappimage%{sover}
Summary:        Core library of the AppImage project
Group:          System/Libraries

%description -n libappimage%{sover}
Core library of the AppImage project.

This package contains the shared library.

%package devel
Summary:        Development files for libappimage
Group:          Development/Libraries/C and C++
Requires:       libappimage%{sover} = %{version}
Requires:       pkgconfig(glib-2.0)
Requires:       pkgconfig(cairo)

%description devel
Core library of the AppImage project.

This package contains the development files for libappimage.

%prep
%setup -q
%patch0 -p1

%build
%cmake \
  -DUSE_SYSTEM_XZ=ON \
  -DUSE_SYSTEM_LIBARCHIVE=ON \
  -DUSE_SYSTEM_SQUASHFUSE=ON \
  -DUSE_SYSTEM_XDGUTILS=ON \
  -DUSE_SYSTEM_BOOST=ON \
  -DBUILD_TESTING=OFF
%make_jobs

%install
%cmake_install

rm %{buildroot}/%{_libdir}/*.a ||:
sed -i 's,\/\/usr,\/,' %{buildroot}/%{_libdir}/pkgconfig/%{name}.pc

%post -n libappimage%{sover} -p /sbin/ldconfig
%postun -n libappimage%{sover} -p /sbin/ldconfig

%files -n libappimage%{sover}
%defattr(-,root,root,-)
%{_libdir}/%{name}.so.*

%files devel
%dir %{_includedir}/appimage
%{_includedir}/appimage/*
%{_libdir}/%{name}.so
%{_libdir}/cmake/
%{_libdir}/pkgconfig/%{name}.pc
openSUSE Build Service is sponsored by