Sync with the latest tizen 2.x
[apps/native/widget/widget.git] / packaging / libwidget.spec
1 %bcond_with wayland
2
3 Name: libwidget
4 Summary: Widget development library
5 Version: 1.3.0
6 Release: 1
7 Group: Applications/Core Applications
8 License: Flora-1.1
9 Source0: %{name}-%{version}.tar.gz
10 Source1001: %{name}.manifest
11 BuildRequires: cmake, gettext-tools, coreutils
12 BuildRequires: pkgconfig(dlog)
13 BuildRequires: pkgconfig(widget_service)
14 BuildRequires: pkgconfig(widget_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 "%{model_build_feature_widget}" == "0"
25 ExclusiveArch:
26 %endif
27
28 %description
29 Library for the development of a widget 
30
31 %package devel
32 Summary: Widget development library (dev)
33 Group: Development/Libraries
34 Requires: %{name} = %{version}-%{release}
35
36 %description devel
37 Header & Package configuration files for widget 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 %{name} -p /sbin/ldconfig
73 %postun -n %{name} -p /sbin/ldconfig
74
75 %files -n %{name}
76 %defattr(-,root,root,-)
77 %manifest %{name}.manifest
78 %{_libdir}/libwidget.so*
79 %{_datarootdir}/license/libwidget
80
81 %files devel
82 %defattr(-,root,root,-)
83 %manifest %{name}.manifest
84 %{_includedir}/widget/widget.h
85 %{_includedir}/widget/widget_internal.h
86 %{_libdir}/pkgconfig/widget.pc
87
88 # End of a file