Restore gbs build 77/62077/3
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Mon, 14 Mar 2016 06:31:14 +0000 (15:31 +0900)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 16 Mar 2016 03:01:46 +0000 (12:01 +0900)
ABS build system is far from being ready and it doesn't look
like it will be ready in near future. To support submission into Tizen images
the previous build system must have been restored. From now on two build system
must be supported.

Change-Id: Iab02312c4edba788722a76ae908adb0879d48b7a

13 files changed:
CMake/CMakeLists.txt [new file with mode: 0644]
CMake/res/CMakeLists.txt [new file with mode: 0644]
CMake/res/edje/CMakeLists.txt [new file with mode: 0644]
CMake/res/po/CMakeLists.txt [new file with mode: 0755]
org.tizen.task-mgr.manifest [new file with mode: 0644]
org.tizen.task-mgr.xml [new file with mode: 0644]
packaging/org.tizen.task-mgr.spec [new file with mode: 0644]
project_def.prop
res/images/default.png [deleted file]
shared/res/task-mgr.png [new file with mode: 0644]
src/.util.c.swp [deleted file]
src/util.c
tizen-manifest.xml

diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b70bbea
--- /dev/null
@@ -0,0 +1,66 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(task-mgr C)
+
+SET(INSTALL_EXEC_PREFIX "${INSTALL_PREFIX}/bin")
+SET(INSTALL_RESDIR "${INSTALL_PREFIX}/res")
+SET(INSTALL_IMAGEDIR "${INSTALL_RESDIR}/images")
+SET(EDJEDIR "${INSTALL_RESDIR}/edje")
+SET(LOCALEDIR "${INSTALL_RESDIR}/locale")
+SET(CMAKE_VERBOSE_MAKEFILE 0)
+
+SET(PROJECT_ROOT_DIR "${CMAKE_SOURCE_DIR}/..")
+SET(PROJECT_RESOURCES_DIR "${PROJECT_ROOT_DIR}/res")
+SET(PROJECT_EDC_DIR "${PROJECT_RESOURCES_DIR}/edje")
+SET(PROJECT_IMAGES_DIR "${PROJECT_RESOURCES_DIR}/images")
+SET(PROJECT_PO_DIR "${PROJECT_RESOURCES_DIR}/po")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(MENU_PKGS REQUIRED
+       appcore-efl
+       evas
+       edje
+       elementary
+       ecore
+       eina
+       capi-appfw-application
+       capi-system-info
+       capi-appfw-package-manager
+       capi-appfw-app-manager
+       dlog
+       pkgmgr-info
+       feedback
+       context
+)
+
+ADD_DEFINITIONS("-DINSTALL_RESDIR=\"${INSTALL_RESDIR}\"")
+
+FOREACH (flag ${MENU_PKGS_CFLAGS})
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Winline -g -fno-builtin-malloc -fPIE")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
+
+INCLUDE_DIRECTORIES(${PROJECT_ROOT_DIR}/inc)
+
+ADD_EXECUTABLE(${PROJECT_NAME}
+       ${PROJECT_ROOT_DIR}/src/item.c
+       ${PROJECT_ROOT_DIR}/src/list.c
+       ${PROJECT_ROOT_DIR}/src/main.c
+       ${PROJECT_ROOT_DIR}/src/scroller.c
+       ${PROJECT_ROOT_DIR}/src/util.c
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lm)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MENU_PKGS_LDFLAGS})
+
+# Install
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${INSTALL_EXEC_PREFIX})
+
+INSTALL(FILES ${PROJECT_ROOT_DIR}/org.tizen.task-mgr.xml DESTINATION ${SYS_PACKAGES_DIR})
+INSTALL(DIRECTORY DESTINATION ${PREFIX}/data)
+INSTALL(FILES ${PROJECT_ROOT_DIR}/shared/res/task-mgr.png DESTINATION ${SYS_ICONS_DIR})
+
+# End of a file
+ADD_SUBDIRECTORY(res)
diff --git a/CMake/res/CMakeLists.txt b/CMake/res/CMakeLists.txt
new file mode 100644 (file)
index 0000000..def54bc
--- /dev/null
@@ -0,0 +1,3 @@
+ADD_SUBDIRECTORY(edje)
+ADD_SUBDIRECTORY(po)
+
diff --git a/CMake/res/edje/CMakeLists.txt b/CMake/res/edje/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ef72254
--- /dev/null
@@ -0,0 +1,23 @@
+ADD_CUSTOM_TARGET(layout.edj
+       COMMAND edje_cc -id ${PROJECT_EDC_DIR}/images
+       ${PROJECT_EDC_DIR}/layout.edc layout.edj
+       DEPENDS ${PROJECT_EDC_DIR}/layout.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} layout.edj)
+INSTALL(FILES layout.edj DESTINATION ${EDJEDIR})
+
+ADD_CUSTOM_TARGET(item.edj
+       COMMAND edje_cc -id ${PROJECT_EDC_DIR}/images
+       ${PROJECT_EDC_DIR}/item.edc item.edj
+       DEPENDS ${PROJECT_EDC_DIR}/item.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} item.edj)
+INSTALL(FILES item.edj DESTINATION ${EDJEDIR})
+
+ADD_CUSTOM_TARGET(box.edj
+       COMMAND edje_cc -id ${PROJECT_EDC_DIR}/images
+       ${PROJECT_EDC_DIR}/box.edc box.edj
+       DEPENDS ${PROJECT_EDC_DIR}/box.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} box.edj)
+INSTALL(FILES box.edj DESTINATION ${EDJEDIR})
diff --git a/CMake/res/po/CMakeLists.txt b/CMake/res/po/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..1ac0fc9
--- /dev/null
@@ -0,0 +1,26 @@
+# for i18n
+
+SET(POFILES ar.po az.po bg.po ca.po cs.po da.po de.po el_GR.po en_PH.po en.po en_US.po
+                       es_ES.po es_US.po et.po eu.po fi.po fr_CA.po fr.po ga.po gl.po hi.po hr.po
+                       hu.po hy.po is.po it_IT.po ja_JP.po ka.po kk.po ko_KR.po lt.po lv.po mk.po
+                       nb.po nl.po pl.po pt_BR.po pt_PT.po ro.po ru_RU.po sk.po sl.po sr.po sv.po
+                       tr_TR.po uk.po uz.po zh_CN.po zh_HK.po zh_TW.po)
+SET(MSGFMT "/usr/bin/msgfmt")
+
+MESSAGE(STATUS "po files ---")
+FOREACH(pofile ${POFILES})
+       SET(pofile ${PROJECT_PO_DIR}/${pofile})
+       MESSAGE(STATUS "  ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile} DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/org.tizen.task-mgr.manifest b/org.tizen.task-mgr.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/org.tizen.task-mgr.xml b/org.tizen.task-mgr.xml
new file mode 100644 (file)
index 0000000..539a08a
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.task-mgr" version="1.0.0">
+    <profile name="mobile"/>
+       <ui-application appid="org.tizen.task-mgr" exec="/usr/apps/org.tizen.task-mgr/bin/task-mgr" multiple="false" nodisplay="false" taskmanage="false" type="capp">
+        <label>task-mgr</label>
+        <icon>taskmanager.png</icon>
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+        <privilege>http://tizen.org/privilege/appmanager.kill.bgapp</privilege>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/apphistory.read</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/org.tizen.task-mgr.spec b/packaging/org.tizen.task-mgr.spec
new file mode 100644 (file)
index 0000000..8a5d5e0
--- /dev/null
@@ -0,0 +1,83 @@
+Name:          org.tizen.task-mgr
+Summary:       Taskmanager application
+Version:       0.0.1
+Release:       1
+Group:      Applications/Core Applications
+License:       Apache-2.0
+Source0:       %{name}-%{version}.tar.gz
+
+%if "%{?profile}" == "wearable"
+ExcludeArch: %{arm} %ix86 x86_64
+%endif
+
+%if "%{?profile}" == "tv"
+ExcludeArch: %{arm} %ix86 x86_64
+%endif
+
+BuildRequires:  cmake
+BuildRequires:  edje-tools
+BuildRequires:  gettext-tools
+BuildRequires:  hash-signer
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(eina)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(edje)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-package-manager)
+BuildRequires:  pkgconfig(capi-appfw-app-manager)
+BuildRequires:  pkgconfig(pkgmgr-info)
+BuildRequires:  pkgconfig(feedback)
+BuildRequires:  pkgconfig(context)
+BuildRequires:  pkgconfig(libtzplatform-config)
+
+%description
+Taskmanager application reference implementation.
+
+%prep
+%setup -q
+
+%build
+
+%define _pkg_dir %{TZ_SYS_RO_APP}/%{name}
+%define _pkg_shared_dir %{_pkg_dir}/shared
+%define _pkg_data_dir %{_pkg_dir}/data
+%define _sys_icons_dir %{_pkg_shared_dir}/res
+%define _sys_packages_dir %{TZ_SYS_RO_PACKAGES}
+%define _sys_license_dir %{TZ_SYS_SHARE}/license
+
+cd CMake
+cmake . -DINSTALL_PREFIX=%{_pkg_dir} \
+       -DSYS_ICONS_DIR=%{_sys_icons_dir} \
+       -DSYS_PACKAGES_DIR=%{_sys_packages_dir}
+make %{?jobs:-j%jobs}
+cd -
+
+%install
+cd CMake
+%make_install
+cd -
+
+%define tizen_sign 1
+%define tizen_sign_base %{_pkg_dir}
+%define tizen_sign_level public
+%define tizen_author_sign 1
+%define tizen_dist_sign 1
+%find_lang task-mgr
+
+%post
+
+%postun -p /sbin/ldconfig
+
+%files -f task-mgr.lang
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{_pkg_dir}/bin/task-mgr
+%{_pkg_dir}/res/*
+%{_sys_packages_dir}/%{name}.xml
+%{_sys_icons_dir}/task-mgr.png
+%{_pkg_dir}/author-signature.xml
+%{_pkg_dir}/signature1.xml
index 3c7ede99b4014e1cfd477a2aae2e7053fc7dadd6..3f4f3b5420ee8ca58fc8cbe37eeec6a63d30d4d3 100644 (file)
@@ -1,6 +1,6 @@
 
 # Project Name
-APPNAME = taskmanager
+APPNAME = task-mgr
 
 # Project Type
 type = app
diff --git a/res/images/default.png b/res/images/default.png
deleted file mode 100644 (file)
index 9765b1b..0000000
Binary files a/res/images/default.png and /dev/null differ
diff --git a/shared/res/task-mgr.png b/shared/res/task-mgr.png
new file mode 100644 (file)
index 0000000..9765b1b
Binary files /dev/null and b/shared/res/task-mgr.png differ
diff --git a/src/.util.c.swp b/src/.util.c.swp
deleted file mode 100644 (file)
index 123e66e..0000000
Binary files a/src/.util.c.swp and /dev/null differ
index 66721e8761dce1aff530dedc791260b7560e2f9e..ab815fa83ee4f3ce71db154895aa98be8d966fdc 100644 (file)
@@ -118,7 +118,11 @@ const char *util_get_file_path(app_subdir dir, const char *relative)
                prefix = app_get_cache_path();
                break;
        case APP_DIR_RESOURCE:
+#ifdef INSTALL_RESDIR
+               prefix = strdup(INSTALL_RESDIR);
+#else
                prefix = app_get_resource_path();
+#endif
                break;
        case APP_DIR_SHARED_DATA:
                prefix = app_get_shared_data_path();
index 4fe65a1ac272cecfcd9741098c98f5bd4baf14ee..6ae95f30d644e7f0b8bcaeb398373133ecebfad8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.task-mgr" version="1.0.0">
     <profile name="mobile"/>
-    <ui-application appid="org.tizen.task-mgr" exec="taskmanager" multiple="false" nodisplay="false" taskmanage="false" type="capp">
+    <ui-application appid="org.tizen.task-mgr" exec="task-mgr" multiple="false" nodisplay="false" taskmanage="false" type="capp">
         <label>task-mgr</label>
         <icon>taskmanager.png</icon>
     </ui-application>