Cleanup package and %post section 40/4340/1 accepted/tizen/20130627.212351 submit/tizen/20130627.122810
authorAnas Nashif <anas.nashif@intel.com>
Thu, 27 Jun 2013 12:28:08 +0000 (08:28 -0400)
committerAnas Nashif <anas.nashif@intel.com>
Thu, 27 Jun 2013 12:28:08 +0000 (08:28 -0400)
CMakeLists.txt
packaging/librua.changes
packaging/librua.spec

index 860fcad6e83ccce826deca544ca4c120723a51ef..5110cfb8d4855ca5f1c992452ba85da276c7d5ed 100644 (file)
@@ -40,6 +40,5 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT Runtime
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/rua.h DESTINATION include/${PROJECT_NAME})
 
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/rua_db.sql DESTINATION /opt/share/)
 
 #ADD_SUBDIRECTORY(test)
index 660ac8766881cc380b7b2e548b1f88b151a99e21..94197ca6396b4b9c9cc3a73dcba06da581ec91be 100644 (file)
@@ -1,3 +1,6 @@
+* Thu Jun 27 2013 Anas Nashif <anas.nashif@intel.com> accepted/tizen/20130520.100920@be9f60c
+- Cleanup package and %post section
+
 * Wed Jun 05 2013 Baptiste DURAND <baptiste.durand@eurogiciel.fr> accepted/tizen/20130520.100920@a416bc8
 - Revert manifest to default one
 
index 77cb669800df855cd21c5b54355e4eb19217bad1..498e08a3efdd2a034154a4539c577f558156a38f 100644 (file)
@@ -1,24 +1,21 @@
-Name:       librua
-Summary:    Recently used application
-Version:    0.1.0
-Release:    34
-Group:      Application Framework/Libraries
-License:    Apache-2.0
-Source0:    librua-%{version}.tar.gz
-Requires(post): /sbin/ldconfig
-Requires(post): /usr/bin/sqlite3
-Requires(postun): /sbin/ldconfig
+Name:           librua
+Version:        0.1.0
+Release:        34
+License:        Apache-2.0
+Summary:        Recently used application
+Group:          Application Framework/Libraries
+Source0:        librua-%{version}.tar.gz
 BuildRequires:  cmake
-BuildRequires:  pkgconfig(sqlite3)
+BuildRequires:  sqlite3
 BuildRequires:  pkgconfig(db-util)
+BuildRequires:  pkgconfig(sqlite3)
 
 %description
 Recently used application library
 
 %package devel
-Summary:    Recently used application (devel)
-Group:      Development/Libraries
-Requires:   %{name} = %{version}-%{release}
+Summary:        Recently used application (devel)
+Requires:       %{name} = %{version}
 
 %description devel
 Recently used application library (devel)
@@ -28,35 +25,28 @@ Recently used application library (devel)
 
 %build
 %cmake .
-
-make %{?jobs:-j%jobs}
+make %{?_smp_mflags}
 
 %install
 %make_install
+mkdir -p %{buildroot}/opt/dbspace
+sqlite3 %{buildroot}/opt/dbspace/.rua.db < data/rua_db.sql
 
-%post
-/sbin/ldconfig
-mkdir -p /opt/dbspace/
-sqlite3 /opt/dbspace/.rua.db < /opt/share/rua_db.sql
-rm -rf /opt/share/rua_db.sql
-chown 0:5000 /opt/dbspace/.rua.db
-chown 0:5000 /opt/dbspace/.rua.db-journal
-chmod 660 /opt/dbspace/.rua.db
-chmod 660 /opt/dbspace/.rua.db-journal
-chsmack -a rua::db /opt/dbspace/.rua.db
-chsmack -a rua::db /opt/dbspace/.rua.db-journal
+%post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 %files
 %manifest librua.manifest
 %defattr(-,root,root,-)
-%config(missingok) /opt/share/rua_db.sql
+%config(noreplace) %attr(0660,root,app) /opt/dbspace/.rua.db*
 %{_libdir}/librua.so.*
+%license LICENSE
 
 %files devel
 %defattr(-,root,root,-)
-/usr/include/rua/*.h
+%dir %{_includedir}/rua
+%{_includedir}/rua/*.h
 %{_libdir}/librua.so
 %{_libdir}/pkgconfig/rua.pc