Fix documentation in Control Renderers
[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.43
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache-2.0 and BSD-2-Clause and 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
13 BuildRequires:  pkgconfig
14 BuildRequires:  pkgconfig(dlog)
15 BuildRequires:  pkgconfig(dali-core)
16 BuildRequires: gettext
17
18 # dali-toolkit only need to know the interfaces(APIs) of dali-adaptor(the devel package).
19 # It doesn't need to know which adaptor will be used by applications.
20 # Applications or dali-addon will decide which one they will use.
21 BuildRequires:  dali-adaptor-devel
22
23 #############################
24 # profile setup
25 #############################
26
27 %define dali_toolkit_profile MOBILE
28 %define dali_style_folder 720x1280
29 # 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
30
31 %if "%{?dali_style}"
32   %define dali_style_folder %{dali_style}
33 %endif
34
35 # Further resource locations profiles can be provided here otherwise MOBILE will be used
36 %if "%{tizen_profile_name}" == "mobile"
37   %define dali_toolkit_profile MOBILE
38 %endif
39
40 %description
41 The OpenGLES Canvas Core Library Toolkit - a set of controls that provide
42 user interface functionality.
43
44 ##############################
45 # devel
46 ##############################
47 %package devel
48 Summary:    Application development package for the OpenGLES Canvas toolkit
49 Group:      Development/Building
50 Requires:   %{name} = %{version}-%{release}
51
52 %description devel
53 Application development package for the OpenGLES Canvas toolkit - headers and package config
54
55 ##############################
56 # Preparation
57 ##############################
58 %prep
59 %setup -q
60 %define dali_data_rw_dir            /opt/usr/share/dali/
61 %define dali_data_ro_dir            /usr/share/dali/
62 %define dali_toolkit_image_files    %{dali_data_ro_dir}/toolkit/images/
63 %define dali_toolkit_sound_files    %{dali_data_ro_dir}/toolkit/sounds/
64 %define dali_toolkit_style_files    %{dali_data_ro_dir}/toolkit/styles/
65 %define dev_include_path %{_includedir}
66
67 # PO
68 {
69 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
70 for language in *.po
71 do
72   language=${language%.po}
73   msgfmt -o ${language}.mo ${language}.po
74 done
75 } &> /dev/null
76
77 ##############################
78 # Build
79 ##############################
80 %build
81 PREFIX="/usr"
82 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
83 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
84
85 %if 0%{?enable_coverage}
86 CXXFLAGS+=" --coverage "
87 LDFLAGS+=" --coverage "
88 %endif
89
90 libtoolize --force
91 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
92 autoreconf --install
93 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
94 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
95
96 %configure --enable-profile=%{dali_toolkit_profile} \
97            --with-style=%{dali_style_folder} \
98 %if 0%{?enable_debug}
99            --enable-debug \
100 %endif
101            --enable-i18n=yes
102
103 make %{?jobs:-j%jobs}
104
105 ##############################
106 # Installation
107 ##############################
108 %install
109 rm -rf %{buildroot}
110 cd build/tizen
111 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
112
113 # LICENSE
114 mkdir -p %{buildroot}/usr/share/license
115 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
116
117 # PO
118 {
119 cd %{_builddir}/dali-toolkit-%{version}/dali-toolkit/po
120 for language in *.mo
121 do
122   language=${language%.mo}
123   mkdir -p %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/
124   cp ${language}.mo %{buildroot}/%{_datadir}/locale/${language}/LC_MESSAGES/dali-toolkit.mo
125 done
126 } &> /dev/null
127
128 ##############################
129 # Post Install
130 ##############################
131 %post
132 /sbin/ldconfig
133 exit 0
134
135 ##############################
136 # Post Uninstall
137 ##############################
138 %postun
139 /sbin/ldconfig
140 exit 0
141
142 ##############################
143 # Files in Binary Packages
144 ##############################
145 %files
146 %if 0%{?enable_dali_smack_rules}
147 %manifest dali-toolkit.manifest-smack
148 %else
149 %manifest dali-toolkit.manifest
150 %endif
151 %defattr(-,root,root,-)
152 %{_libdir}/lib%{name}.so*
153 %{dali_toolkit_image_files}/*
154 %{dali_toolkit_sound_files}/*
155 %{dali_toolkit_style_files}/*
156 %{_datadir}/license/%{name}
157 %{_datadir}/locale/*/LC_MESSAGES/*
158
159 %files devel
160 %defattr(-,root,root,-)
161 %{dev_include_path}/%{name}/*
162 %{_libdir}/pkgconfig/*.pc