Merge branch 'devel/home/master'
[apps/native/widget/widget.git] / packaging / liblivebox.spec
1 %bcond_with wayland
2
3 Name: liblivebox
4 Summary: Livebox development library
5 Version: 0.8.5
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 %{with wayland}
57 export WAYLAND_SUPPORT=On
58 export X11_SUPPORT=Off
59 %else
60 export WAYLAND_SUPPORT=Off
61 export X11_SUPPORT=On
62 %endif
63
64 %cmake . -DWAYLAND_SUPPORT=${WAYLAND_SUPPORT} -DX11_SUPPORT=${X11_SUPPORT}
65 make %{?jobs:-j%jobs}
66
67 %install
68 rm -rf %{buildroot}
69 %make_install
70 mkdir -p %{buildroot}/%{_datarootdir}/license
71
72 %post -n liblivebox -p /sbin/ldconfig
73 %postun -n liblivebox -p /sbin/ldconfig
74
75 %files -n liblivebox
76 %manifest %{name}.manifest
77 %defattr(-,root,root,-)
78 %{_libdir}/*.so*
79 %{_datarootdir}/license/*
80
81 %files devel
82 %manifest %{name}.manifest
83 %defattr(-,root,root,-)
84 %{_includedir}/livebox/livebox.h
85 %{_libdir}/pkgconfig/*.pc
86
87 # End of a file