timedatex/timedatex.spec
2019-09-30 11:18:29 -04:00

73 lines
1.8 KiB
RPMSpec

%global _hardened_build 1
Name: timedatex
Version: 0.5
Release: 7
Summary: D-Bus service for system clock and RTC settings
License: GPLv2+
URL: https://github.com/mlichvar/timedatex
Source0: https://github.com/mlichvar/timedatex/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: glib2-devel libselinux-devel
Requires: polkit systemd util-linux
Patch1: timedatex-timeout.patch
%description
timedatex is a D-Bus service that implements the org.freedesktop.timedate1
interface. It can be used to read and set the system clock, the real-time clock
(RTC), the system timezone, get a list of valid timezones, and enable or
disable an NTP client installed on the system. It is a replacement for the
systemd-timedated service.
%package help
Summary: help document for timedatex
BuildArch: noarch
%description help
help document for timedatex.
%prep
%autosetup -n %{name}-%{version} -p1 -Sgit
%build
%make_build CFLAGS="$RPM_OPT_FLAGS" EXTRA_LDFLAGS="%{__global_ldflags}"
%install
%makeinstall unitdir=$RPM_BUILD_ROOT%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system
ln -s /dev/null $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/timedatex.service
%check
make test
%pre
%preun
%systemd_preun %{name}.service
%post
%systemd_post %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%files
%defattr(-,root,root)
%doc COPYING NEWS README
%{_sysconfdir}/systemd/system/timedatex.service
%{_sbindir}/%{name}
%{_unitdir}/%{name}.service
%files help
%defattr(-,root,root)
%{_mandir}/man8/%{name}.8*
%changelog
* Mon Sep 29 2019 Xiuning Fang<fangxiuning@huawei.com> - 0.5.7
- delete mask systemd-timedated.service, mask timedatex.service
* Wed Aug 28 2019 Huiming Xie<xiehuiming@huawei.com> - 0.5.6
- Package init