fix the spec
[profile/ivi/ofono.git] / packaging / ofono.spec
index a6f986f..dd77df3 100644 (file)
@@ -1,6 +1,6 @@
 Name:       ofono
 Summary:    Open Source Telephony
-Version:    1.6
+Version:    1.8
 Release:    6
 Group:      Communications/Connectivity Adaptation
 License:    GPLv2
@@ -37,7 +37,7 @@ Summary:    Test Scripts for oFono
 Group:      Development/Libraries
 Requires:   %{name} = %{version}-%{release}
 Requires:   dbus-python
-Requires:   pygobject2
+Requires:   pygobject
 Requires:   python-xml
 
 %description test
@@ -62,13 +62,15 @@ make %{?jobs:-j%jobs}
 mkdir -p %{buildroot}/usr/lib/systemd/system/network.target.wants
 ln -s ../ofono.service %{buildroot}/usr/lib/systemd/system/network.target.wants/ofono.service
 
-mkdir -p %{buildroot}/etc/rc.d/init.d
-cp %{SOURCE1} %{buildroot}/etc/rc.d/init.d/ofono
-chmod +x %{buildroot}/etc/rc.d/init.d/ofono
-
 %post
-ln -sf ../init.d/ofono /etc/rc.d/rc3.d/S61ofono
-ln -sf ../init.d/ofono /etc/rc.d/rc5.d/S61ofono
+systemctl daemon-reload
+systemctl restart ofono.service
+
+%preun
+systemctl stop ofono.service
+
+%postun
+systemctl daemon-reload
 
 %docs_package
 
@@ -78,7 +80,6 @@ ln -sf ../init.d/ofono /etc/rc.d/rc5.d/S61ofono
 /usr/lib/systemd/system/network.target.wants/ofono.service
 /usr/lib/systemd/system/ofono.service
 /etc/ofono/phonesim.conf
-/etc/rc.d/init.d/*
 
 %files devel
 %{_includedir}/ofono/*.h