019ea4bc61a90ee492249e445f25db2cb3dfba43
[platform/core/uifw/dali-core.git] / packaging / dali.spec
1 Name:       dali2
2 Summary:    DALi 3D Engine
3 Version:    2.2.19
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       -DENABLE_TRACE=ON \
83       -DENABLE_BACKTRACE=ON \
84       -DCMAKE_INSTALL_PREFIX=%{_prefix} \
85       -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
86       -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}
87
88 make %{?jobs:-j%jobs}
89
90 ##############################
91 # Installation
92 ##############################
93 %install
94 rm -rf %{buildroot}
95 cd build/tizen
96
97 pushd %{_builddir}/%{name}-%{version}/build/tizen
98 %make_install
99
100 ##############################
101 # Post Install
102 ##############################
103 %post
104 /sbin/ldconfig
105 exit 0
106
107 ##############################
108 # Post Uninstall
109 ##############################
110 %postun
111 /sbin/ldconfig
112 exit 0
113
114 ##############################
115 # Files in Binary Packages
116 ##############################
117
118 %files
119 %if 0%{?enable_dali_smack_rules}
120 %manifest dali.manifest-smack
121 %else
122 %manifest dali.manifest
123 %endif
124 %defattr(-,root,root,-)
125 %{_libdir}/libdali2-core.so*
126 %license LICENSE
127
128 %files devel
129 %defattr(-,root,root,-)
130 %{_libdir}/pkgconfig/dali2-core.pc
131 %{dev_include_path}/dali/public-api/*
132 %{dev_include_path}/dali/devel-api/*
133 %{dev_include_path}/dali/doc/*
134
135 %files integration-devel
136 %defattr(-,root,root,-)
137 %{_includedir}/dali/integration-api/*
138 %{_includedir}/dali/graphics-api/*