DALi Version 1.4.41
[platform/core/uifw/dali-core.git] / packaging / dali.spec
1 Name:       dali
2 Summary:    DALi 3D Engine
3 Version:    1.4.41
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache-2.0 and BSD-3-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:  cmake
13 BuildRequires:  pkgconfig
14 BuildRequires:  gawk
15
16 %if 0%{?tizen_version_major} >= 3
17 BuildRequires:  pkgconfig(libtzplatform-config)
18 %endif
19
20 %description
21 DALi 3D Engine
22
23 ##############################
24 # devel
25 ##############################
26 %package devel
27 Summary:    Development components for DALi 3D Engine
28 Group:      Development/Building
29 Requires:   %{name} = %{version}-%{release}
30 Requires:   %{name}-integration-devel = %{version}-%{release}
31
32 %description devel
33 Development components for DALi 3D Engine - public headers and package config
34
35 ##############################
36 # integration-devel
37 ##############################
38 %package integration-devel
39 Summary:    Integration development package for DALi 3D Engine
40 Group:      Development/Building
41 Requires:   %{name} = %{version}-%{release}
42
43 %description integration-devel
44 Integration development package for DALi 3D Engine - headers for integrating with an adaptor/platform abstraction library.
45
46 ##############################
47 # Preparation
48 ##############################
49 %prep
50 %setup -q
51
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 -Wl,-Bsymbolic-functions "
61
62 %ifarch %{arm}
63 CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
64 %endif
65
66 %if 0%{?enable_coverage}
67 CXXFLAGS+=" --coverage "
68 LDFLAGS+=" --coverage "
69 %endif
70
71 libtoolize --force
72 cd %{_builddir}/%{name}-%{version}/build/tizen
73
74 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS;
75 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS;
76 LDFLAGS="${LDFLAGS:-%optflags}" ; export LDFLAGS;
77
78 cmake \
79 %if 0%{?enable_debug}
80       -DCMAKE_BUILD_TYPE=Debug \
81 %endif
82 %if 0%{?enable_trace}
83       -DENABLE_TRACE=ON \
84 %endif
85       -DCMAKE_INSTALL_PREFIX=%{_prefix} \
86       -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
87       -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}
88
89 make %{?jobs:-j%jobs}
90
91 ##############################
92 # Installation
93 ##############################
94 %install
95 rm -rf %{buildroot}
96 cd build/tizen
97
98 pushd %{_builddir}/%{name}-%{version}/build/tizen
99 %make_install
100
101 # Create links to ensure linking with cxx11 library is preserved
102 pushd  %{buildroot}%{_libdir}
103 ln -sf libdali-core.so libdali-core-cxx11.so
104 ln -sf libdali-core.so libdali-core-cxx11.so.0
105 ln -sf libdali-core.so libdali-core-cxx11.so.0.0.0
106 popd
107
108 ##############################
109 # Post Install
110 ##############################
111 %post
112 /sbin/ldconfig
113 exit 0
114
115 ##############################
116 # Post Uninstall
117 ##############################
118 %postun
119 /sbin/ldconfig
120 exit 0
121
122 ##############################
123 # Files in Binary Packages
124 ##############################
125
126 %files
127 %if 0%{?enable_dali_smack_rules}
128 %manifest dali.manifest-smack
129 %else
130 %manifest dali.manifest
131 %endif
132 %defattr(-,root,root,-)
133 %{_libdir}/libdali-core-cxx11.so*
134 %{_libdir}/libdali-core.so*
135 %license LICENSE
136
137 %files devel
138 %defattr(-,root,root,-)
139 %{_libdir}/pkgconfig/dali-core.pc
140 %{dev_include_path}/dali/public-api/*
141 %{dev_include_path}/dali/devel-api/*
142 %{dev_include_path}/dali/doc/*
143
144 %files integration-devel
145 %defattr(-,root,root,-)
146 %{_includedir}/dali/integration-api/*