Initialize Tizen 2.3
[apps/native/widget/widget.git] / packaging / liblivebox.spec
1 %bcond_with wayland
2
3 Name: liblivebox
4 Summary: Livebox development library
5 Version: 0.7.4
6 Release: 1
7 Group: HomeTF/Livebox
8 License: Flora
9 Source0: %{name}-%{version}.tar.gz
10 Source1001: %{name}.manifest
11 BuildRequires: cmake, gettext-tools, coreutils
12 BuildRequires: pkgconfig(dlog)
13 BuildRequires: pkgconfig(livebox-service)
14 BuildRequires: pkgconfig(provider)
15 BuildRequires: pkgconfig(ecore)
16 BuildRequires: pkgconfig(evas)
17 BuildRequires: pkgconfig(elementary)
18
19 %if %{with wayland}
20 %else
21 BuildRequires: pkgconfig(x11)
22 %endif
23
24 %if "%{sec_product_feature_livebox}" == "0"
25 ExclusiveArch:
26 %endif
27
28 %description
29 Library for the development of a livebox
30
31 %package devel
32 Summary: Livebox development library (dev)
33 Group: Development/Libraries
34 Requires: %{name} = %{version}-%{release}
35
36 %description devel
37 Header & Package configuration files for livebox development
38
39 %prep
40 %setup -q
41 cp %{SOURCE1001} .
42
43 %build
44 %if 0%{?sec_build_binary_debug_enable}
45 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
46 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
47 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
48 %endif
49
50 %if 0%{?tizen_build_binary_release_type_eng}
51 export CFLAGS="${CFLAGS} -DTIZEN_ENGINEER_MODE"
52 export CXXFLAGS="${CXXFLAGS} -DTIZEN_ENGINEER_MODE"
53 export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE"
54 %endif
55
56 %if "%{_repository}" == "wearable"
57 export WEARABLE=On
58 export MOBILE=Off
59 %elseif "%{_repository}" == "mobile"
60 export WEARABLE=Off
61 export MOBILE=On
62 %endif
63
64 %if %{with wayland}
65 export WAYLAND_SUPPORT=On
66 export X11_SUPPORT=Off
67 %else
68 export WAYLAND_SUPPORT=Off
69 export X11_SUPPORT=On
70 %endif
71
72 %cmake . -DWAYLAND_SUPPORT=${WAYLAND_SUPPORT} -DX11_SUPPORT=${X11_SUPPORT} -DMOBILE=${MOBILE} -DWEARABLE=${WEARABLE}
73 make %{?jobs:-j%jobs}
74
75 %install
76 rm -rf %{buildroot}
77 %make_install
78 mkdir -p %{buildroot}/%{_datarootdir}/license
79
80 %post -n liblivebox -p /sbin/ldconfig
81 %postun -n liblivebox -p /sbin/ldconfig
82
83 %files -n liblivebox
84 %manifest %{name}.manifest
85 %defattr(-,root,root,-)
86 %{_libdir}/*.so*
87 %{_datarootdir}/license/*
88
89 %files devel
90 %manifest %{name}.manifest
91 %defattr(-,root,root,-)
92 %{_includedir}/livebox/livebox.h
93 %{_libdir}/pkgconfig/*.pc
94
95 # End of a file