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