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-07-17 05:01:05 (GMT)
commitf68095248444c5ec76cf798fc39266ec38c6cbaf (patch)
treea496adcd6410ab8638e44d1c7f1456940868b76a
parentbe6734500796f6a57f55c7f42dacf9802d067d2f (diff)
downloadconnman-f68095248444c5ec76cf798fc39266ec38c6cbaf.zip
connman-f68095248444c5ec76cf798fc39266ec38c6cbaf.tar.gz
connman-f68095248444c5ec76cf798fc39266ec38c6cbaf.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 0f3c010..e8bfdad 100644
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -1,3 +1,5 @@
+%bcond_with connman_ntp
+
Name: connman
Version: 1.24
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