File qbootctl.spec of Package qbootctl

#
# spec file for package phosh
#
# 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/
#


Name:           qbootctl
Version:        0.1.2
Release:        0
Summary:        Qualcomm bootctl HAL for Linux

License:        GPL-3.0-or-later
URL:            https://gitlab.com/sdm845-mainline/qbootctl/-/tree/0.1.2
Source0:        %{name}-%{version}.tar.bz2
Source1:        qbootctl.service
Patch0:         0001-fix-stdint-errors.patch

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  git
BuildRequires:  meson
BuildRequires:  gcc-c++
BuildRequires:  clang
BuildRequires:  llvm-gold
BuildRequires:  pkgconfig(zlib)
%{?systemd_ordering}

%description
This HAL was pulled from AOSP source code and bastardised to build and run on a musl/glibc system. This may or may not render any hardware you run it on unusable, you have been warned.

%prep
%autosetup -p1

%build
%meson \
	%{nil}
%meson_build

%install
%meson_install
%{__install} -Dpm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/qbootctl.service

%pre
%service_add_pre qbootctl.service

%post
%service_add_post qbootctl.service

%preun
%service_del_preun qbootctl.service

%postun
%service_del_postun qbootctl.service


%files
%{_bindir}/qbootctl
%{_unitdir}/qbootctl.service

%changelog
openSUSE Build Service is sponsored by