projectType="org.tizen.nativeide.buildArtefactType.platform">
</template>
<template
- filterPattern=".*"
- id="AgentProject"
- location="templates/InhouseFrameworkPackages/AgentProject/template.xml"
- projectType="org.tizen.nativeide.buildArtefactType.platform">
- </template>
- <template
id="PlatformProject"
location="templates/InhouseFrameworkPackages/PlatformProject/template.xml"
projectType="org.tizen.nativeide.buildArtefactType.platform">
+++ /dev/null
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT($(projectName) C)
-
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(BINDIR "${PREFIX}/bin")
-SET(RESDIR "${PREFIX}/res")
-SET(LIBDIR "${PREFIX}/lib")
-SET(DATADIR "${PREFIX}/data")
-SET(LOCALEDIR "${RESDIR}/locale")
-SET(ICONDIR "${RESDIR}/icons/default/small")
-SET(EDJDIR "${RESDIR}/edje")
-SET(IMGDIR "${RESDIR}/images")
-
-ADD_DEFINITIONS("-DPACKAGE=\"${PROJECT_NAME}\"")
-ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
-ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
-ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
-ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
-ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
-ADD_DEFINITIONS("-DIMGDIR=\"${IMGDIR}\"")
-ADD_DEFINITIONS("-DLOG_TAG=\"${PROJECT_NAME}\"")
-
-ADD_DEFINITIONS("-DSLP_DEBUG")
-
-SET(SRCS
- src/${PROJECT_NAME}.c
-)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
- SET(CMAKE_BUILD_TYPE "Debug")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED dlog appcore-agent capi-appfw-application)
-
-FOREACH(flag ${pkgs_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wl,--unresolved-symbols=ignore-in-shared-libs")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-SET(CMAKE_C_FLAGS_RELEASE "-O2")
-SET(CMAKE_LDFLAGS "-Wl,-zdefs")
-
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" STREQUAL "arm")
- ADD_DEFINITIONS("-DTARGET")
- MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-ADD_DEFINITIONS("-fpie")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CMAKE_LDFLAGS} ${pkgs_LDFLAGS} "-pie")
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
-
-# install desktop file & icon
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/com.samsung.${PROJECT_NAME}.desktop.in ${CMAKE_CURRENT_SOURCE_DIR}/com.samsung.${PROJECT_NAME}.desktop)
-
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/com.samsung.${PROJECT_NAME}.desktop DESTINATION /opt/share/applications)
-
-INSTALL(DIRECTORY DESTINATION ${DATADIR})
-INSTALL(DIRECTORY DESTINATION ${LIBDIR})
-INSTALL(DIRECTORY DESTINATION ${RESDIR})
\ No newline at end of file
+++ /dev/null
-1. make the build directory
-
- ex)
-
- $ mkdir build
-
-
-2. change the working directory to the build directory
-
- ex)
-
- $ cd build
-
-
-3. run 'cmake'
-
- $ cmake ${SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=/usr
-
- ex)
-
- $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
-
- or
-
- $ cmake ..
-
-
-4. make & make install
-
- ex)
-
- $ make -j 2 && make install
-
+++ /dev/null
-Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
-
-PROPRIETARY/CONFIDENTIAL
-
-This software is the confidential and proprietary information of
-SAMSUNG ELECTRONICS ("Confidential Information"). You agree and acknowledge that
-this software is owned by Samsung and you
-shall not disclose such Confidential Information and shall
-use it only in accordance with the terms of the license agreement
-you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
-representations or warranties about the suitability
-of the software, either express or implied, including but not
-limited to the implied warranties of merchantability, fitness for
-a particular purpose, or non-infringement.
-SAMSUNG shall not be liable for any damages suffered by licensee arising out of or
-related to this software.
-
+++ /dev/null
-Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+++ /dev/null
-Name=$(projectName)
-Exec=${PREFIX}/bin/$(projectName)
-Comment=Sample agent application
-Type=Application
-Nodisplay=True
-X-SLP-TaskManage=False
-Version=@VERSION@
-
+++ /dev/null
-$(projectName) (0.0.0-1) unstable; urgency=low
-
- * initial release
-
- -- $(author) <$(e-mail)> Thu, 26 Jan 2012 14:52:56 +0900
+++ /dev/null
-/usr/bin
\ No newline at end of file
+++ /dev/null
-Source: $(projectName)
-Priority: extra
-Maintainer: $(author) <$(e-mail)>
-Build-Depends: debhelper (>= 5), libappcore-agent-dev, dlog-dev
-Standards-Version: 0.1.0
-
-Package: com.samsung.$(projectName)
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: $(description)
-
-Package: com.samsung.$(projectName)-dbg
-Section: debug
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: agent application (unstripped)
\ No newline at end of file
+++ /dev/null
-CMakeLists.txt
+++ /dev/null
-#! /bin/sh
-
-if [ ${USER} == "root" ]
-then
- # do not use relative path
- chown -R app:app /opt/apps/com.samsung.$(projectName)/data
-fi
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-CFLAGS ?= -Wall -g
-PREFIX ?= /opt/apps/com.samsung.$(projectName)
-RESDIR ?= /opt/apps/com.samsung.$(projectName)/res
-DATADIR ?= /opt/apps/com.samsung.$(projectName)/data
-LDFLAGS ?= --Wl,--rpath=$(PREFIX)/lib --Wl,--as-needed
-DATADIR ?= /opt
-VERSION ?= `head -n 1 debian/changelog | awk 'BEGIN {FS="[()]"}{print $$2}'`
-
-CFLAGS += -fPIC
-CXXFLAGS += -fPIC
-LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
- CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DVERSION=$(VERSION)
- touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp
- dh_testdir
-
- # Add here commands to compile the package.
- $(MAKE)
- #docbook-to-man debian/info-alarm.sgml > info-alarm.1
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- cat $$f > $${f%.in}; \
- sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
- sed -i -e "s#@RESDIR@#$(RESDIR)#g" $${f%.in}; \
- sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
- done
-
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- # Add here commands to clean up after the build process.
- -$(MAKE) clean
- rm -rf CMakeCache.txt
- rm -rf CMakeFiles
- rm -rf cmake_install.cmake
- rm -rf Makefile
- rm -rf install_manifest.txt
- rm -rf *.so
- rm -rf po/CMakeCache.txt
- rm -rf po/CMakeFiles
- rm -rf po/cmake_install.cmake
- rm -rf po/Makefile
- rm -rf po/install_manifest.txt
- rm -rf po/*.so
- rm -rf data/CMakeCache.txt
- rm -rf data/CMakeFiles
- rm -rf data/cmake_install.cmake
- rm -rf data/Makefile
- rm -rf data/install_manifest.txt
- rm -rf data/*.so
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- rm -f $${f%.in}; \
- done
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/info-alarm.
- $(MAKE) DESTDIR=$(CURDIR)/debian/com.samsung.$(projectName) install
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
-# dh_install
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_python
-# dh_installinit
-# dh_installcron
-# dh_installinfo
- dh_installman
- dh_link
- dh_strip --dbg-package=com.samsung.$(projectName)-dbg
- dh_compress
- dh_fixperms
-# dh_perl
-# dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
\ No newline at end of file
+++ /dev/null
-
-#ifndef __APP_COMMON_H__
-#define __APP_COMMON_H__
-
-#endif /* __APP_COMMON_H__ */
+++ /dev/null
-Name: com.samsung.$(projectName)
-Version: 0.1.0
-Release: 1
-License: To be filled
-Summary: agent application
-Packager: $(author) <$(e-mail)>
-Group: Application
-Source: %{name}-%{version}.tar.gz
-
-BuildRequires: cmake
-BuildRequires: pkgconfig(appcore-agent)
-BuildRequires: pkgconfig(capi-appfw-application)
-BuildRequires: pkgconfig(dlog)
-
-%description
-$(description)
-
-%define PREFIX "/opt/apps/com.samsung.$(projectName)"
-%define RESDIR "/opt/apps/com.samsung.$(projectName)/res"
-
-%prep
-%setup -q
-
-%build
-export LDFLAGS="${LDFLAGS} -Wl,--rpath,/usr/lib -Wl,--rpath,%{PREFIX}/lib -Wl,--hash-style=both -Wl,--as-needed"
-export CFLAGS="${CFLAGS} -fPIC"
-export CXXFLAGS="${CXXFLAGS} -fPIC"
-cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DVERSION=%{Version}
-# Call make instruction with smp support
-make %{?jobs:-j%jobs}
-touch configure-stamp
-
-%install
-%make_install
-
-%clean
-rm -f build-stamp configure-stamp
-
-%files
-%defattr(644, app, app)
-%attr(755, app, app) /opt/apps/%{name}/bin
-/opt/apps/%{name}/lib
-/opt/apps/%{name}/data
-/opt/apps/%{name}/res/
-/opt/share/applications
-
-%changelog
-* Thu Jan 26 2012 $(author) <$(e-mail)>
- - initial release
\ No newline at end of file
+++ /dev/null
-#include <stdio.h>
-#include <bundle.h>
-#include <dlog.h>
-#include <appcore-agent.h>
-#include "$(projectName).h"
-
-#undef LOG_TAG
-#define LOG_TAG "AGENT_TEST"
-
-static int __app_create(void *data)
-{
- /*struct appdata *ad = data; */
- LOGD("__app_create");
-
- // Todo: add your code here.
-
- return 0;
-}
-
-
-static int __app_terminate(void *data)
-{
- /*struct appdata *ad = data; */
- LOGD("__app_terminate");
-
- // Todo: add your code here.
-
- return 0;
-}
-
-
-static int __app_service(service_h service, void *data)
-{
- /*struct appdata *ad = data; */
- char *test_data = (char*)data;
- char *op;
-
- LOGD("requset : %s", test_data);
-
- service_get_operation(service, &op);
-
- LOGD("operation : %s", op);
-
- // Todo: add your code here.
-
- return 0;
-}
-
-int main(int argc, char* argv[])
-{
- char ad[50] = "test data";
-
- struct agentcore_ops ops = {
- .create = __app_create,
- .terminate = __app_terminate,
- .service = __app_service,
- };
-
- ops.data = ad;
-
- appcore_agent_main(argc, argv, &ops);
-}
+++ /dev/null
-AgentProject.Ctemplate.label=Agent Project
-AgentProject.Ctemplate.description=Agent Project
-AgentProject.basics.label=Advanced Settings
-AgentProject.basics.description=Advanced properties of a project
-AgentProject.author.label=Author
-AgentProject.author.description=Name of the author
-AgentProject.author.default=Author
-AgentProject.copyright.label=Copyright
-AgentProject.copyright.description=Your copyright notice
-AgentProject.copyright.default=Your copyright notice
-AgentProject.vendor.label=Vendor
-AgentProject.vendor.default=samsung
-AgentProject.vendor.description=Enter your company or organization.
-AgentProject.description.default=Agent Project
-AgentProject.description.description=Enter a description about your application.
-AgentProject.description.label=Description
-AgentProject.e-mail.default=E-mail
-AgentProject.e-mail.description=Enter your email address
-AgentProject.e-mail.label=E-mail
+++ /dev/null
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Intel Corporation"
- copyright="Copyright (c) 2007 Intel Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html"
- id="AgentProject" label="%AgentProject.Ctemplate.label" description="%AgentProject.Ctemplate.description"
- help="help.html">
- <property-group id="basics" label="%AgentProject.basics.label" description="%AgentProject.basics.description" type="PAGES-ONLY" help="help.html">
- <property id="author"
- label="%AgentProject.author.label"
- description="%AgentProject.author.description"
- type="input"
- pattern=".*"
- default="%AgentProject.author.default"
- hidden="false"
- persist="false"/>
- <property id="copyright"
- label="%AgentProject.copyright.label"
- description="%AgentProject.copyright.description"
- type="input"
- pattern=".*"
- default="%AgentProject.copyright.default"
- hidden="false"
- persist="false"/>
- <property id="description"
- label="%AgentProject.description.label"
- description="%AgentProject.description.description"
- type="input"
- pattern=".*"
- default="%AgentProject.description.default"
- hidden="false"
- persist="false"/>
- <property id="vendor"
- label="%AgentProject.vendor.label"
- description="%AgentProject.vendor.description"
- type="input"
- pattern=".*"
- default="%AgentProject.vendor.default"
- hidden="false"
- persist="false"/>
- <property id="e-mail"
- label="%AgentProject.e-mail.label"
- description="%AgentProject.e-mail.description"
- type="input"
- pattern=".*"
- default="%AgentProject.e-mail.default"
- hidden="false"
- persist="false"/>
- </property-group>
-
- <process type="org.tizen.nativecommon.TizenCreateSourceFolder">
- <simple name="projectName" value="$(projectName)"/>
- <complex-array name="pathList">
- <element>
- <simple name="path" value="src"/>
- </element>
- </complex-array>
- </process>
-
- <process type="org.eclipse.cdt.core.AddFiles">
- <simple name="projectName" value="$(projectName)"/>
- <complex-array name="files">
- <element>
- <simple name="source" value="CMakeLists.txt"/>
- <simple name="target" value="CMakeLists.txt"/>
- <simple name="replaceable" value="true"/>
- </element>
- <element>
- <simple name="source" value="com.samsung.agent.desktop.in"/>
- <simple name="target" value="com.samsung.$(projectName).desktop.in"/>
- <simple name="replaceable" value="true"/>
- </element>
- <element>
- <simple name="source" value="include/agent.h"/>
- <simple name="target" value="include/$(projectName).h"/>
- <simple name="replaceable" value="true"/>
- </element>
- <element>
- <simple name="source" value="src/agent.c" />
- <simple name="target" value="src/$(projectName).c" />
- <simple name="replaceable" value="true" />
- </element>
- <element>
- <simple name="source" value="debian/rules"/>
- <simple name="target" value="debian/rules"/>
- <simple name="replaceable" value="true"/>
- </element>
- <element>
- <simple name="source" value="debian/compat"/>
- <simple name="target" value="debian/compat"/>
- <simple name="replaceable" value="true"/>
- </element>
- <element>
- <simple name="source" value="debian/control"/>
- <simple name="target" value="debian/control"/>
- <simple name="replaceable" value="true"/>
- </element>
- <element>
- <simple name="source" value="debian/changelog"/>
- <simple name="target" value="debian/changelog"/>
- <simple name="replaceable" value="true"/>
- </element>
- <element>
- <simple name="source" value="debian/com.samsung.agent.install"/>
- <simple name="target" value="debian/com.samsung.$(projectName).install"/>
- <simple name="replaceable" value="true"/>
- </element>
- <element>
- <simple name="source" value="debian/postinst"/>
- <simple name="target" value="debian/postinst"/>
- <simple name="replaceable" value="true"/>
- </element>
- <element>
- <simple name="source" value="packaging/agent.spec" />
- <simple name="target" value="packaging/$(projectName).spec" />
- <simple name="replaceable" value="true" />
- </element>
- </complex-array>
- </process>
-
- <process type="org.tizen.nativecommon.SetSBITarget">
- <simple name="projectName" value="$(projectName)"/>
- </process>
-
-
-</template>