diff options
author | 2016-07-22 10:32:11 +0900 | |
---|---|---|
committer | 2016-07-22 11:01:55 +0900 | |
commit | 6fc9f9f085ab68f89ba6b22465fbdfc5411d41ba (patch) | |
tree | 40ee5391beebd06518c674c9ef1858c65026ceb4 /meta-application-manager/recipes-application-framework/ail | |
parent | 9cf56692db97b90e0fcb795f761430438bd0ad29 (diff) |
First version of ported tizen application manager
Change-Id: I46735869fe8113be58348d575e01734e498d2de2
Signed-off-by: Kazumasa Mitsunari <kazumasa_mitsunari_za@mail.toyota.co.jp>
Diffstat (limited to 'meta-application-manager/recipes-application-framework/ail')
4 files changed, 292 insertions, 0 deletions
diff --git a/meta-application-manager/recipes-application-framework/ail/ail-extraconf.inc b/meta-application-manager/recipes-application-framework/ail/ail-extraconf.inc new file mode 100644 index 0000000..44fb613 --- /dev/null +++ b/meta-application-manager/recipes-application-framework/ail/ail-extraconf.inc @@ -0,0 +1,15 @@ + +SRC_URI_append_class-native = " file://remove-dlog-for-native-build.patch" + +RDEPENDS_${PN}_remove_class-native = "systemd-native" +DEPENDS_remove_class-native = "dlog-native" + +DEPENDS_class-target += "ail-native" +DEPENDS_class-target += "libslp-db-util" +DEPENDS_class-target += "xdgmime" +DEPENDS_class-target += "vconf" + + +FILES_${PN} += "${prefix}/dbspace" +FILES_${PN} += "${prefix}/share/applications" +FILES_${PN} += "${prefix}/bin/ail_initdb_user"
\ No newline at end of file diff --git a/meta-application-manager/recipes-application-framework/ail/ail.inc b/meta-application-manager/recipes-application-framework/ail/ail.inc new file mode 100644 index 0000000..e1857cf --- /dev/null +++ b/meta-application-manager/recipes-application-framework/ail/ail.inc @@ -0,0 +1,202 @@ +DESCRIPTION = "Application Information Library" +HOMEPAGE = "http://nohomepage.org" +SECTION = "Application Framework/Libraries" +LICENSE = "Apache-2.0" +PV = "0.2.80" + +SRC_URI = "" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep + +BBCLASSEXTEND = "" +PROVIDES = "" + +#PROVIDES by ail +# the PROVIDES rules is ignore "libail = 0.2.80-0" +PROVIDES += "libail" +RPROVIDES_ail += "libail" + + +#PROVIDES by ail-dev +PROVIDES += "ail-dev" + + +RDEPENDS = "" +#RDEPENDS of ail-dev (${PN}-dev) +RDEPENDS_${PN}-dev += "tizen-platform-config" +RDEPENDS_${PN}-dev += "libail" +RDEPENDS_${PN}-dev += "smack" + + +DEPENDS = "" +#DEPENDS of ail +inherit tizen_cmake +DEPENDS += "tizen-platform-config" +inherit pkgconfig +DEPENDS += "dlog" +DEPENDS += "smack" +DEPENDS += "sqlite3" +DEPENDS += "xdgmime" +DEPENDS += "vconf" +DEPENDS += "libslp-db-util" + +do_prep() { + cd ${S} + chmod -Rf a+rX,u+w,g-w,o-w ${S} + #setup -q + cp ${S}/packaging/ail.manifest . + + +} +do_patch_append() { + bb.build.exec_func('do_prep', d) +} + +do_configure() { +} + +do_compile() { + cd ${S} + LANG=C + export LANG + unset DISPLAY + LD_AS_NEEDED=1; export LD_AS_NEEDED ; + + CFLAGS="$CFLAGS -fpic" + + + + cmake \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ + -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \ + -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \ + -DLIB_INSTALL_DIR:PATH=${prefix}/lib \ + -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \ + -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \ + -DCMAKE_SKIP_RPATH:BOOL=ON \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \ + ${EXTRA_OECMAKE} . -DTZ_SYS_RW_DESKTOP_APP=${prefix}/share/applications \ + -DBUILD_PKGTYPE=rpm + + oe_runmake ${PARALLEL_MAKE} + + + +} + +do_install() { + export RPM_BUILD_ROOT=${D} + cd ${S} + LANG=C + export LANG + unset DISPLAY + rm -rf ${D} + mkdir -p ${D} + + + oe_runmake \ + DESTDIR=${D} \ + INSTALL_ROOT=${D} \ + BINDIR=${prefix}/bin \ + install + rm -f ${D}${infodir}/dir + find ${D} -regex ".*\.la$" | xargs rm -f -- + find ${D} -regex ".*\.a$" | xargs rm -f -- + + +} + +pkg_postinst_${PN}() { + #!/bin/sh -e + + ldconfig + # Create tizenglobalapp user needed for global installation + useradd -d $D${prefix}/apps -m tizenglobalapp -r -c "system user for common applications" -g root + #mkdir -p %TZ_SYS_RW_APP/.config/xwalk-service/applications + #cd %TZ_SYS_RW_APP/ + #ln -s .config/xwalk-service/applications/ + vconftool set -t string db/ail/ail_info "0" -f -s system::vconf_inhouse + vconftool set -t string db/menuscreen/desktop "0" -f -s system::vconf_inhouse + vconftool set -t string db/menu_widget/language "en_US.utf8" -f -s system::vconf_inhouse + chsmack -a User $D${prefix}/kdb/db/ail + chsmack -a User $D${prefix}/kdb/db/ail/ail_info + chsmack -a User $D${prefix}/kdb/db/menuscreen + chsmack -a User $D${prefix}/kdb/db/menuscreen/desktop + chsmack -a User $D${prefix}/kdb/db/menu_widget + chsmack -a User $D${prefix}/kdb/db/menu_widget/language + mkdir -p $D${prefix}/share/applications + mkdir -p $D${prefix}/share/applications + mkdir -p $D${prefix}/apps + mkdir -p $D${prefix}/dbspace + mkdir -p $D${prefix}/share/icons/default/small + chsmack -a '*' $D${prefix}/dbspace + chsmack -a '*' $D${prefix}/apps + chsmack -a '*' $D${prefix}/share/applications + chsmack -a '*' $D${prefix}/share/applications + chsmack -a '*' $D${prefix}/share/icons + chsmack -a '*' $D${prefix}/share/icons/default + chsmack -a '*' $D${prefix}/share/icons/default/small/ + chmod g+w $D${prefix}/share/applications + chmod g+w $D${prefix}/share/applications + chown tizenglobalapp:root $D${prefix}/share/applications + chown tizenglobalapp:root $D${prefix}/share/applications + chown tizenglobalapp:root $D${prefix}/apps + chown tizenglobalapp:root $D${prefix}/dbspace + chown tizenglobalapp:root $D${prefix}/dbspace + chown tizenglobalapp:root -R $D${prefix}/share/icons + ail_createdb 2>/dev/null + ail_syncdb 2>/dev/null + chsmack -a '*' $D${prefix}/dbspace/.app_info.db* + + +} + +pkg_postrm_${PN}() { + #!/bin/sh -e + + [ "x$D" == "x" ] && ldconfig + if [ $1 == 0 ]; then + rm -f $D${prefix}/dbspace/.app_info.db* + fi + +} + +PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale" +PACKAGES += " ail " +PACKAGES += " ail-dev " + +ail_files = "" +ail_files += "${prefix}/bin/ail_createdb" +ail_files += "${prefix}/bin/ail_createdb_user" +ail_files += "${prefix}/bin/ail_syncdb" +ail_files += "${prefix}/bin/ail_syncdb_user" +ail_files += "${prefix}/bin/ail_initdb" +ail_files += "${prefix}/bin/ail_initdb_user" +ail_files += "${prefix}/bin/ail_fota" +ail_files += "${prefix}/bin/ail_desktop" +ail_files += "${prefix}/bin/ail_filter" +ail_files += "${prefix}/bin/ail_list" +ail_files += "${prefix}/bin/ail_package" +ail_files += "${prefix}/share/install-info/*" +ail_files += "${prefix}/lib/libail.so.0" +ail_files += "${prefix}/lib/libail.so.0.1.0" +MANIFESTFILES_${PN} = "ail.manifest" + +ail-dev_files = "" +ail-dev_files += "${prefix}/include/ail.h" +ail-dev_files += "${prefix}/lib/libail.so" +ail-dev_files += "${prefix}/lib/pkgconfig/ail.pc" +MANIFESTFILES_${PN}-dev = "ail.manifest" + +FILES_${PN} = "${ail_files}" +FILES_${PN}-dev = "${ail-dev_files}" + +PKG_ail= "ail" +PKG_ail-dev= "ail-dev" + +require ail-extraconf.inc + diff --git a/meta-application-manager/recipes-application-framework/ail/ail_git.bb b/meta-application-manager/recipes-application-framework/ail/ail_git.bb new file mode 100644 index 0000000..2868128 --- /dev/null +++ b/meta-application-manager/recipes-application-framework/ail/ail_git.bb @@ -0,0 +1,10 @@ +require ail.inc + +PRIORITY = "10" + +LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI += "git://review.tizen.org/platform/core/appfw/ail;tag=6de70f2ffa8664b4b04693e9505566b118dc139a;nobranch=1" + +BBCLASSEXTEND += " native " + diff --git a/meta-application-manager/recipes-application-framework/ail/files/remove-dlog-for-native-build.patch b/meta-application-manager/recipes-application-framework/ail/files/remove-dlog-for-native-build.patch new file mode 100644 index 0000000..e82ec08 --- /dev/null +++ b/meta-application-manager/recipes-application-framework/ail/files/remove-dlog-for-native-build.patch @@ -0,0 +1,65 @@ +From a89241fbcf9ce188e59b7e55f833cd377356b19d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?K=C3=A9vin=20THIERRY?= <kevin.thierry@open.eurogiciel.org> +Date: Tue, 26 Aug 2014 11:21:52 +0200 +Subject: [PATCH] Remove dlog for native build + +--- + CMakeLists.txt | 2 +- + initdb/CMakeLists.txt | 2 +- + src/ail_private.h | 2 +- + tool/CMakeLists.txt | 4 ++-- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2c3fafe..9adea33 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,7 +33,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) + + INCLUDE(FindPkgConfig) + +-pkg_check_modules(LPKGS REQUIRED glib-2.0 sqlite3 dlog db-util xdgmime vconf libtzplatform-config libsmack) ++pkg_check_modules(LPKGS REQUIRED glib-2.0 sqlite3 db-util xdgmime vconf libtzplatform-config libsmack) + STRING(REPLACE ";" " " EXTRA_CFLAGS "${LPKGS_CFLAGS}") + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden") + +diff --git a/src/ail_private.h b/src/ail_private.h +index efa2f66..28ed80c 100755 +--- a/src/ail_private.h ++++ b/src/ail_private.h +@@ -36,7 +36,7 @@ + #undef LOG_TAG + #define LOG_TAG "AIL" + +-#if 1 ++#if 0 + #include <dlog.h> + #define _E(fmt, arg...) LOGE("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg) + #define _D(fmt, arg...) LOGD("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg) +diff --git a/tool/CMakeLists.txt b/tool/CMakeLists.txt +index e898c7e..e0dd903 100755 +--- a/tool/CMakeLists.txt ++++ b/tool/CMakeLists.txt +@@ -15,7 +15,7 @@ SET(FILTERSRCS src/ail_filter.c) + SET(PKG ail_package) + SET(PKGSRCS src/ail_package.c) + +-pkg_check_modules(INITDB_PKGS REQUIRED libsmack vconf dlog db-util sqlite3) ++pkg_check_modules(INITDB_PKGS REQUIRED libsmack vconf db-util sqlite3) + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src) + + + +diff --git a/ail.pc.in b/ail.pc.in +index a267813..33cbc37 100644 +--- a/ail.pc.in ++++ b/ail.pc.in +@@ -6,6 +6,6 @@ includedir=@INCLUDEDIR@ + Name: ail + Description: Application Information Library + Version: @VERSION@ +-Requires: sqlite3 vconf dlog db-util ++Requires: sqlite3 vconf db-util + Libs: -L@LIBDIR@ -lail @PC_LIB@ + Cflags: -I@INCLUDEDIR@ |