dali-csharp-binder/Makefile
libtool
stamp-h1
-
+build/tizen/m4/
*.gcno
*.gcda
+build/tizen/.deps/
+build/tizen/.libs/
+
+++ /dev/null
-Copyright (C) 2015 Samsung Electronics co., Ltd. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
+++ /dev/null
-Installation Instructions
-*************************
-
-Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
-Inc.
-
- Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved. This file is offered as-is,
-without warranty of any kind.
-
-Basic Installation
-==================
-
- Briefly, the shell command `./configure && make && make install'
-should configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package. Some packages provide this
-`INSTALL' file but do not implement all of the features documented
-below. The lack of an optional feature in a given package is not
-necessarily a bug. More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
- The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package, generally using the just-built uninstalled binaries.
-
- 4. Type `make install' to install the programs and any data files and
- documentation. When installing into a prefix owned by root, it is
- recommended that the package be configured and built as a regular
- user, and only the `make install' phase executed with root
- privileges.
-
- 5. Optionally, type `make installcheck' to repeat any self-tests, but
- this time using the binaries in their final installed location.
- This target does not install anything. Running this target as a
- regular user, particularly if the prior `make install' required
- root privileges, verifies that the installation completed
- correctly.
-
- 6. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
- 7. Often, you can also type `make uninstall' to remove the installed
- files again. In practice, not all packages have tested that
- uninstallation works correctly, even though it is required by the
- GNU Coding Standards.
-
- 8. Some packages, particularly those that use Automake, provide `make
- distcheck', which can by used by developers to test that all other
- targets like `make install' and `make uninstall' work correctly.
- This target is generally not run by end users.
-
-Compilers and Options
-=====================
-
- Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
-for details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
- You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'. This
-is known as a "VPATH" build.
-
- With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
- On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor. Like
-this:
-
- ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CPP="gcc -E" CXXCPP="g++ -E"
-
- This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
- By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
-absolute file name.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them. In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
-specifications that were not explicitly provided.
-
- The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
-both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
-having to reconfigure or recompile.
-
- The first method involves providing an override variable for each
-affected directory. For example, `make install
-prefix=/alternate/directory' will choose an alternate location for all
-directory configuration variables that were expressed in terms of
-`${prefix}'. Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated. The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
- The second method involves providing the `DESTDIR' variable. For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names. The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
-does not work on platforms that have drive letters. On the other hand,
-it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
-
-Optional Features
-=================
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
- Some packages offer the ability to configure how verbose the
-execution of `make' will be. For these packages, running `./configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
-
-Particular systems
-==================
-
- On HP-UX, the default C compiler is not ANSI C compatible. If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
- ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
- HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved. Use GNU `make'
-instead.
-
- On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file. The option `-nodtk' can be used as
-a workaround. If GNU CC is not installed, it is therefore recommended
-to try
-
- ./configure CC="cc"
-
-and if that doesn't work, try
-
- ./configure CC="cc -nodtk"
-
- On Solaris, don't put `/usr/ucb' early in your `PATH'. This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
- On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'. It is recommended to use the following options:
-
- ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
- There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS
- KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
- Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation. Until the limitation is lifted, you can use
-this workaround:
-
- CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
- `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
- Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
- Print a summary of the options unique to this package's
- `configure', and exit. The `short' variant lists options used
- only in the top level, while the `recursive' variant lists options
- also present in any nested packages.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`--prefix=DIR'
- Use DIR as the installation prefix. *note Installation Names::
- for more details, including other options available for fine-tuning
- the installation locations.
-
-`--no-create'
-`-n'
- Run the configure checks, but stop before creating any output
- files.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
+++ /dev/null
-SUBDIRS = dali-csharp-binder
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = dali-csharp-binder.pc
-
To build the repository enter the 'build/tizen' folder:
- cd dali-toolkit/build/tizen
+ cd dali-csharp-binder/build/tizen
Then run the following commands:
--- /dev/null
+#
+# Copyright (c) 2018 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+MAINTAINERCLEANFILES = \
+ aclocal.m4 \
+ autom4te.cache \
+ config.guess \
+ config.sub \
+ config.h.in \
+ configure \
+ depcomp \
+ install-sh \
+ ltmain.sh \
+ m4 \
+ missing \
+ `find "$(srcdir)" -type f -name Makefile.in -print` \
+ `find . \( -name "*.gcov" -o -name "*.gcno" -o -name "*.gcda" \) -print`
+
+CLEANFILES = \
+ `find . \( -name "*.gcov" -o -name "*.gcno" -o -name "*.gcda" \) -print`
+
+# Build the Dali csharp binder library
+
+############# INCLUDE FILE LISTS #############
+
+dali_csharp_binder_dir = ../../dali-csharp-binder
+include ../../dali-csharp-binder/file.list
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = dali-csharp-binder.pc
+
+# sources
+if UBUNTU_PROFILE
+LIBDALI_CSHARP_BINDER_LA_SOURCES = \
+ $(dali_csharp_binder_common_src_files)
+endif
+
+if MOBILE_PROFILE
+LIBDALI_CSHARP_BINDER_LA_SOURCES = \
+ $(dali_csharp_binder_common_src_files) \
+ $(dali_csharp_binder_tizen_src_files)
+endif
+
+if IVI_PROFILE
+LIBDALI_CSHARP_BINDER_LA_SOURCES = \
+ $(dali_csharp_binder_common_src_files) \
+ $(dali_csharp_binder_tizen_src_files)
+endif
+
+if TV_PROFILE
+LIBDALI_CSHARP_BINDER_LA_SOURCES = \
+ $(dali_csharp_binder_common_src_files) \
+ $(dali_csharp_binder_tizen_src_files)
+endif
+
+if COMMON_PROFILE
+LIBDALI_CSHARP_BINDER_LA_SOURCES = \
+ $(dali_csharp_binder_common_src_files)
+endif
+
+if WEARABLE_PROFILE
+LIBDALI_CSHARP_BINDER_LA_SOURCES = \
+ $(dali_csharp_binder_common_src_files) \
+ $(dali_csharp_binder_tizen_src_files) \
+ $(dali_csharp_binder_tizen_wearable_src_files)
+endif
+
+
+LIBDALI_CSHARP_BINDER_LA_includes = \
+ -I../../
+
+LIBDALI_CSHARP_BINDER_LA_CXXFLAGS = \
+ -DDALI_DATA_RW_DIR="\"${daliReadWriteDir}\"" \
+ -DDALI_DATA_RO_DIR="\"${daliReadOnlyDir}\"" \
+ $(LIBDALI_CSHARP_BINDER_LA_includes) \
+ ${CFLAGS} \
+ $(DALICORE_CFLAGS) \
+ $(DALIADAPTOR_CFLAGS) \
+ $(DALITOOLKIT_CFLAGS)
+
+LIBDALI_CSHARP_BINDER_LA_LIBADD = \
+ $(DALICORE_LIBS) \
+ $(DALIADAPTOR_LIBS) \
+ $(DALITOOLKIT_LIBS)
+
+if !UBUNTU_PROFILE
+LIBDALI_CSHARP_BINDER_LA_CXXFLAGS += -DTIZEN_BUILD \
+ $(DALIWIDGET_CFLAGS)
+LIBDALI_CSHARP_BINDER_LA_LIBADD += $(DALIWIDGET_LIBS)
+if ECORE_WAYLAND2
+LIBDALI_CSHARP_BINDER_LA_CXXFLAGS += -DECORE_WL2 \
+ -DEFL_BETA_API_SUPPORT \
+ $(ECORE_WL2_CFLAGS)
+else
+LIBDALI_CSHARP_BINDER_LA_CXXFLAGS += $(ECORE_WAYLAND_CFLAGS)
+endif
+
+endif
+
+lib_LTLIBRARIES = libdali-csharp-binder.la
+
+libdali_csharp_binder_la_SOURCES = $(LIBDALI_CSHARP_BINDER_LA_SOURCES)
+libdali_csharp_binder_la_includes = $(LIBDALI_CSHARP_BINDER_LA_INCLUDES)
+libdali_csharp_binder_ladir = $(libdir)
+libdali_csharp_binder_la_LDFLAGS = ${LDFLAGS}
+libdali_csharp_binder_la_CXXFLAGS = $(LIBDALI_CSHARP_BINDER_LA_CXXFLAGS)
+libdali_csharp_binder_la_LIBADD = $(LIBDALI_CSHARP_BINDER_LA_LIBADD)
+
+libdali_csharp_binderdir = $(includedir)/dali-csharp-binder
+libdali_csharp_binder_HEADERS = $(dali_csharp_binder_header_files)
+
+## added for key grab binding only for tizen
+## if TIZENBUILD
+## libdali_csharp_binder_la_CXXFLAGS += -DTIZEN_BUILD
+## if ECOREWL2
+## libdali_csharp_binder_la_CXXFLAGS += -DECORE_WL2
+## libdali_csharp_binder_la_CXXFLAGS += -DEFL_BETA_API_SUPPORT
+## libdali_csharp_binder_la_CXXFLAGS+= $(ECORE_WL2_CFLAGS)
+## else
+## libdali_csharp_binder_la_CXXFLAGS+= $(ECORE_WAYLAND_CFLAGS)
+## endif
+## libdali_csharp_binder_la_SOURCES = $(dali_csharp_binder_src_files_tizen)
+## else
+## libdali_csharp_binder_la_SOURCES = $(dali_csharp_binder_src_files)
+## endif
--- /dev/null
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+m4_define([dali_version],[0.1.0])
+AC_INIT([dali], [dali_version])
+AM_INIT_AUTOMAKE([-Wall foreign])
+AC_CONFIG_MACRO_DIR([m4])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+AC_PROG_MKDIR_P
+
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+LT_INIT
+
+DALI_CSHARP_BINDER_VERSION=dali_version
+AC_SUBST(DALI_CSHARP_BINDER_VERSION)
+
+AC_ARG_ENABLE([debug],
+ [AC_HELP_STRING([--enable-debug],
+ [Turns on debugging])],
+ [enable_debug=$enableval],
+ [enable_debug=no])
+
+if test "x$enable_debug" = "xyes"; then
+ DALI_CSHARP_BINDER_CFLAGS="$DALI_CSHARP_BINDER_CFLAGS -DDEBUG_ENABLED"
+fi
+
+# Tizen Profile options
+AC_ARG_ENABLE([profile],
+ [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,IVI,UBUNTU],
+ [Select the variant of tizen])],
+ [enable_profile=$enableval],
+ [enable_profile=UBUNTU])
+
+# Ensure valid profile selected
+if test "x$enable_profile" != "xCOMMON" -a "x$enable_profile" != "xMOBILE" -a "x$enable_profile" != "xWEARABLE" -a "x$enable_profile" != "xTV" -a "x$enable_profile" != "xIVI" -a "x$enable_profile" != "xUBUNTU"; then
+ AC_MSG_ERROR([$enable_profile is an invalid profile])
+fi
+
+
+AC_ARG_ENABLE(wayland,
+ [ --enable-wayland Build on Wayland],
+ enable_wayland=yes,
+ enable_wayland=no)
+
+AC_ARG_ENABLE(ecore_wayland2,
+ [ --enable-ecore-wayland2 Build on Ecore Wayland2],
+ enable_ecore_wayland2=yes,
+ enable_ecore_wayland2=no)
+
+DALI_CSHARP_BINDER_CFLAGS="$DALI_CSHARP_BINDER_CFLAGS -DDALI_PROFILE_${enable_profile}"
+DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
+AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
+AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
+AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
+AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
+AM_CONDITIONAL([IVI_PROFILE], [test x$enable_profile = xIVI])
+AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
+AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
+AM_CONDITIONAL([ECORE_WAYLAND2], [test x$enable_ecore_wayland2 = xyes])
+AM_CONDITIONAL([ENABLE_RENAME_SO], [test x$enable_rename_so = xyes])
+
+
+### AM_CONDITIONAL([TIZENBUILD], [test x$enable_tizenBuild = xyes])
+### AM_CONDITIONAL([ECOREWL2], [test x$enable_ecoreWl2 = xyes])
+
+PKG_CHECK_MODULES(DALICORE, dali-core)
+PKG_CHECK_MODULES(DALIADAPTOR, dali-adaptor)
+PKG_CHECK_MODULES(DALITOOLKIT, dali-toolkit)
+
+if test "x$enable_profile" = "xMOBILE" -o "x$enable_profile" = "xWEARABLE" -o "x$enable_profile" = "xTV" -o "x$enable_profile" = "xIVI"; then
+ PKG_CHECK_MODULES(DALIWIDGET, widget_viewer_dali)
+ if test x$enable_ecore_wayland2 = xyes; then
+ PKG_CHECK_MODULES(ECORE_WL2, ecore-wl2)
+ else
+ PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
+ fi
+fi
+
+
+# Checks for libraries. added for widget_viewer_dali binding only for tizen
+# added for key grab binding only for tizen
+## if test x$enable_tizenBuild = xyes; then
+## PKG_CHECK_MODULES(DALI, dali-core dali-adaptor dali-toolkit widget_viewer_dali)
+## if test x$enable_ecoreWl2 = xyes; then
+## PKG_CHECK_MODULES(ECORE_WL2, ecore-wl2)
+## else
+## PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
+## fi
+## else
+## PKG_CHECK_MODULES(DALI, dali-core dali-adaptor dali-toolkit)
+## fi
+
+
+if test x$DALI_DATA_RW_DIR != x; then
+ dataReadWriteDir=$DALI_DATA_RW_DIR
+else
+ dataReadWriteDir=${prefix}/share/dali/
+fi
+
+if test x$DALI_DATA_RO_DIR != x; then
+ dataReadOnlyDir=$DALI_DATA_RO_DIR
+else
+ dataReadOnlyDir=${prefix}/share/dali/
+fi
+
+AC_SUBST(dataReadWriteDir)
+AC_SUBST(dataReadOnlyDir)
+AC_SUBST(DALI_CSHARP_BINDER_CFLAGS)
+AC_SUBST(DALI_PROFILE_CFLAGS)
+
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([dali-csharp-binder.pc])
+
+AC_OUTPUT
+
+
+echo "
+Configuration
+-------------
+ Prefix: $prefix
+ Debug Build: $enable_debug
+ Compile flags: $DALI_CSHARP_BINDER_CFLAGS
+ Profile: $enable_profile
+ Data Dir (Read/Write): $dataReadWriteDir
+ Data Dir (Read Only): $dataReadOnlyDir
+"
+++ /dev/null
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.64])
-AC_INIT([dali-csharp-binder], [0.0.0])
-AC_CONFIG_SRCDIR([configure.ac])
-AC_CONFIG_HEADERS([config.h])
-
-AM_INIT_AUTOMAKE(1.6)
-
-# Checks for programs.
-AC_PROG_CXX
-AC_PROG_LIBTOOL
-
-# added for key grab binding only for tizen
-AC_ARG_ENABLE(tizenBuild,
- [ --enable-tizenBuild build on tizen],
- enable_tizenBuild=yes,
- enable_tizenBuild=no)
-
-AC_ARG_ENABLE(ecoreWl2,
- [ --enable-ecore-wl2 build on ecorewl2],
- enable_ecoreWl2=yes,
- enable_ecoreWl2=no)
-
-AM_CONDITIONAL([TIZENBUILD], [test x$enable_tizenBuild = xyes])
-AM_CONDITIONAL([ECOREWL2], [test x$enable_ecoreWl2 = xyes])
-
-PKG_PROG_PKG_CONFIG
-# Checks for libraries. added for widget_viewer_dali binding only for tizen
-# added for key grab binding only for tizen
-if test x$enable_tizenBuild = xyes; then
- PKG_CHECK_MODULES(DALI, dali-core dali-adaptor dali-toolkit widget_viewer_dali)
- if test x$enable_ecoreWl2 = xyes; then
- PKG_CHECK_MODULES(ECORE_WL2, ecore-wl2)
- else
- PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
- fi
-else
- PKG_CHECK_MODULES(DALI, dali-core dali-adaptor dali-toolkit)
-fi
-
-AC_CONFIG_FILES([
-Makefile
-dali-csharp-binder/Makefile
-])
-AC_OUTPUT([
-dali-csharp-binder.pc
-])
+++ /dev/null
-
-include ./file.list
-
-dali_csharp_binder_includes = \
- -I.
-
-libdali_csharp_binder_la_LTLIBRARIES = libdali-csharp-binder.la
-libdali_csharp_binder_ladir = $(libdir)
-libdali_csharp_binder_la_LIBADD = @DALI_LIBS@
-libdali_csharp_binder_la_LDFLAGS = ${LDFLAGS}
-libdali_csharp_binder_la_CXXFLAGS = \
- ${CFLAGS} \
- $(DALI_CFLAGS) \
- $(viewer_dali_CFLAGS) \
- $(dali_csharp_binder_includes)
-
-# added for key grab binding only for tizen
-if TIZENBUILD
-libdali_csharp_binder_la_CXXFLAGS += -DTIZEN_BUILD
-if ECOREWL2
-libdali_csharp_binder_la_CXXFLAGS += -DECORE_WL2
-libdali_csharp_binder_la_CXXFLAGS += -DEFL_BETA_API_SUPPORT
-libdali_csharp_binder_la_CXXFLAGS+= $(ECORE_WL2_CFLAGS)
-else
-libdali_csharp_binder_la_CXXFLAGS+= $(ECORE_WAYLAND_CFLAGS)
-endif
-libdali_csharp_binder_la_SOURCES = $(dali_csharp_binder_src_files_tizen)
-else
-libdali_csharp_binder_la_SOURCES = $(dali_csharp_binder_src_files)
-endif
-
-libdali_csharp_binderdir = $(includedir)/dali-csharp-binder
-libdali_csharp_binder_HEADERS = $(dali_csharp_binder_header_files)
-
-
#
# Add source files here
-#
+# backend: common - ubuntu,mobile,tv,ivi,tizen-wearable
+# backend: tizen - mobile,tv,ivi,tizen-wearable
+# backend: tizen-wearable - tizen-wearable
-dali_csharp_binder_src_files = \
- src/dali_wrap.cpp \
- src/callbackbase_wrap.cpp \
- src/keyboard_focus_manager_wrap.cpp \
- src/devel-property-wrap.cpp \
- src/version-check.cpp \
- src/layout-length.cpp \
- src/layout-size.cpp \
- src/layout-measured-size.cpp \
- src/layout-measure-spec.cpp \
- src/layout-item-ptr.cpp \
- src/layout-item-wrapper.cpp \
- src/layout-item-wrapper-impl.cpp \
- src/layout-group-wrapper.cpp \
- src/layout-group-wrapper-impl.cpp \
- src/absolute-layout.cpp \
- src/flex-layout.cpp \
- src/linear-layout.cpp \
- src/view-wrapper-impl-wrap.cpp \
- src/event-thread-callback-wrap.cpp \
- src/application.cpp \
- src/text-editor.cpp \
- src/text-field.cpp \
- src/window.cpp \
- src/tts-player.cpp \
- src/input-method-context.cpp \
- src/input-method-options.cpp \
- src/animation.cpp \
- src/watch.cpp \
- src/adaptor.cpp \
- src/extents.cpp
+# module: csharp-binder, backend: common
+dali_csharp_binder_common_src_files = \
+ ${dali_csharp_binder_dir}/src/dali_wrap.cpp \
+ ${dali_csharp_binder_dir}/src/callbackbase_wrap.cpp \
+ ${dali_csharp_binder_dir}/src/keyboard_focus_manager_wrap.cpp \
+ ${dali_csharp_binder_dir}/src/devel-property-wrap.cpp \
+ ${dali_csharp_binder_dir}/src/version-check.cpp \
+ ${dali_csharp_binder_dir}/src/layout-length.cpp \
+ ${dali_csharp_binder_dir}/src/layout-size.cpp \
+ ${dali_csharp_binder_dir}/src/layout-measured-size.cpp \
+ ${dali_csharp_binder_dir}/src/layout-measure-spec.cpp \
+ ${dali_csharp_binder_dir}/src/layout-item-ptr.cpp \
+ ${dali_csharp_binder_dir}/src/layout-item-wrapper.cpp \
+ ${dali_csharp_binder_dir}/src/layout-item-wrapper-impl.cpp \
+ ${dali_csharp_binder_dir}/src/layout-group-wrapper.cpp \
+ ${dali_csharp_binder_dir}/src/layout-group-wrapper-impl.cpp \
+ ${dali_csharp_binder_dir}/src/absolute-layout.cpp \
+ ${dali_csharp_binder_dir}/src/flex-layout.cpp \
+ ${dali_csharp_binder_dir}/src/linear-layout.cpp \
+ ${dali_csharp_binder_dir}/src/view-wrapper-impl-wrap.cpp \
+ ${dali_csharp_binder_dir}/src/event-thread-callback-wrap.cpp \
+ ${dali_csharp_binder_dir}/src/application.cpp \
+ ${dali_csharp_binder_dir}/src/text-editor.cpp \
+ ${dali_csharp_binder_dir}/src/text-field.cpp \
+ ${dali_csharp_binder_dir}/src/window.cpp \
+ ${dali_csharp_binder_dir}/src/tts-player.cpp \
+ ${dali_csharp_binder_dir}/src/input-method-context.cpp \
+ ${dali_csharp_binder_dir}/src/input-method-options.cpp \
+ ${dali_csharp_binder_dir}/src/animation.cpp \
+ ${dali_csharp_binder_dir}/src/adaptor.cpp \
+ ${dali_csharp_binder_dir}/src/extents.cpp
# added for key grab binding only for tizen
-dali_csharp_binder_src_files_tizen = \
- src/dali_wrap.cpp \
- src/callbackbase_wrap.cpp \
- src/keyboard_focus_manager_wrap.cpp \
- src/devel-property-wrap.cpp \
- src/version-check.cpp \
- src/layout-length.cpp \
- src/layout-size.cpp \
- src/layout-measured-size.cpp \
- src/layout-measure-spec.cpp \
- src/layout-item-ptr.cpp \
- src/layout-item-wrapper.cpp \
- src/layout-item-wrapper-impl.cpp \
- src/layout-group-wrapper.cpp \
- src/layout-group-wrapper-impl.cpp \
- src/absolute-layout.cpp \
- src/flex-layout.cpp \
- src/linear-layout.cpp \
- src/view-wrapper-impl-wrap.cpp \
- src/event-thread-callback-wrap.cpp \
- src/application.cpp \
- src/text-editor.cpp \
- src/text-field.cpp \
- src/window.cpp \
- src/tts-player.cpp \
- src/input-method-context.cpp \
- src/input-method-options.cpp \
- src/animation.cpp \
- src/key-grab.cpp \
- src/watch.cpp \
- src/widget_view.cpp \
- src/widget_view_manager.cpp \
- src/adaptor.cpp \
- src/extents.cpp \
- src/web-view-lite.cpp \
- src/font-client.cpp
+# module: csharp-binder, backend: mobile,tv,ivi,watch
+dali_csharp_binder_tizen_src_files = \
+ ${dali_csharp_binder_dir}/src/key-grab.cpp \
+ ${dali_csharp_binder_dir}/src/widget_view.cpp \
+ ${dali_csharp_binder_dir}/src/widget_view_manager.cpp \
+ ${dali_csharp_binder_dir}/src/font-client.cpp \
+ ${dali_csharp_binder_dir}/src/web-view-lite.cpp
+
+# module: csharp-binder, backend: tizen-wearable
+dali_csharp_binder_tizen_wearable_src_files = \
+ ${dali_csharp_binder_dir}/src/watch.cpp
dali_csharp_binder_header_files = \
- src/common.h
+ ${dali_csharp_binder_dir}/src/common.h
+# NOTES
+# This spec file is used to build DALi C# binder for different Tizen Profiles
+# Current profiles are: Mobile, TV, Wearable, Common
+#
+# The profile variable is defined outside of the spec file in a build.conf file.
+# It will contain the profile and whether or not to build with X11 or Wayland
+#
+# gbs will try to download the build.conf for the platform automatically from the repo location when
+# performing a gbs build ( use gbs build -v to see it download location) E.g.
+# http://download.tizen.org/snapshots/tizen/tv/tizen-tv/repos/arm-wayland/packages/repodata/xxxx-build.conf.gz
+
+# This if statement is for backward compatibility with GBM/Obsolete build systems
+%if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%global __provides_exclude_from ^.*\\.(wearable|mobile|tv|ivi|common)$
+%endif
+
+%bcond_with wayland
Name: dali-csharp-binder
+Summary: The DALI Csharp Binder
Version: 1.3.33
Release: 1
-Summary: build dali csharp binder
-License: Apache-2.0 and BSD-3-Clause and MIT
Group: uifw/graphic
+License: Apache-2.0 and BSD-3-Clause and MIT
Source: %{name}-%{version}.tar.xz
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+#need libtzplatform-config for directory if tizen version is 3.x
+
+%if 0%{?tizen_version_major} >= 3
+%define tizen_platform_config_supported 1
+BuildRequires: pkgconfig(libtzplatform-config)
+%endif
+
+%if 0%{?tizen_version_major} < 4
+%define disable_cxx03_build 1
+%endif
+
+# Get the profile from tizen_profile_name if tizen version is 2.x and tizen_profile_name exists.
+
+%if "%{tizen_version_major}" == "2" && 0%{?tizen_profile_name:1}
+%define profile %{tizen_profile_name}
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+BuildRequires: pkgconfig(capi-appfw-watch-application)
+BuildRequires: pkgconfig(appcore-watch)
+BuildRequires: pkgconfig(screen_connector_provider)
+%endif
+
+BuildRequires: pkgconfig
BuildRequires: pkgconfig(dali-core)
BuildRequires: pkgconfig(dali-adaptor)
BuildRequires: pkgconfig(dali-toolkit)
BuildRequires: pkgconfig(widget_viewer_dali)
+
+
%if 0%{?tizen_version_major} >= 5
BuildRequires: pkgconfig(ecore-wl2)
%else
BuildRequires: pkgconfig(ecore-wayland)
%endif
+# for multiprofile
+Requires: %{name}-compat = %{version}-%{release}
+Recommends: %{name}-profile_common = %{version}-%{release}
+
%description
dali-csharp-binder
-%if 0%{?tizen_version_major} >= 5
-CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
-CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
+###########################################
+# Dali csharp binder for profiles
+###########################################
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%package profile_mobile
+Summary: The DALi Tizen csharp binder for mobile
+Provides: %{name}-compat = %{version}-%{release}
+Conflicts: %{name}-profile_tv
+Conflicts: %{name}-profile_wearable
+Conflicts: %{name}-profile_ivi
+Conflicts: %{name}-profile_common
+%description profile_mobile
+The DALi Tizen csharp binder for mobile.
%endif
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%package profile_tv
+Summary: The DALi Tizen csharp binder for tv
+Provides: %{name}-compat = %{version}-%{release}
+Conflicts: %{name}-profile_mobile
+Conflicts: %{name}-profile_wearable
+Conflicts: %{name}-profile_ivi
+Conflicts: %{name}-profile_common
+%description profile_tv
+The DALi Tizen csharp binder for tv.
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%package profile_wearable
+Summary: The DALi Tizen csharp binder for wearable
+Provides: %{name}-compat = %{version}-%{release}
+Conflicts: %{name}-profile_mobile
+Conflicts: %{name}-profile_tv
+Conflicts: %{name}-profile_ivi
+Conflicts: %{name}-profile_common
+%description profile_wearable
+The DALi Tizen csharp binder for wearable.
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+%package profile_ivi
+Summary: The DALi Tizen csharp binder for ivi
+Provides: %{name}-compat = %{version}-%{release}
+Conflicts: %{name}-profile_mobile
+Conflicts: %{name}-profile_wearable
+Conflicts: %{name}-profile_tv
+Conflicts: %{name}-profile_common
+%description profile_ivi
+The DALi Tizen csharp binder for ivi.
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if common ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+# Currently Tizen Common we use does not have wayland extensions like xdg-shell
+%package profile_common
+%define tizen_2_2_compatibility 0
+Summary: The DALi Tizen csharp binder for common
+Provides: %{name}-compat = %{version}-%{release}
+Conflicts: %{name}-profile_mobile
+Conflicts: %{name}-profile_wearable
+Conflicts: %{name}-profile_tv
+Conflicts: %{name}-profile_ivi
+%description profile_common
+The DALi Tizen csharp binder for common.
+%endif
+
+
##############################
# devel
##############################
%prep
%setup -q
+#Use TZ_PATH when tizen version is 3.x or greater
+
+%if 0%{?tizen_version_major} >= 3
+%define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/
+%define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
+%else
+%define dali_data_rw_dir /usr/share/dali/
+%define dali_data_ro_dir /usr/share/dali/
+%endif
+
+
##############################
# Build
##############################
%build
-%autogen
+PREFIX+="/usr"
+CXXFLAGS+=" -Wall -g -Os -fPIC"
+LDFLAGS+=" -Wl,--rpath=%{_libdir} "
+
+%if %{with wayland}
+CFLAGS+=" -DWAYLAND"
+CXXFLAGS+=" -DWAYLAND"
+configure_flags="--enable-wayland"
+
+# Need Ecore-Wayland2 when Tizen version is 5.x or greater
+%if 0%{?tizen_version_major} >= 5
+CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
+CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
+configure_flags+=" --enable-ecore-wayland2"
+%endif
+%endif
+
+# autogen
+libtoolize --force
+cd %{_builddir}/%{name}-%{version}/build/tizen
+autoreconf --install
+
+DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
+DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
+%if 0%{?tizen_platform_config_supported}
+TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TIZEN_PLATFORM_CONFIG_SUPPORTED
+%endif
+
# added for key grab binding only for tizen
# Do not merge this on tizen branch!
-%if 0%{?tizen_version_major} >= 5
-%configure --enable-ecoreWl2=yes \
- --enable-tizenBuild=no
-%else
-%configure --enable-tizenBuild=no
+
+# Set up the build via configure.
+#######################################################################
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%configure --prefix=$PREFIX --enable-profile=MOBILE \
+ --enable-tizen-major-version=%{tizen_version_major} \
+%if 0%{?enable_debug}
+ --enable-debug \
+%endif
+ $configure_flags --libdir=%{_libdir}
+
+# Build.
+make %{?jobs:-j%jobs}
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+popd
+
+pushd %{buildroot}%{_libdir}
+for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.mobile"; done
+mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
+popd
+
+make clean
+%endif
+
+#######################################################################
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%configure --prefix=$PREFIX --enable-profile=TV \
+ --enable-tizen-major-version=%{tizen_version_major} \
+%if 0%{?enable_debug}
+ --enable-debug \
+%endif
+ $configure_flags --libdir=%{_libdir}
+
+# Build.
+make %{?jobs:-j%jobs}
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+popd
+
+pushd %{buildroot}%{_libdir}
+for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.tv"; done
+mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
+popd
+
+make clean
+%endif
+
+#######################################################################
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%configure --prefix=$PREFIX --enable-profile=WEARABLE \
+ --enable-tizen-major-version=%{tizen_version_major} \
+%if 0%{?enable_debug}
+ --enable-debug \
+%endif
+ $configure_flags --libdir=%{_libdir}
+
+# Build.
+make %{?jobs:-j%jobs}
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+popd
+
+pushd %{buildroot}%{_libdir}
+for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.wearable"; done
+mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
+popd
+
+make clean
+%endif
+
+#######################################################################
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+%configure --prefix=$PREFIX --enable-profile=IVI \
+ --enable-tizen-major-version=%{tizen_version_major} \
+%if 0%{?enable_debug}
+ --enable-debug \
+%endif
+ $configure_flags --libdir=%{_libdir}
+
+# Build.
+make %{?jobs:-j%jobs}
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+popd
+
+pushd %{buildroot}%{_libdir}
+for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE.ivi"; done
+mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
+popd
+
+make clean
+%endif
+
+#######################################################################
+# common
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if common ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%configure --prefix=$PREFIX --enable-profile=COMMON \
+ --enable-tizen-major-version=%{tizen_version_major} \
+%if 0%{?enable_debug}
+ --enable-debug \
%endif
+ $configure_flags --libdir=%{_libdir}
-make %{?_smp_mflags}
+# Build.
+make %{?jobs:-j%jobs}
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+popd
+
+pushd %{buildroot}%{_libdir}
+for FILE in libdali-csharp-binder*.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
+mv pkgconfig/dali-csharp-binder*pc %{_builddir}/%{name}-%{version}/build/tizen/
+popd
+
+make clean
+%endif
##############################
# Installation
##############################
%install
-%make_install
+rm -rf %{buildroot}
+
+pushd %{_builddir}/%{name}-%{version}/build/tizen
+%make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
+
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# !unified && (wearable || tv || ivi || mobile)
+%if "%{?profile}" == "wearable" || "%{?profile}" == "tv" || "%{?profile}" == "ivi" || "%{?profile}" == "mobile"
+rm -rf %{buildroot}%{_libdir}/libdali-csharp-binder*.so*
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# wearable || tv || ivi || mobile || unified
+%if "%{?profile}" != "common"
+for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
+mv dali-csharp-binder*.pc %{buildroot}%{_libdir}/pkgconfig/
+%endif
+popd
+
+################################################
+#rename
+###############################################
+pushd %{buildroot}%{_libdir}
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if common ||"undefined"
+#%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+rm -rf libdali-csharp-binder*.so
+ln -s libdali-csharp-binder.so.0.0.0 libdali-csharp-binder.so
+#%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+rm -rf libdali-csharp-binder*.so.wearable
+ln -s libdali-csharp-binder.so.0.0.*.wearable libdali-csharp-binder.so.wearable
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+rm -rf libdali-csharp-binder*.so.tv
+ln -s libdali-csharp-binder.so.0.0.*.tv libdali-csharp-binder.so.tv
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+rm -rf libdali-csharp-binder*.so.ivi
+ln -s libdali-csharp-binder.so.0.0.*.ivi libdali-csharp-binder.so.ivi
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+rm -rf libdali-csharp-binder*.so.mobile
+ln -s libdali-csharp-binder.so.0.0.*.mobile libdali-csharp-binder.so.mobile
+%endif
+popd
+
+##############################
+# Upgrade order:
+# 1 - Pre Install new package
+# 2 - Install new package
+# 3 - Post install new package
+# 4 - Pre uninstall old package
+# 5 - Remove files not overwritten by new package
+# 6 - Post uninstall old package
+##############################
+
+%pre
+exit 0
+
+##############################
+# Post Install new package
+##############################
+%post
+/sbin/ldconfig
+exit 0
+
+##############################
+# Pre Uninstall old package
+##############################
+%preun
+exit 0
+
+##############################
+# Post Uninstall old package
+##############################
+%postun
+/sbin/ldconfig
+exit 0
+
+##############################
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%post profile_mobile
+pushd %{_libdir}
+for FILE in libdali-csharp-binder.so*.mobile; do ln -sf "$FILE" "${FILE%.mobile}"; done
+popd
+/sbin/ldconfig
+exit 0
+
+%postun profile_mobile
+/sbin/ldconfig
+exit 0
+%endif
+
+##############################
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%post profile_tv
+pushd %{_libdir}
+for FILE in libdali-csharp-binder.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
+popd
+/sbin/ldconfig
+exit 0
+
+%postun profile_tv
+/sbin/ldconfig
+exit 0
+%endif
+
+##############################
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%post profile_wearable
+pushd %{_libdir}
+for FILE in libdali-csharp-binder.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
+popd
+/sbin/ldconfig
+exit 0
+
+%postun profile_wearable
+/sbin/ldconfig
+exit 0
+%endif
+
+##############################
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+%post profile_ivi
+pushd %{_libdir}
+for FILE in libdali-csharp-binder.so*.ivi; do ln -sf "$FILE" "${FILE%.ivi}"; done
+popd
+/sbin/ldconfig
+exit 0
+
+%postun profile_ivi
+/sbin/ldconfig
+exit 0
+%endif
+
##############################
# Files in Binary Packages
##############################
-%files -n %{name}
-%manifest dali-csharp-binder.manifest
+%files
+%manifest dali-csharp-binder.manifest
+%defattr(-,root,root,-)
+%defattr(-,app,app,-)
+%license LICENSE
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if common ||"undefined"
+#%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%defattr(-,root,root,-)
+%{_libdir}/libdali-csharp-binder.so*
+%exclude %{_libdir}/libdali-csharp-binder*.so*.mobile
+%exclude %{_libdir}/libdali-csharp-binder*.so*.wearable
+%exclude %{_libdir}/libdali-csharp-binder*.so*.tv
+%exclude %{_libdir}/libdali-csharp-binder*.so*.ivi
+#%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if common ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%files profile_common
+# default .so files are housed in the main pkg.
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%files profile_mobile
+%manifest dali-csharp-binder.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libdali-csharp-binder.so.*mobile
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%files profile_tv
+%manifest dali-csharp-binder.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libdali-csharp-binder.so.*tv
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%files profile_wearable
+%manifest dali-csharp-binder.manifest
%defattr(-,root,root,-)
-%{_libdir}/lib%{name}.so*
+%{_libdir}/libdali-csharp-binder.so.*wearable
+%endif
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+%files profile_ivi
+%manifest dali-csharp-binder.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libdali-csharp-binder.so.*ivi
+%endif
%files devel
%defattr(-,root,root,-)