INCLUDE(FindPkgConfig)
-pkg_check_modules(LPKGS REQUIRED glib-2.0 sqlite3 dlog db-util xdgmime vconf)
+pkg_check_modules(LPKGS REQUIRED glib-2.0 sqlite3 dlog db-util xdgmime vconf libtzplatform-config)
STRING(REPLACE ";" " " EXTRA_CFLAGS "${LPKGS_CFLAGS}")
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
#define OWNER_ROOT 0
#define GROUP_MENU 6010
#define BUFSZE 1024
-#define OPT_DESKTOP_DIRECTORY "/opt/share/applications"
-#define USR_DESKTOP_DIRECTORY "/usr/share/applications"
-#define APP_INFO_DB_FILE "/opt/dbspace/.app_info.db"
-#define APP_INFO_DB_FILE_JOURNAL "/opt/dbspace/.app_info.db-journal"
+#define OPT_DESKTOP_DIRECTORY tzplatform_getenv(TZ_SYS_RW_DESKTOP_APP)
+#define USR_DESKTOP_DIRECTORY tzplatform_getenv(TZ_SYS_RO_DESKTOP_APP)
+#define APP_INFO_DB_FILE tzplatform_mkpath(TZ_SYS_DB,".app_info.db")
+#define APP_INFO_DB_FILE_JOURNAL tzplatform_mkpath(TZ_SYS_DB,".app_info.db-journal")
#define APP_INFO_DB_LABEL "ail::db"
#ifdef _E
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(xdgmime)
+BuildRequires: pkgconfig(libtzplatform-config)
Provides: libail = %{version}-%{release}
%description
%install
%make_install
-mkdir -p %{buildroot}/opt/dbspace/
-mkdir -p %{buildroot}/opt/share/applications/
+mkdir -p %{buildroot}%{TZ_SYS_DB}/
+mkdir -p %{buildroot}%{TZ_SYS_RW_DESKTOP_APP}/
%post
/sbin/ldconfig
fi
}
ail_initdb
-mkdir -p /usr/share/applications
-mkdir -p /opt/share/applications
-mkdir -p /opt/dbspace/
+mkdir -p %{TZ_SYS_RO_DESKTOP_APP}
+mkdir -p %{TZ_SYS_RW_DESKTOP_APP}
+mkdir -p %{TZ_SYS_DB}
-update_DAC_for_db_file /opt/dbspace/.app_info.db
-update_DAC_for_db_file /opt/dbspace/.app_info.db-journal
+update_DAC_for_db_file %{TZ_SYS_DB}/.app_info.db
+update_DAC_for_db_file %{TZ_SYS_DB}/.app_info.db-journal
%postun
/sbin/ldconfig
if [ $1 == 0 ]; then
-rm -f /opt/dbspace/.app_info.db*
+rm -f %{TZ_SYS_DB}/.app_info.db*
fi
%files
%manifest %{name}.manifest
%license LICENSE
-%dir /opt/share/applications
+%dir %{TZ_SYS_RW_DESKTOP_APP}
%{_bindir}/ail_initdb
+%{_bindir}/ail_initdb
+%{_bindir}/ail_fota
+%{_bindir}/ail_desktop
+%{_bindir}/ail_filter
+%{_bindir}/ail_package
%{_datadir}/install-info/*
%{_libdir}/libail.so.0
%{_libdir}/libail.so.0.1.0
-/usr/bin/ail_initdb
-/usr/bin/ail_fota
-/usr/bin/ail_desktop
-/usr/bin/ail_filter
-/usr/bin/ail_package
-/usr/share/install-info/*
%files devel
%manifest %{name}.manifest
#include <stdbool.h>
#include <sqlite3.h>
+#include <tzplatform_config.h>
#ifndef EXPORT_API
#define EXPORT_API __attribute__ ((visibility("default")))
#define ELEMENT_BOOL(e) ((struct element_bool *)(e))
#define AIL_SQL_QUERY_MAX_LEN 2048
-#define APP_INFO_DB "/opt/dbspace/.app_info.db"
+#define APP_INFO_DB tzplatform_mkpath(TZ_SYS_DB,".app_info.db")
#define ELEMENT_TYPE(e, t) do { \
if(e->prop >= E_AIL_PROP_STR_MIN && e->prop <= E_AIL_PROP_STR_MAX) t= (int)VAL_TYPE_STR; \
#define OWNER_ROOT 0
#define GROUP_MENU 6010
#define BUFSZE 1024
-#define OPT_DESKTOP_DIRECTORY "/opt/share/applications"
-#define USR_DESKTOP_DIRECTORY "/usr/share/applications"
-#define APP_INFO_DB_FILE "/opt/dbspace/.app_info.db"
-#define APP_INFO_DB_FILE_JOURNAL "/opt/dbspace/.app_info.db-journal"
+#define OPT_DESKTOP_DIRECTORY tzplatform_getenv(TZ_SYS_RW_DESKTOP_APP)
+#define USR_DESKTOP_DIRECTORY tzplatform_getenv(TZ_SYS_RO_DESKTOP_APP)
+#define APP_INFO_DB_FILE tzplatform_mkpath(TZ_SYS_DB,".app_info.db")
+#define APP_INFO_DB_FILE_JOURNAL tzplatform_mkpath(TZ_SYS_DB,".app_info.db-journal")
#define APP_INFO_DB_LABEL "ail::db"
#ifdef _E
#define OWNER_ROOT 0
#define GROUP_MENU 6010
#define BUFSZE 1024
-#define OPT_DESKTOP_DIRECTORY "/opt/share/applications"
-#define USR_DESKTOP_DIRECTORY "/usr/share/applications"
-#define APP_INFO_DB_FILE "/opt/dbspace/.app_info.db"
-#define APP_INFO_DB_FILE_JOURNAL "/opt/dbspace/.app_info.db-journal"
+#define OPT_DESKTOP_DIRECTORY tzplatform_getenv(TZ_SYS_RW_DESKTOP_APP)
+#define USR_DESKTOP_DIRECTORY tzplatform_getenv(TZ_SYS_RO_DESKTOP_APP)
+#define APP_INFO_DB_FILE tzplatform_mkpath(TZ_SYS_DB,".app_info.db")
+#define APP_INFO_DB_FILE_JOURNAL tzplatform_mkpath(TZ_SYS_DB,".app_info.db-journal")
#define APP_INFO_DB_LABEL "ail::db"
#ifdef _E