# Set required packages
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-x ecore-input evas vconf pkgmgr-info app2sd privacy-manager-client)
+OPTION(ENABLE_PRIVACY_MANAGER "Enable privacy manager support" ON)
+IF(ENABLE_PRIVACY_MANAGER)
+ ADD_DEFINITIONS("-DPRIVACY_MANAGER")
+ pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-x ecore-input evas vconf pkgmgr-info app2sd privacy-manager-client)
+ELSE(ENABLE_PRIVACY_MANAGER)
+ pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-x ecore-input evas vconf pkgmgr-info app2sd)
+ENDIF(ENABLE_PRIVACY_MANAGER)
pkg_check_modules(libpkgs REQUIRED dlog bundle dbus-glib-1 ail xdgmime app-checker libsmack)
PKG_CHECK_MODULES(PKGS REQUIRED glib-2.0 gio-2.0 dlog bundle)
#include <app2ext_interface.h>
#include <sys/prctl.h>
#include <pkgmgr-info.h>
+#ifdef PRIVACY_MANAGER
#include <privacy_manager_client.h>
+#endif
#include "amd_config.h"
#include "amd_launch.h"
pkgid = appinfo_get_value(ai, AIT_PKGID);
+#ifdef PRIVACY_MANAGER
if(bundle_get_val(kb, AUL_K_PRIVACY_APPID)){
bundle_del(kb, AUL_K_PRIVACY_APPID);
} else {
ai = appinfo_find(_laf, appid);
}
}
+#endif // PRIVACY_MANAGER
componet = appinfo_get_value(ai, AIT_COMP);
app_path = appinfo_get_value(ai, AIT_EXEC);
+%bcond_with privacy-manager-client
+
Name: aul
Summary: App utility library
Version: 0.0.266
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(libsmack)
BuildRequires: pkgconfig(app2sd)
+%if %{with privacy-manager-client}
BuildRequires: pkgconfig(privacy-manager-client)
-
+%endif
%description
Application utility library
%setup -q
%build
-%cmake .
+%if %{with privacy-manger-client}
+%cmake . -DENABLE_PRIVACY_MANAGER=On
+%else
+%cmake . -DENABLE_PRIVACY_MANAGER=Off
+%endif
make %{?jobs:-j%jobs}