Initialize Tizen 2.3
[apps/livebox/livebox-viewer.git] / packaging / liblivebox-viewer.spec
1 %bcond_with wayland
2
3 Name: liblivebox-viewer
4 Summary: Library for developing the application
5 Version: 0.31.0
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(aul)
14 BuildRequires: pkgconfig(glib-2.0)
15 BuildRequires: pkgconfig(gio-2.0)
16 BuildRequires: pkgconfig(com-core)
17 BuildRequires: pkgconfig(sqlite3)
18 BuildRequires: pkgconfig(db-util)
19 BuildRequires: pkgconfig(livebox-service)
20 BuildRequires: pkgconfig(vconf)
21
22 %if %{with wayland}
23 %else
24 BuildRequires: pkgconfig(x11)
25 BuildRequires: pkgconfig(xext)
26 %endif
27
28 %if "%{sec_product_feature_livebox}" == "0"
29 ExclusiveArch:
30 %endif
31
32 %description
33 API for creating a new instance of the livebox and managing its life-cycle.
34
35 %package devel
36 Summary: Livebox viewer development library (dev)
37 Group: Development/Libraries
38 Requires: %{name} = %{version}-%{release}
39
40 %description devel
41 Header and package configuration files for the livebox viewer development
42
43 %prep
44 %setup -q
45 cp %{SOURCE1001} .
46
47 %build
48 %if 0%{?sec_build_binary_debug_enable}
49 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
50 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
51 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
52 %endif
53
54 %if 0%{?tizen_build_binary_release_type_eng}
55 export CFLAGS="${CFLAGS} -DTIZEN_ENGINEER_MODE"
56 export CXXFLAGS="${CXXFLAGS} -DTIZEN_ENGINEER_MODE"
57 export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE"
58 %endif
59
60 %if %{with wayland}
61 export WAYLAND_SUPPORT=On
62 export X11_SUPPORT=Off
63 %else
64 export WAYLAND_SUPPORT=Off
65 export X11_SUPPORT=On
66 %endif
67
68 %cmake . -DWAYLAND_SUPPORT=${WAYLAND_SUPPORT} -DX11_SUPPORT=${X11_SUPPORT}
69 make %{?jobs:-j%jobs}
70
71 %install
72 rm -rf %{buildroot}
73 %make_install
74 mkdir -p %{buildroot}/%{_datarootdir}/license
75
76 %post -n liblivebox-viewer -p /sbin/ldconfig
77 %postun -n liblivebox-viewer -p /sbin/ldconfig
78
79 %files -n liblivebox-viewer
80 %manifest %{name}.manifest
81 %defattr(-,root,root,-)
82 %{_libdir}/*.so*
83 %{_datarootdir}/license/*
84
85 %files devel
86 %manifest %{name}.manifest
87 %defattr(-,root,root,-)
88 %{_includedir}/livebox-viewer/livebox.h
89 %{_libdir}/pkgconfig/*.pc
90
91 # End of a file