summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2014-07-04 06:33:55 (GMT)
committerZhang zhengguang <zhengguang.zhang@intel.com>2014-10-31 08:06:20 (GMT)
commit346988b0c78109cce94fec48f8eeb16719426fa3 (patch)
treeaa3ba1753e8a5fc876c1d9ccf01608632e8d0c03
parent85053773dfe482c81ca1ac87dc6baf2ff6b29df0 (diff)
downloadconnman-346988b0c78109cce94fec48f8eeb16719426fa3.zip
connman-346988b0c78109cce94fec48f8eeb16719426fa3.tar.gz
connman-346988b0c78109cce94fec48f8eeb16719426fa3.tar.bz2
Enable ConnMan NTP configurable in spec file
-rw-r--r--packaging/connman.spec19
1 files changed, 19 insertions, 0 deletions
diff --git a/packaging/connman.spec b/packaging/connman.spec
index c43deaa..5438f4c 100644
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -1,3 +1,5 @@
+%bcond_with connman_ntp
+
Name: connman
Version: 1.26
Release: 1
@@ -6,6 +8,8 @@ Summary: Connection Manager
Url: http://connman.net
Group: Network & Connectivity/Connection Management
Source0: %{name}-%{version}.tar.gz
+Source10: 40-connman-ntp.list
+Source11: connman-ntp.service
Source1001: connman.manifest
BuildRequires: systemd
BuildRequires: pkgconfig(dbus-1)
@@ -62,6 +66,14 @@ make %{?_smp_mflags}
%install
%make_install
+%if %{with connman_ntp}
+mkdir -p %{buildroot}/usr/lib/systemd/ntp-units.d
+install -m644 %{SOURCE10} %{buildroot}/usr/lib/systemd/ntp-units.d
+install -m644 %{SOURCE11} %{buildroot}%{_unitdir}
+%install_service network.target.wants connman-ntp.service
+%install_service multi-user.target.wants connman-ntp.service
+%endif
+
mkdir -p %{buildroot}%{_sysconfdir}/connman
cp src/main.conf %{buildroot}%{_sysconfdir}/connman/main.conf
@@ -89,6 +101,13 @@ systemctl daemon-reload
%{_unitdir}/connman.service
%{_unitdir}/network.target.wants/connman.service
%{_unitdir}/multi-user.target.wants/connman.service
+%if %{with connman_ntp}
+%dir /usr/lib/systemd/ntp-units.d
+%{_unitdir}/connman-ntp.service
+%{_unitdir}/multi-user.target.wants/connman-ntp.service
+%{_unitdir}/network.target.wants/connman-ntp.service
+/usr/lib/systemd/ntp-units.d/40-connman-ntp.list
+%endif
%files test
%manifest %{name}.manifest