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