summaryrefslogtreecommitdiff
path: root/packaging/oma-dm-agent.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/oma-dm-agent.spec')
-rwxr-xr-xpackaging/oma-dm-agent.spec163
1 files changed, 163 insertions, 0 deletions
diff --git a/packaging/oma-dm-agent.spec b/packaging/oma-dm-agent.spec
new file mode 100755
index 0000000..66602c8
--- /dev/null
+++ b/packaging/oma-dm-agent.spec
@@ -0,0 +1,163 @@
+Name: oma-dm-agent
+Summary: oma-dm-agent daemon for FOTA,DM,CP,FMM Service
+Version: 0.1.4
+Release: 1
+Group: TO_BE/FILLED_IN
+License: Apache License, Version 2.0
+Source0: oma-dm-agent-%{version}.tar.gz
+
+#Requires(post): /sbin/ldconfig
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(sqlite3)
+BuildRequires: pkgconfig(libsoup-2.4)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(libwbxml2)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(check)
+BuildRequires: pkgconfig(sync-agent)
+BuildRequires: pkgconfig(aul)
+BuildRequires: pkgconfig(appsvc)
+BuildRequires: pkgconfig(push)
+BuildRequires: pkgconfig(sysman)
+BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(location)
+BuildRequires: pkgconfig(tapi)
+BuildRequires: pkgconfig(pmapi)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(capi-telephony-sim)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(dbus-glib-1)
+#BuildRequires: pkgconfig(oauth)
+#BuildRequires: pkgconfig(samsung-sso-svc)
+
+#BuildRequires: pkgconfig(appcore-efl)
+#BuildRequires: pkgconfig(appcore-common)
+BuildRequires: libgcrypt-devel
+BuildRequires: expat-devel
+BuildRequires: cmake
+
+
+%description
+oma-dm-agent Daemon servcie
+
+%package -n dm-private-plugins
+Summary: DM Private Plugins
+Group: TO_BE_FILLED
+
+%description -n dm-private-plugins
+dm private plugins for sync-agent
+
+%package -n dm-public-plugins
+Summary: DM Public Plugins
+Group: TO_BE_FILLED
+
+%description -n dm-public-plugins
+dm public plugins for sync-agent
+
+%prep
+%setup -q
+
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+make %{?jobs:-j%jobs}
+
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%post
+if [ ! -d /opt/dbspace ]
+then
+ mkdir /opt/dbspace
+fi
+if [ ! -d /etc/rc.d/rc3.d ]
+then
+ mkdir /etc/rc.d/rc3.d
+fi
+if [ ! -d /etc/rc.d/rc5.d ]
+then
+ mkdir /etc/rc.d/rc5.d
+fi
+
+ln -s /etc/init.d/oma-dm /etc/rc.d/rc3.d/S91oma-dm-agent
+ln -s /etc/init.d/oma-dm /etc/rc.d/rc5.d/S91oma-dm-agent
+
+sqlite3 /opt/dbspace/.dm_service.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
+sqlite3 /opt/dbspace/.omadmagent.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
+sqlite3 /opt/dbspace/.momanager.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
+
+chmod 600 /opt/dbspace/.dm_service.db
+chmod 600 /opt/dbspace/.dm_service.db-journal
+chmod 600 /opt/dbspace/.omadmagent.db
+chmod 600 /opt/dbspace/.omadmagent.db-journal
+chmod 600 /opt/dbspace/.momanager.db
+chmod 600 /opt/dbspace/.momanager.db-journal
+
+if [ -f /usr/lib/rpm-plugins/msm.so ]
+then
+ chsmack -a oma-dm-agent::db /opt/dbspace/.dm_service.db
+ chsmack -a oma-dm-agent::db /opt/dbspace/.dm_service.db-journal
+ chsmack -a oma-dm-agent::db /opt/dbspace/.omadmagent.db
+ chsmack -a oma-dm-agent::db /opt/dbspace/.omadmagent.db-journal
+ chsmack -a oma-dm-agent::db /opt/dbspace/.momanager.db
+ chsmack -a oma-dm-agent::db /opt/dbspace/.momanager.db-journal
+fi
+
+#/etc/init.d/oma-dm start
+
+
+%preun
+/etc/init.d/oma-dm stop
+
+
+%postun
+
+rm -f /tmp/agent_fw_event_omadm*
+rm -f /tmp/agent_fw_noti_reply_omadm*
+
+rm -f /etc/rc.d/rc3.d/S91oma-dm-agent
+rm -f /etc/rc.d/rc5.d/S91oma-dm-agent
+
+rm -f /opt/dbspace/.dm_service.db /opt/dbspace/.dm_service.db-journal
+rm -f /opt/dbspace/.omadmagent.db /opt/dbspace/.omadmagent.db-journal
+rm -f /opt/dbspace/.momanager.db /opt/dbspace/.momanager.db-journal
+
+rm -rf /usr/share/oma-dm-cfg
+
+
+%files
+%manifest oma-dm-agent.manifest
+%defattr(-,root,root,-)
+/usr/share/dbus-1/services/*
+/usr/bin/oma-dm-agent
+
+/usr/share/oma-dm-cfg/*
+/usr/share/oma-dm-cfg/ddf/*
+/usr/share/oma-dm-cfg/ddf/slp/*
+/usr/share/oma-dm-cfg/ipc/*
+
+%defattr(700,root,root)
+/usr/share/oma-dm-cfg/csc-setting/change_csc_value.sh
+/usr/share/oma-dm-cfg/imei-setting/change_imei_callnum.sh
+
+/etc/init.d/oma-dm
+
+%files -n dm-private-plugins
+%manifest dm-private-plugins.manifest
+%defattr(-,root,root,-)
+/usr/lib/sync-agent/dm-private/*
+/usr/include/sync-agent/plugin/plugin_slp_device_dm.h
+
+%files -n dm-public-plugins
+%manifest dm-public-plugins.manifest
+%defattr(-,root,root,-)
+/usr/lib/sync-agent/dm-public/*
+