Glue glue and more glue
[platform/core/uifw/dali-core.git] / packaging / dali.spec
1 Name:       dali
2 Summary:    The OpenGLES Canvas Core Library
3 Version:    1.0.32
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 -Wl,-Bsymbolic-functions "
61
62 %ifarch %{arm}
63 CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
64 %endif
65
66 libtoolize --force
67 cd %{_builddir}/%{name}-%{version}/build/tizen
68 autoreconf --install
69 DALI_DATA_RW_DIR="%{dali_data_rw_dir}"
70 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
71 export DALI_DATA_RW_DIR
72 export DALI_DATA_RO_DIR
73
74 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS;
75 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS;
76 LDFLAGS="${LDFLAGS:-%optflags}" ; export LDFLAGS;
77 ./configure \
78       --program-prefix=%{?_program_prefix} \
79       --prefix=%{_prefix} \
80       --exec-prefix=%{_exec_prefix} \
81       --bindir=%{_bindir} \
82       --sbindir=%{_sbindir} \
83       --sysconfdir=%{_sysconfdir} \
84       --datadir=%{_datadir} \
85       --includedir=%{_includedir} \
86       --libdir=%{_libdir} \
87       --libexecdir=%{_libexecdir} \
88       --localstatedir=%{_localstatedir} \
89       --sharedstatedir=%{_sharedstatedir} \
90       --mandir=%{_mandir} \
91       --infodir=%{_infodir}
92
93 make %{?jobs:-j%jobs}
94
95 ##############################
96 # Installation
97 ##############################
98 %install
99 rm -rf %{buildroot}
100 cd build/tizen
101 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
102
103 # LICENSE
104 mkdir -p %{buildroot}/usr/share/license
105 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
106
107
108 ##############################
109 # Post Install
110 ##############################
111 %post
112 /sbin/ldconfig
113 chown 5000:5000 %{shader_bin_dir}
114 rm -rf %{shader_bin_dir}/*
115 exit 0
116
117 ##############################
118 # Post Uninstall
119 ##############################
120 %postun
121 /sbin/ldconfig
122 rm -rf %{shader_bin_dir}
123 exit 0
124
125 ##############################
126 # Files in Binary Packages
127 ##############################
128
129 %files
130 %if 0%{?enable_dali_smack_rules}
131 %manifest dali.manifest-smack
132 %else
133 %manifest dali.manifest
134 %endif
135 %defattr(-,root,root,-)
136 %{_libdir}/lib%{name}-core.so*
137 %defattr(-,app,app,-)
138 %dir %{shader_bin_dir}
139 %{_datadir}/license/%{name}
140
141 %files devel
142 %defattr(-,root,root,-)
143 %{_libdir}/pkgconfig/*.pc
144 %{dev_include_path}/%{name}/public-api/*
145
146 %files integration-devel
147 %defattr(-,root,root,-)
148 %{_includedir}/%{name}/integration-api/*