File timekeeper.spec of Package timekeeper

#
# spec file for package timekeeper
#
# 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:           timekeeper
Version:        0.1.0 
Release:        0
Summary:        Utility to keep/restore RTC offset for Qualcomm devices
License:        GPL-3.0-or-later
URL:            https://github.com/droidian/timekeeper
Source0:        %{name}-%{version}.tar.xz
Source1:        timekeeper.service
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  systemd-rpm-macros


%description
Utility to keep/restore RTC offset for Qualcomm devices
this is needed on devices with read only RTC drivers

%prep
%setup -q

%build
%cmake

%install
%cmake_install
%{__install} -Dm0644 -t %{buildroot}%{_unitdir} %{SOURCE1}

%pre
%service_add_pre timekeeper.service

%post
%service_add_post timekeeper.service

%preun
%service_del_preun timekeeper.service

%postun
%service_del_postun timekeeper.service

%files
%{_bindir}/timekeeper
%{_unitdir}/

%changelog

openSUSE Build Service is sponsored by