Merge "DALi Version 1.0.5" into tizen
[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.5
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
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:  boost-devel
17 BuildRequires:  pkgconfig(dali)
18 BuildRequires:  pkgconfig(dali-core)
19 BuildRequires:  fribidi-devel
20
21 %description
22 The OpenGLES Canvas Core Library Toolkit - a set of controls that provide
23 user interface functionality.
24
25 ##############################
26 # devel
27 ##############################
28 %package devel
29 Summary:    Application development package for the OpenGLES Canvas toolkit
30 Group:      Development/Building
31 Requires:   %{name} = %{version}-%{release}
32 Requires:   boost-devel
33
34 %description devel
35 Application development package for the OpenGLES Canvas toolkit - headers and package config
36
37 ##############################
38 # Preparation
39 ##############################
40 %prep
41 %setup -q
42 %define dali_data_rw_dir            /opt/usr/share/dali/
43 %define dali_data_ro_dir            /usr/share/dali/
44 %define dali_toolkit_image_files    %{dali_data_ro_dir}/toolkit/images/
45 %define dali_toolkit_sound_files    %{dali_data_ro_dir}/toolkit/sounds/
46 %define dali_toolkit_style_files    %{dali_data_ro_dir}/toolkit/styles/
47 %define dev_include_path %{_includedir}
48
49 ##############################
50 # Build
51 ##############################
52 %build
53 PREFIX="/usr"
54 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
55 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections "
56
57 %if 0%{?sec_build_binary_debug_enable}
58 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
59 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
60 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
61 %endif
62
63 libtoolize --force
64 cd %{_builddir}/dali-toolkit-%{version}/build/tizen
65 autoreconf --install
66 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
67 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
68 %configure
69 make %{?jobs:-j%jobs}
70
71 ##############################
72 # Installation
73 ##############################
74 %install
75 rm -rf %{buildroot}
76 cd build/tizen
77 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
78
79 # LICENSE
80 mkdir -p %{buildroot}/usr/share/license
81 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
82
83 ##############################
84 # Post Install
85 ##############################
86 %post
87 /sbin/ldconfig
88 exit 0
89
90 ##############################
91 # Post Uninstall
92 ##############################
93 %postun
94 /sbin/ldconfig
95 exit 0
96
97 ##############################
98 # Files in Binary Packages
99 ##############################
100 %files
101 %if 0%{?enable_dali_smack_rules}
102 %manifest dali-toolkit.manifest-smack
103 %else
104 %manifest dali-toolkit.manifest
105 %endif
106 %defattr(-,root,root,-)
107 %{_libdir}/lib%{name}.so*
108 %{dali_toolkit_image_files}/*
109 %{dali_toolkit_sound_files}/*
110 %{dali_toolkit_style_files}/*
111 %{_datadir}/license/%{name}
112
113 %files devel
114 %defattr(-,root,root,-)
115 %{dev_include_path}/%{name}/*
116 %{_libdir}/pkgconfig/*.pc
117