summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsangwan.kwon <sangwan.kwon@samsung.com>2016-03-02 15:32:45 +0900
committersangwan.kwon <sangwan.kwon@samsung.com>2016-03-02 18:04:36 +0900
commit3906f55ff0fa421ecc4b2101f13d43b195ef4160 (patch)
tree8daa40cb071cb109007805e2cad66d023f475f50
parent46bb57085f9119a1a35ab7cd6607fedebd0ab446 (diff)
downloadcert-checker-3906f55ff0fa421ecc4b2101f13d43b195ef4160.tar.gz
cert-checker-3906f55ff0fa421ecc4b2101f13d43b195ef4160.tar.bz2
cert-checker-3906f55ff0fa421ecc4b2101f13d43b195ef4160.zip
Fix hard coded path
Change-Id: Ic47c2b6f4201fc71104077fd93dba2bff09d139c Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
-rw-r--r--packaging/cert-checker.spec24
-rw-r--r--src/ui/popup-bin/CMakeLists.txt1
-rw-r--r--src/ui/popup-runner.cpp4
3 files changed, 16 insertions, 13 deletions
diff --git a/packaging/cert-checker.spec b/packaging/cert-checker.spec
index 8ca70c2..6e014b6 100644
--- a/packaging/cert-checker.spec
+++ b/packaging/cert-checker.spec
@@ -50,17 +50,17 @@ export LDFLAGS+="-Wl,--rpath=%{_libdir} "
-DDB_INSTALL_DIR=%{TZ_SYS_DB} \
-DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:RELEASE} \
-DCMAKE_VERBOSE_MAKEFILE=ON \
- -DTEST_APP_SIGNATURES_DIR="/root/cert-checker-test" \
+ -DTEST_APP_SIGNATURES_DIR="%{TZ_SYS_ROOT}/cert-checker-test" \
-DSYSTEMD_UNIT_DIR=%{_unitdir}
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE %{buildroot}/usr/share/license/%{name}
+mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
+cp LICENSE %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
%make_install
-cp -a %{SOURCE1} %{buildroot}%{_datadir}/
+cp -a %{SOURCE1} %{buildroot}%{TZ_SYS_RO_SHARE}/
%find_lang %{name}
%make_install
@@ -97,18 +97,18 @@ fi
%files -f %{name}.lang
-%{_bindir}/cert-checker
-%{_bindir}/cert-checker-popup
-%manifest %{_datadir}/%{name}.manifest
-%{_datadir}/license/%{name}
+%{TZ_SYS_BIN}/cert-checker
+%{TZ_SYS_BIN}/cert-checker-popup
+%manifest %{TZ_SYS_RO_SHARE}/%{name}.manifest
+%{TZ_SYS_RO_SHARE}/license/%{name}
%config(noreplace) %attr(0600,root,root) %{TZ_SYS_DB}/.cert-checker.db
%{_unitdir}/cert-checker.service
%{_unitdir}/multi-user.target.wants/cert-checker.service
%files -n cert-checker-tests
%defattr(-,root,root,-)
-%{_bindir}/cert-checker-tests
-%{_bindir}/cert-checker-tests-logic
-%{_bindir}/cert-checker-popup-test
+%{TZ_SYS_BIN}/cert-checker-tests
+%{TZ_SYS_BIN}/cert-checker-tests-logic
+%{TZ_SYS_BIN}/cert-checker-popup-test
%{TZ_SYS_DB}/.cert-checker-test.db
-/root/cert-checker-test/*/*.xml
+%{TZ_SYS_ROOT}/cert-checker-test/*/*.xml
diff --git a/src/ui/popup-bin/CMakeLists.txt b/src/ui/popup-bin/CMakeLists.txt
index a8bddfa..2b89d2f 100644
--- a/src/ui/popup-bin/CMakeLists.txt
+++ b/src/ui/popup-bin/CMakeLists.txt
@@ -22,6 +22,7 @@
PKG_CHECK_MODULES(CERT_CHECKER_POPUP_DEP
elementary
libsystemd-journal
+ libtzplatform-config
REQUIRED)
set(CERT_CHECKER_POPUP_SRC_DIR ${PROJECT_SOURCE_DIR}/src/ui/popup-bin)
diff --git a/src/ui/popup-runner.cpp b/src/ui/popup-runner.cpp
index 6411558..2004e05 100644
--- a/src/ui/popup-runner.cpp
+++ b/src/ui/popup-runner.cpp
@@ -27,6 +27,8 @@
#include <sys/types.h>
#include <sys/wait.h>
+#include <tzplatform_config.h>
+
#include <cchecker/app.h>
#include <cchecker/logic.h>
#include <cchecker/log.h>
@@ -37,7 +39,7 @@ namespace { // anonymous
using namespace CCHECKER::UI;
-const char *POPUP_EXEC = "/usr/bin/cert-checker-popup"; // check-checker-popup binary
+const char *POPUP_EXEC = tzplatform_mkpath(TZ_SYS_BIN, "cert-checker-popup"); // check-checker-popup binary
std::string response_to_str (response_e response)
{