Update libprivilege-control recipe 57/22957/2
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Fri, 13 Jun 2014 12:08:09 +0000 (14:08 +0200)
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Mon, 16 Jun 2014 09:30:18 +0000 (11:30 +0200)
* New revision.
* Add pre/post install/uninstall recipe.
* New generated recipe from recent spec file.

Change-Id: I7334d63b040137dcc3937bb11baa3666f00359f2
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
recipes-tizen/libprivilege-control/libprivilege-control.inc
recipes-tizen/libprivilege-control/libprivilege-control_git.bb

index cee5386..b9ba958 100644 (file)
@@ -33,6 +33,7 @@ DEPENDS = ""
 #DEPENDS of libprivilege-control 
 DEPENDS_append_class-native = " cmake-native"
 DEPENDS_append_class-target = " cmake-native"
+DEPENDS += "tizen-platform-config"
 DEPENDS += "dlog"
 DEPENDS += "libiri"
 DEPENDS += "smack"
@@ -80,7 +81,9 @@ do_compile() {
          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
          -DCMAKE_SKIP_RPATH:BOOL=ON \
          -DBUILD_SHARED_LIBS:BOOL=ON . -DCMAKE_BUILD_TYPE=RELEASE \
-          -DCMAKE_VERBOSE_MAKEFILE=ON
+          -DCMAKE_VERBOSE_MAKEFILE=ON \
+       -DTZ_SYS_DB=/usr/dbspace \
+       -DTZ_SYS_HOME=/home
  
  VERBOSE=1 make -j16
  
@@ -110,9 +113,26 @@ do_install() {
  
  mkdir -p ${D}/usr/lib/systemd/system/multi-user.target.wants
  ln -sf /usr/lib/systemd/system/smack-rules.service ${D}/usr/lib/systemd/system/multi-user.target.wants/smack-rules.service
- mkdir -p ${D}/opt/dbspace
+ mkdir -p ${D}/usr/dbspace
  
+ sed -i 's|TZ_SYS_DB|/usr/dbspace|g' ${S}/packaging/libprivilege-control.manifest
  
+}
+
+pkg_postinst_${PN}() {
+    #!/bin/sh -e
+
+    /sbin/ldconfig
+    /usr/share/privilege-control/db/updater.sh
+    chsmack -a 'System' /usr/dbspace/.rules-db.db3*
+
+}
+
+pkg_postrm_${PN}() {
+    #!/bin/sh -e
+
+    /sbin/ldconfig
 }
 
 PACKAGES += " libprivilege-control-conf "
@@ -120,7 +140,6 @@ PACKAGES += " libprivilege-control-conf "
 libprivilege-control_files = ""
 libprivilege-control_files += "libprivilege-control.manifest"
 libprivilege-control_files += "${prefix}/lib/*.so.*"
-libprivilege-control_files += "${prefix}/bin/slp-su"
 libprivilege-control_files += "${prefix}/lib/librules-db-sql-udf.so"
 libprivilege-control_files += "/usr/lib/systemd/system/smack-rules.service"
 libprivilege-control_files += "/usr/bin/api_feature_loader"
@@ -131,11 +150,11 @@ libprivilege-control_files += "/usr/share/privilege-control/db/updater.sh"
 libprivilege-control_files += "/usr/share/privilege-control/db/updates/*"
 libprivilege-control_files += "/usr/share/privilege-control/db/load-rules-db.sql"
 libprivilege-control_files += "/etc/opt/upgrade/220.libprivilege-updater.patch.sh"
-libprivilege-control_files += "%dir /opt/dbspace"
+libprivilege-control_files += "%dir /usr/dbspace"
 
 libprivilege-control-conf_files = ""
 libprivilege-control-conf_files += "libprivilege-control.manifest"
-libprivilege-control-conf_files += "/opt/dbspace/.privilege_control*.db"
+libprivilege-control-conf_files += "/usr/dbspace/.privilege_control*.db"
 
 libprivilege-control-dev_files = ""
 libprivilege-control-dev_files += "libprivilege-control.manifest"
index 342eb94..6aa9df5 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "10"
 
 LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
-SRC_URI += "git://review.tizen.org/platform/core/security/libprivilege-control;tag=3887c2c7b94bb5473274e93f7479c572a412f9ef;nobranch=1"
+SRC_URI += "git://review.tizen.org/platform/core/security/libprivilege-control;tag=8e290feb45ac99f2a621c3733aa2bb26ef8611ff;nobranch=1"
 
 BBCLASSEXTEND += " native "