File libfm-extra.spec of Package libfm-extra

#
# spec file for package libfm-extra
#
# Copyright (c) 2025 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  sover  4
Name:           libfm-extra
Version:        1.4.0
Release:        0
Summary:        A glib/gio-based lib used to develop file managers
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
URL:            https://github.com/lxde/libfm
Source0:        %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  c_compiler
# Optional: HTML developers documentation
BuildRequires:  gtk-doc >= 1.14
BuildRequires:  intltool
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glib-2.0)

%description
A glib/gio-based library providing some file management utilities and
related-widgets missing in gtk+/glib. This is the core of PCManFM. The
library is desktop independent (not LXDE specific) and has clean API.
It can be used to develop other applications requiring file management
functionality. For example, you can create your own file manager with
facilities provided by libfm.

%package     -n libfm-extra%{sover}
Summary:        A glib/gio-based lib used to develop file managers
Group:          Development/Libraries/C and C++

%description -n libfm-extra%{sover}
A glib/gio-based library providing some file management utilities and
related-widgets missing in gtk+/glib. This is the core of PCManFM. The
library is desktop independent (not LXDE specific) and has clean API.
It can be used to develop other applications requiring file management
functionality. For example, you can create your own file manager with
facilities provided by libfm.

%package        devel
Summary:        Devel files for libfm
Group:          Development/Libraries/C and C++
Requires:       libfm-extra%{sover} = %{version}
Requires:       pkgconfig

%description    devel
A glib/gio-based lib used to develop file managers providing some
file management utilities and related-widgets missing in gtk+/glib.

%prep
%autosetup -p1 -n libfm-%{version}

%build
./autogen.sh
%configure \
    --disable-static \
    --with-extra-only

# remove rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# macro for parallel make
%make_build

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%ldconfig_scriptlets -n libfm-extra%{sover}

%files -n libfm-extra%{sover}
%doc AUTHORS NEWS README TODO
%{_libdir}/libfm-extra.so.%{sover}
%{_libdir}/libfm-extra.so.%{sover}.*
%license COPYING

%files devel
%dir %{_includedir}/libfm-1.0
%{_includedir}/libfm-1.0/fm-extra.h
%{_includedir}/libfm-1.0/fm-version.h
%{_includedir}/libfm-1.0/fm-xml-file.h
%{_includedir}/libfm
%{_libdir}/pkgconfig/libfm-extra.pc
%{_libdir}/libfm-extra.so

%changelog
openSUSE Build Service is sponsored by