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