Merge "Refactored ControlRenderer so that derived classes are responsible for the...
[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.1.7
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache-2.0, BSD-2.0, MIT
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
13 # Do NOT put an adaptor here - it is an application choice which adaptor to use
14 BuildRequires:  pkgconfig
15 BuildRequires:  pkgconfig(dlog)
16 BuildRequires:  pkgconfig(dali)
17 BuildRequires:  pkgconfig(dali-core)
18
19 #############################
20 # profile setup
21 #############################
22
23 %define dali_toolkit_profile MOBILE
24 %define dali_style_folder 720x1280
25 # dali_style to be provided by build system as with dali_toolkit_profile or by passing --define 'dali_style 470x800' to the rpm build command
26
27 %if "%{?dali_style}"
28   %define dali_style_folder %{dali_style}
29 %endif
30
31 # Further resource locations profiles can be provided here otherwise MOBILE will be used
32 %if "%{tizen_profile_name}" == "mobile"
33   %define dali_toolkit_profile MOBILE
34 %endif
35
36 %description
37 The OpenGLES Canvas Core Library Toolkit - a set of controls that provide
38 user interface functionality.
39
40 ##############################
41 # devel
42 ##############################
43 %package devel
44 Summary:    Application development package for the OpenGLES Canvas toolkit
45 Group:      Development/Building
46 Requires:   %{name} = %{version}-%{release}
47
48 %description devel
49 Application development package for the OpenGLES Canvas toolkit - headers and package config
50
51 ##############################
52 # Preparation
53 ##############################
54 %prep
55 %setup -q
56 %define dali_data_rw_dir            /opt/usr/share/dali/
57 %define dali_data_ro_dir            /usr/share/dali/
58 %define dali_toolkit_image_files    %{dali_data_ro_dir}/toolkit/images/
59 %define dali_toolkit_sound_files    %{dali_data_ro_dir}/toolkit/sounds/
60 %define dali_toolkit_style_files    %{dali_data_ro_dir}/toolkit/styles/
61 %define dev_include_path %{_includedir}
62
63 ##############################
64 # Build
65 ##############################
66 %build
67 PREFIX="/usr"
68 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
69 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
70
71 libtoolize --force
72 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
73 autoreconf --install
74 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
75 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
76 %configure --enable-profile=%{dali_toolkit_profile} --with-style=%{dali_style_folder} --enable-i18n=yes
77 make %{?jobs:-j%jobs}
78
79 ##############################
80 # Installation
81 ##############################
82 %install
83 rm -rf %{buildroot}
84 cd build/tizen
85 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
86
87 # LICENSE
88 mkdir -p %{buildroot}/usr/share/license
89 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
90
91 ##############################
92 # Post Install
93 ##############################
94 %post
95 /sbin/ldconfig
96 exit 0
97
98 ##############################
99 # Post Uninstall
100 ##############################
101 %postun
102 /sbin/ldconfig
103 exit 0
104
105 ##############################
106 # Files in Binary Packages
107 ##############################
108 %files
109 %if 0%{?enable_dali_smack_rules}
110 %manifest dali-toolkit.manifest-smack
111 %else
112 %manifest dali-toolkit.manifest
113 %endif
114 %defattr(-,root,root,-)
115 %{_libdir}/lib%{name}.so*
116 %{dali_toolkit_image_files}/*
117 %{dali_toolkit_sound_files}/*
118 %{dali_toolkit_style_files}/*
119 %{_datadir}/license/%{name}
120
121 %files devel
122 %defattr(-,root,root,-)
123 %{dev_include_path}/%{name}/*
124 %{_libdir}/pkgconfig/*.pc
125