File qrtr.spec of Package qrtr

#
# spec file for package qrtr
#
# Copyright (c) 2022 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 _soname libqrtr1
Name:           qrtr
Version:        0.1
Release:        0
Summary:        Userspace reference for net/qrtr in the Linux kernel
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:        BSD-3-Clause
URL:            https://github.com/andersson/qrtr
Source:         %{name}-%{version}.tar.xz

%description
Userspace reference for net/qrtr in the Linux kernel

%package -n %{_soname}
Summary:        Library for %{name}
Group:          System/Libraries

%description -n %{_soname}
This package contains the library for %{name}.

%package -n %{name}-devel
Summary:        Development library for %{name}
Requires:       %{name} = %{version}
Requires:       pkgconfig

%description -n %{name}-devel
This package contains the development library for %{name}.

%prep
%setup -q

%build
%make_build prefix=%{_prefix} bindir=%{_bindir} libdir=%{_libdir} includedir=%{_includedir} servicedir=%{_unitdir}

%install
%make_install prefix=%{_prefix} bindir=%{_bindir} libdir=%{_libdir} includedir=%{_includedir} servicedir=%{_unitdir}


%post -n %{_soname} -p /sbin/ldconfig
%postun -n %{_soname} -p /sbin/ldconfig


%pre
%service_add_pre qrtr-ns.service

%post
%service_add_post qrtr-ns.service

%preun
%service_del_preun qrtr-ns.service

%postun
%service_del_postun qrtr-ns.service

%files
%{_bindir}/*
%{_unitdir}/*

%files -n %{_soname}
%{_libdir}/*.so.*

%files -n %{name}-devel
%{_libdir}/libqrtr.so
%{_includedir}/*


%changelog

openSUSE Build Service is sponsored by