summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-07-15 14:06:08 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-07-15 14:35:20 +0300
commit40e56972eb45a55cfb9fe9ec89c10df5b9b2c312 (patch)
treee85fadc7bdb3844e743bfe7f4a320995d6e56a56
parentb859bd91e61b6402ea19f9fe241c49326f08e8a5 (diff)
downloadapp-svc-40e56972eb45a55cfb9fe9ec89c10df5b9b2c312.tar.gz
app-svc-40e56972eb45a55cfb9fe9ec89c10df5b9b2c312.tar.bz2
app-svc-40e56972eb45a55cfb9fe9ec89c10df5b9b2c312.zip
Include database in package files instead of creating it in %postsubmit/tizen/20130716.223402submit/tizen/20130716.035005accepted/tizen/20130716.223231
Removes the %post hack which broke the package by removing one of the installed files (i.e. /opt/share/appsvc_db.sql). Instead, create the database at package build time and install it as part of the package like the other files. Change-Id: I2989fdae3fb133e7f208a504e0da149c475fe022 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-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