tizen 2.3 release
[apps/livebox/livebox-viewer.git] / packaging / libdynamicbox_viewer.spec
1 %bcond_with wayland
2
3 Name: libdynamicbox_viewer
4 Summary: Library for developing the application
5 Version: 1.0.0
6 Release: 1
7 Group: HomeTF/DynamicBox
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(dynamicbox_service)
21 BuildRequires: pkgconfig(vconf)
22 BuildRequires: model-build-features
23
24 %if %{with wayland}
25 %else
26 BuildRequires: pkgconfig(x11)
27 BuildRequires: pkgconfig(xext)
28 %endif
29
30 %if "%{model_build_feature_livebox}" == "0"
31 ExclusiveArch:
32 %endif
33
34 %description
35 API for creating a new instance of the dynamicbox and managing its life-cycle.
36
37 %package devel
38 Summary: Development Library for Dynamic Box Viewer Application (dev)
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
41
42 %description devel
43 Header and package configuration files for the dynamicbox viewer development
44
45 %prep
46 %setup -q
47 cp %{SOURCE1001} .
48
49 %build
50 %if 0%{?sec_build_binary_debug_enable}
51 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
52 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
53 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
54 %endif
55
56 %if 0%{?tizen_build_binary_release_type_eng}
57 export CFLAGS="${CFLAGS} -DTIZEN_ENGINEER_MODE"
58 export CXXFLAGS="${CXXFLAGS} -DTIZEN_ENGINEER_MODE"
59 export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE"
60 %endif
61
62 %if %{with wayland}
63 export WAYLAND_SUPPORT=On
64 export X11_SUPPORT=Off
65 %else
66 export WAYLAND_SUPPORT=Off
67 export X11_SUPPORT=On
68 %endif
69
70 %cmake . -DWAYLAND_SUPPORT=${WAYLAND_SUPPORT} -DX11_SUPPORT=${X11_SUPPORT} -DDYNAMICBOX_ENABLED=On
71 make %{?jobs:-j%jobs}
72
73 %install
74 rm -rf %{buildroot}
75 %make_install
76
77 %post -n %{name} -p /sbin/ldconfig
78 %postun -n %{name} -p /sbin/ldconfig
79
80 %files -n %{name}
81 %manifest %{name}.manifest
82 %defattr(-,root,root,-)
83 %{_libdir}/libdynamicbox_viewer.so*
84 %{_datarootdir}/license/libdynamicbox_viewer
85
86 %files devel
87 %manifest %{name}.manifest
88 %defattr(-,root,root,-)
89 %{_includedir}/dynamicbox_viewer/dynamicbox.h
90 %{_libdir}/pkgconfig/dynamicbox_viewer.pc
91
92 #################################################
93 # liblivebox-viewer (for old version)
94 %package -n liblivebox-viewer
95 Summary: Library for developing the dynamicbox viewer (old version)
96 Group: HomeTF/Dynamicbox
97 License: Flora
98 Requires: libdynamicbox_viewer
99
100 %description -n liblivebox-viewer
101 Provider APIs to develop the dynamicbox viewer applications. (old version)
102
103 %package -n liblivebox-viewer-devel
104 Summary: Header & package configuration files to support development of the dynamicbox viewer applications. (old version)
105 Group: Development/Libraries
106 Requires: liblivebox-viewer
107
108 %description -n liblivebox-viewer-devel
109 Dynamicbox provider application development library (dev) (old version)
110
111 %files -n liblivebox-viewer
112 %manifest %{name}.manifest
113 %defattr(-,root,root,-)
114 %{_libdir}/liblivebox-viewer.so*
115 %{_datarootdir}/license/liblivebox-viewer
116
117 %files -n liblivebox-viewer-devel
118 %manifest %{name}.manifest
119 %defattr(-,root,root,-)
120 %{_includedir}/livebox-viewer/livebox.h
121 %{_libdir}/pkgconfig/livebox-viewer.pc
122
123 # End of a file