Update spec
[platform/framework/web/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.30.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(libtzplatform-config)
21 BuildRequires: pkgconfig(vconf)
22 Requires:      libtzplatform-config
23
24 %if %{with wayland}
25 %else
26 BuildRequires: pkgconfig(x11)
27 BuildRequires: pkgconfig(xext)
28 %endif
29
30 %description
31 API for creating a new instance of the livebox and managing its life-cycle.
32
33 %package devel
34 Summary: Livebox viewer development library (dev)
35 Group: Development/Libraries
36 Requires: %{name} = %{version}-%{release}
37
38 %description devel
39 Header and package configuration files for the livebox viewer development library (dev)
40
41 %prep
42 %setup -q
43 cp %{SOURCE1001} .
44
45 %build
46 %if 0%{?sec_build_binary_debug_enable}
47 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
48 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
49 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
50 %endif
51
52 %if 0%{?tizen_build_binary_release_type_eng}
53 export CFLAGS="${CFLAGS} -DTIZEN_ENGINEER_MODE"
54 export CXXFLAGS="${CXXFLAGS} -DTIZEN_ENGINEER_MODE"
55 export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE"
56 %endif
57
58 %if %{with wayland}
59 export WAYLAND_SUPPORT=On
60 export X11_SUPPORT=Off
61 %else
62 export WAYLAND_SUPPORT=Off
63 export X11_SUPPORT=On
64 %endif
65
66 %cmake . -DWAYLAND_SUPPORT=${WAYLAND_SUPPORT} -DX11_SUPPORT=${X11_SUPPORT}
67 make %{?jobs:-j%jobs}
68
69 %install
70 rm -rf %{buildroot}
71 %make_install
72 mkdir -p %{buildroot}/%{_datarootdir}/license
73
74 %post -n liblivebox-viewer -p /usr/sbin/ldconfig
75 %postun -n liblivebox-viewer -p /usr/sbin/ldconfig
76
77 %files -n liblivebox-viewer
78 %manifest %{name}.manifest
79 %defattr(-,root,root,-)
80 %{_libdir}/*.so*
81 %{_datarootdir}/license/*
82
83 %files devel
84 %manifest %{name}.manifest
85 %defattr(-,root,root,-)
86 %{_includedir}/livebox-viewer/livebox.h
87 %{_libdir}/pkgconfig/*.pc
88
89 # End of a file