DALi Version 1.0.19
[platform/core/uifw/dali-core.git] / packaging / dali.spec
1 Name:       dali
2 Summary:    The OpenGLES Canvas Core Library
3 Version:    1.0.19
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
18 %description
19 The OpenGLES Canvas Core Library provides a 3D scene graph
20
21 ##############################
22 # devel
23 ##############################
24 %package devel
25 Summary:    Development components for the OpenGLES Canvas Core Library
26 Group:      Development/Building
27 Requires:   %{name} = %{version}-%{release}
28 Requires:   %{name}-integration-devel = %{version}-%{release}
29
30 %description devel
31 Development components for the OpenGLES Canvas Core Library - public headers and package config
32
33 ##############################
34 # integration-devel
35 ##############################
36 %package integration-devel
37 Summary:    Integration development package for the OpenGLES Canvas
38 Group:      Development/Building
39 Requires:   %{name} = %{version}-%{release}
40
41 %description integration-devel
42 Integration development package for the OpenGLES Canvas - headers for integrating with an adaptor/platform abstraction library.
43
44 ##############################
45 # Preparation
46 ##############################
47 %prep
48 %setup -q
49 %define dali_data_rw_dir /opt/usr/share/dali/
50 %define dali_data_ro_dir /usr/share/dali/
51 %define shader_bin_dir   %{dali_data_rw_dir}/core/shaderbin
52 %define dev_include_path %{_includedir}
53
54 ##############################
55 # Build
56 ##############################
57 %build
58 PREFIX="/usr"
59 CXXFLAGS+=" -Wall -g -Os -DNDEBUG -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
60 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -lgcc_s -lgcc -lpthread"
61
62 %if 0%{?sec_build_binary_debug_enable}
63 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
64 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
65 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
66 %endif
67
68 %ifarch %{arm}
69 CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
70 %endif
71
72 libtoolize --force
73 cd %{_builddir}/%{name}-%{version}/build/tizen
74 autoreconf --install
75 DALI_DATA_RW_DIR="%{dali_data_rw_dir}"
76 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
77 export DALI_DATA_RW_DIR
78 export DALI_DATA_RO_DIR
79
80 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS;
81 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS;
82 LDFLAGS="${LDFLAGS:-%optflags}" ; export LDFLAGS;
83 ./configure \
84       --program-prefix=%{?_program_prefix} \
85       --prefix=%{_prefix} \
86       --exec-prefix=%{_exec_prefix} \
87       --bindir=%{_bindir} \
88       --sbindir=%{_sbindir} \
89       --sysconfdir=%{_sysconfdir} \
90       --datadir=%{_datadir} \
91       --includedir=%{_includedir} \
92       --libdir=%{_libdir} \
93       --libexecdir=%{_libexecdir} \
94       --localstatedir=%{_localstatedir} \
95       --sharedstatedir=%{_sharedstatedir} \
96       --mandir=%{_mandir} \
97       --infodir=%{_infodir}
98
99 make %{?jobs:-j%jobs}
100
101 ##############################
102 # Installation
103 ##############################
104 %install
105 rm -rf %{buildroot}
106 cd build/tizen
107 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
108
109 # LICENSE
110 mkdir -p %{buildroot}/usr/share/license
111 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
112
113
114 ##############################
115 # Post Install
116 ##############################
117 %post
118 /sbin/ldconfig
119 chown 5000:5000 %{shader_bin_dir}
120 rm -rf %{shader_bin_dir}/*
121 exit 0
122
123 ##############################
124 # Post Uninstall
125 ##############################
126 %postun
127 /sbin/ldconfig
128 rm -rf %{shader_bin_dir}
129 exit 0
130
131 ##############################
132 # Files in Binary Packages
133 ##############################
134
135 %files
136 %if 0%{?enable_dali_smack_rules}
137 %manifest dali.manifest-smack
138 %else
139 %manifest dali.manifest
140 %endif
141 %defattr(-,root,root,-)
142 %{_libdir}/lib%{name}-core.so*
143 %defattr(-,app,app,-)
144 %dir %{shader_bin_dir}
145 %{_datadir}/license/%{name}
146
147 %files devel
148 %defattr(-,root,root,-)
149 %{_libdir}/pkgconfig/*.pc
150 %{dev_include_path}/%{name}/public-api/*
151
152 %files integration-devel
153 %defattr(-,root,root,-)
154 %{_includedir}/%{name}/integration-api/*