File passim.spec of Package passim

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


Name:           passim
Version:        0.1.4
Release:        0
Summary:        A local caching server
License:        LGPL-2.1-or-later
URL:            https://github.com/hughsie/passim
Source:         %{name}-%{version}.tar.zst
BuildRequires:  meson >= 0.61.0
BuildRequires:  pkgconfig systemd-rpm-macros
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.68.0
BuildRequires:  pkgconfig(gnutls) >= 3.6.0
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(libsoup-3.0) >= 3.4.0
BuildRequires:  pkgconfig(systemd) >= 211
Provides:       dbus(org.freedesktop.Passim)

%description
A local caching server. Named after the Latin word for “here, there and everywhere”.

%package devel
Summary:        Development files for libpassim
Requires:       libpassim1 = %{version}
Requires:       typelib-1_0-Passim-1_0 = %{version}

%description devel
A local caching server. Named after the Latin word for “here, there and everywhere”.

%package -n libpassim1
Summary:        A local caching server library
Requires:       dbus(org.freedesktop.Passim)

%description -n libpassim1
A local caching server. Named after the Latin word for “here, there and everywhere”.

%package -n typelib-1_0-Passim-1_0
Summary:        A local caching server

%description -n typelib-1_0-Passim-1_0
A local caching server. Named after the Latin word for “here, there and everywhere”.

%prep
%autosetup

%build
%meson
%meson_build

%install
%meson_install

%pre
%service_add_pre passim.service

%post
%service_add_post passim.service

%preun
%service_del_preun passim.service

%postun
%service_del_postun passim.service

%ldconfig_scriptlets -n libpassim1

%files
%license LICENSE
%doc README.md
%{_bindir}/passim
%{_sysconfdir}/passim.conf
%{_unitdir}/passim.service
%config(noreplace) %{_sysusersdir}/passim.conf
%{_libexecdir}/passimd
%{_datadir}/dbus-1/interfaces/org.freedesktop.Passim.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.Passim.service
%{_datadir}/dbus-1/system.d/org.freedesktop.Passim.conf
%{_datadir}/icons/hicolor/
%{_mandir}/man1/passim.1%{?ext_man}
%{_datadir}/metainfo/org.freedesktop.Passim.metainfo.xml
%{_datadir}/passim/
%{_localstatedir}/lib/passim/

%files devel
%{_includedir}/passim-1/
%{_libdir}/libpassim.so
%{_libdir}/pkgconfig/passim.pc
%{_datadir}/gir-1.0/Passim-1.0.gir

%files -n libpassim1
%{_libdir}/libpassim.so.1*

%files -n typelib-1_0-Passim-1_0
%{_libdir}/girepository-1.0/Passim-1.0.typelib

%changelog
openSUSE Build Service is sponsored by