summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xCMakeLists.txt2
-rw-r--r--packaging/app-svc.changes3
-rw-r--r--packaging/app-svc.spec19
3 files changed, 10 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1970a55..b531550 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,8 +85,6 @@ INSTALL(TARGETS ${AVATAR_NAME} DESTINATION bin)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/appsvc.h DESTINATION include/appsvc)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/appsvc.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/appsvc_db.sql DESTINATION /opt/share )
-
# test
add_subdirectory(test)
diff --git a/packaging/app-svc.changes b/packaging/app-svc.changes
index 3a8908c..1568ca0 100644
--- a/packaging/app-svc.changes
+++ b/packaging/app-svc.changes
@@ -1,3 +1,6 @@
+* Mon Jul 15 2013 Markus Lehtonen <markus.lehtonen@linux.intel.com> submit/tizen/20130621.062843@d15a8b6
+- Include database in package files instead of creating it in %post (TZPC-3631)
+
* Thu Jun 20 2013 José Bollo <jose.bollo@eurogiciel.fr> accepted/tizen/20130602.015259@a26a0be
- cleanup
diff --git a/packaging/app-svc.spec b/packaging/app-svc.spec
index b047364..349ffaf 100644
--- a/packaging/app-svc.spec
+++ b/packaging/app-svc.spec
@@ -8,9 +8,9 @@ Source0: %{name}-%{version}.tar.gz
Source1001: app-svc.manifest
Requires(post): /sbin/ldconfig
-Requires(post): sqlite3
Requires(postun): /sbin/ldconfig
BuildRequires: cmake
+BuildRequires: sqlite3
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(x11)
@@ -48,17 +48,11 @@ make %{?jobs:-j%jobs}
%install
%make_install
+# Create database
+mkdir -p %{buildroot}/opt/dbspace
+sqlite3 %{buildroot}/opt/dbspace/.appsvc.db < data/appsvc_db.sql
-%post
-/sbin/ldconfig
-
-sqlite3 /opt/dbspace/.appsvc.db < /opt/share/appsvc_db.sql
-rm -rf /opt/share/appsvc_db.sql
-
-chown 0:5000 /opt/dbspace/.appsvc.db
-chown 0:5000 /opt/dbspace/.appsvc.db-journal
-chmod 664 /opt/dbspace/.appsvc.db
-chmod 664 /opt/dbspace/.appsvc.db-journal
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@@ -67,7 +61,8 @@ chmod 664 /opt/dbspace/.appsvc.db-journal
%license LICENSE
%manifest app-svc.manifest
%defattr(-,root,root,-)
-/opt/share/appsvc_db.sql
+%config(noreplace) %verify(not md5 mtime size) %attr(664,0,5000) /opt/dbspace/.appsvc.db
+%config(noreplace) %verify(not md5 mtime size) %attr(664,0,5000) /opt/dbspace/.appsvc.db-journal
/usr/bin/appsvc_test
%{_libdir}/libappsvc.so.0
%{_libdir}/libappsvc.so.0.1.0