License conversion from Flora to Apache 2.0
[platform/core/uifw/dali-core.git] / packaging / dali.spec
1 Name:       dali
2 Summary:    The OpenGLES Canvas Core Library
3 Version:    0.9.15
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache 2.0
7 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-core.git;a=summary
8 Source0:    %{name}-%{version}.tar.gz
9
10 Requires(post): /sbin/ldconfig
11 Requires(postun): /sbin/ldconfig
12 Requires:       boost-thread
13 BuildRequires:  pkgconfig
14 BuildRequires:  gawk
15 BuildRequires:  boost-devel
16 BuildRequires:  boost-thread
17 ExclusiveArch:  armv7l
18
19 %description
20 The OpenGLES Canvas Core Library provides a 3D scene graph
21
22 ##############################
23 # devel
24 ##############################
25 # This should be used only for building dali-adaptor and dali-toolkit independently of
26 # dali-capi - i.e. to break cyclic dependencies.
27 %package devel
28 Summary:    Development components for the OpenGLES Canvas Core Library
29 Group:      Development/Building
30 Requires:   %{name} = %{version}-%{release}
31 Requires:   %{name}-integration-devel = %{version}-%{release}
32
33 %description devel
34 Development components for the OpenGLES Canvas Core Library - public headers and package config
35
36 ##############################
37 # integration-devel
38 ##############################
39 %package integration-devel
40 Summary:    Integration development package for the OpenGLES Canvas
41 Group:      Development/Building
42 Requires:   %{name} = %{version}-%{release}
43
44 %description integration-devel
45 Integration development package for the OpenGLES Canvas - headers for integrating with an adaptor/platform abstraction library.
46
47 ##############################
48 # Preparation
49 ##############################
50 %prep
51 %setup -q
52 %define dali_data_rw_dir /opt/usr/share/dali/
53 %define dali_data_ro_dir /usr/share/dali/
54 %define shader_bin_dir   %{dali_data_rw_dir}/core/shaderbin
55 %define dev_include_path %{_includedir}
56
57 ##############################
58 # Build
59 ##############################
60 %build
61 PREFIX="/usr"
62 CXXFLAGS+=" -Wall -g -Os -DNDEBUG -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
63 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -lgcc_s -lgcc -lpthread"
64
65 %if 0%{?sec_build_binary_debug_enable}
66 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
67 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
68 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
69 %endif
70
71 %ifarch %{arm}
72 CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
73 %endif
74
75 libtoolize --force
76 cd %{_builddir}/%{name}-%{version}/build/slp && autoreconf --install
77 cd %{_builddir}/%{name}-%{version}/build/slp && CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ./configure --prefix="$PREFIX"
78
79 make %{?jobs:-j%jobs}
80
81 ##############################
82 # Installation
83 ##############################
84 %install
85 rm -rf %{buildroot}
86 cd build/slp
87 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
88
89 # LICENSE
90 mkdir -p %{buildroot}/usr/share/license
91 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
92
93
94 ##############################
95 # Post Install
96 ##############################
97 %post
98 /sbin/ldconfig
99 chown 5000:5000 %{shader_bin_dir}
100 %if 0%{?sec_product_feature_graphics_adreno}
101 %else
102   rm -rf %{shader_bin_dir}/*
103 %endif
104 exit 0
105
106 ##############################
107 # Post Uninstall
108 ##############################
109 %postun
110 /sbin/ldconfig
111 rm -rf %{shader_bin_dir}
112 exit 0
113
114 ##############################
115 # Files in Binary Packages
116 ##############################
117
118 %files
119 %manifest dali.manifest
120 %defattr(-,root,root,-)
121 %{_libdir}/lib%{name}-core.so*
122 %defattr(-,app,app,-)
123 %dir %{shader_bin_dir}
124 %{_datadir}/license/%{name}
125
126 %files devel
127 %defattr(-,root,root,-)
128 %{_libdir}/pkgconfig/*.pc
129 %{dev_include_path}/%{name}/public-api/*
130
131 %files integration-devel
132 %defattr(-,root,root,-)
133 %{_includedir}/%{name}/integration-api/*