Add Wayland support.
[platform/core/uifw/dali-toolkit.git] / packaging / dali-toolkit.spec
1 Name:       dali-toolkit
2 Summary:    The OpenGLES Canvas Core Library Toolkit
3 Version:    1.0.0
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache-2.0
7 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-toolkit.git;a=summary
8 Source0:    %{name}-%{version}.tar.gz
9
10 Requires(post): /sbin/ldconfig
11 Requires(postun): /sbin/ldconfig
12 Requires:       dali-adaptor-dali-feedback-plugin
13 Requires:       dali
14 # Do NOT put an adaptor here - it is an application choice which adaptor to use
15 BuildRequires:  pkgconfig
16 BuildRequires:  pkgconfig(dlog)
17 BuildRequires:  boost-devel
18 BuildRequires:  pkgconfig(dali)
19 BuildRequires:  pkgconfig(dali-core)
20 BuildRequires:  fribidi-devel
21
22 %description
23 The OpenGLES Canvas Core Library Toolkit - a set of controls that provide
24 user interface functionality.
25
26 ##############################
27 # devel
28 ##############################
29 %package devel
30 Summary:    Application development package for the OpenGLES Canvas toolkit
31 Group:      Development/Building
32 Requires:   %{name} = %{version}-%{release}
33 Requires:   boost-devel
34
35 %description devel
36 Application development package for the OpenGLES Canvas toolkit - headers and package config
37
38 ##############################
39 # Preparation
40 ##############################
41 %prep
42 %setup -q
43 %define dali_data_rw_dir            /opt/usr/share/dali/
44 %define dali_data_ro_dir            /usr/share/dali/
45 %define dali_toolkit_image_files    %{dali_data_ro_dir}/toolkit/images/
46 %define dali_toolkit_sound_files    %{dali_data_ro_dir}/toolkit/sounds/
47 %define dali_toolkit_style_files    %{dali_data_ro_dir}/toolkit/styles/
48 %define dev_include_path %{_includedir}
49
50 ##############################
51 # Build
52 ##############################
53 %build
54 PREFIX="/usr"
55 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
56 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections "
57
58 %if 0%{?sec_build_binary_debug_enable}
59 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
60 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
61 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
62 %endif
63
64 libtoolize --force
65 cd %{_builddir}/dali-toolkit-%{version}/build/slp
66 autoreconf --install
67 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
68 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
69 %configure
70 make %{?jobs:-j%jobs}
71
72 ##############################
73 # Installation
74 ##############################
75 %install
76 rm -rf %{buildroot}
77 cd build/slp
78 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
79
80 # LICENSE
81 mkdir -p %{buildroot}/usr/share/license
82 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
83
84 ##############################
85 # Post Install
86 ##############################
87 %post
88 /sbin/ldconfig
89 exit 0
90
91 ##############################
92 # Post Uninstall
93 ##############################
94 %postun
95 /sbin/ldconfig
96 exit 0
97
98 ##############################
99 # Files in Binary Packages
100 ##############################
101 %files
102 %manifest dali-toolkit.manifest
103 %defattr(-,root,root,-)
104 %{_libdir}/lib%{name}.so*
105 %{dali_toolkit_image_files}/*
106 %{dali_toolkit_sound_files}/*
107 %{dali_toolkit_style_files}/*
108 %{_datadir}/license/%{name}
109
110 %files devel
111 %defattr(-,root,root,-)
112 %{dev_include_path}/%{name}/*
113 %{_libdir}/pkgconfig/*.pc
114