a3f82bc5012bd04af8cde64987630a57157818a0
[platform/core/uifw/dali-core.git] / packaging / dali.spec
1 Name:       dali2
2 Summary:    DALi 3D Engine
3 Version:    1.9.31
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 ##############################
102 # Post Install
103 ##############################
104 %post
105 /sbin/ldconfig
106 exit 0
107
108 ##############################
109 # Post Uninstall
110 ##############################
111 %postun
112 /sbin/ldconfig
113 exit 0
114
115 ##############################
116 # Files in Binary Packages
117 ##############################
118
119 %files
120 %if 0%{?enable_dali_smack_rules}
121 %manifest dali.manifest-smack
122 %else
123 %manifest dali.manifest
124 %endif
125 %defattr(-,root,root,-)
126 %{_libdir}/libdali2-core.so*
127 %license LICENSE
128
129 %files devel
130 %defattr(-,root,root,-)
131 %{_libdir}/pkgconfig/dali2-core.pc
132 %{dev_include_path}/dali/public-api/*
133 %{dev_include_path}/dali/devel-api/*
134 %{dev_include_path}/dali/doc/*
135
136 %files integration-devel
137 %defattr(-,root,root,-)
138 %{_includedir}/dali/integration-api/*