DALi Version 1.0.38
[platform/core/uifw/dali-core.git] / packaging / dali.spec
1 Name:       dali
2 Summary:    The OpenGLES Canvas Core Library
3 Version:    1.0.38
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 dev_include_path %{_includedir}
52
53 ##############################
54 # Build
55 ##############################
56 %build
57 PREFIX="/usr"
58 CXXFLAGS+=" -Wall -g -Os -DNDEBUG -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
59 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -lgcc_s -lgcc -lpthread -Wl,-Bsymbolic-functions "
60
61 %ifarch %{arm}
62 CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
63 %endif
64
65 libtoolize --force
66 cd %{_builddir}/%{name}-%{version}/build/tizen
67 autoreconf --install
68 DALI_DATA_RW_DIR="%{dali_data_rw_dir}"
69 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
70 export DALI_DATA_RW_DIR
71 export DALI_DATA_RO_DIR
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       --infodir=%{_infodir}
91
92 make %{?jobs:-j%jobs}
93
94 ##############################
95 # Installation
96 ##############################
97 %install
98 rm -rf %{buildroot}
99 cd build/tizen
100 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
101
102 # LICENSE
103 mkdir -p %{buildroot}/usr/share/license
104 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
105
106
107 ##############################
108 # Post Install
109 ##############################
110 %post
111 /sbin/ldconfig
112 exit 0
113
114 ##############################
115 # Post Uninstall
116 ##############################
117 %postun
118 /sbin/ldconfig
119 exit 0
120
121 ##############################
122 # Files in Binary Packages
123 ##############################
124
125 %files
126 %if 0%{?enable_dali_smack_rules}
127 %manifest dali.manifest-smack
128 %else
129 %manifest dali.manifest
130 %endif
131 %defattr(-,root,root,-)
132 %{_libdir}/lib%{name}-core.so*
133 %defattr(-,app,app,-)
134 %{_datadir}/license/%{name}
135
136 %files devel
137 %defattr(-,root,root,-)
138 %{_libdir}/pkgconfig/*.pc
139 %{dev_include_path}/%{name}/public-api/*
140
141 %files integration-devel
142 %defattr(-,root,root,-)
143 %{_includedir}/%{name}/integration-api/*