Update spec
[platform/framework/web/livebox-viewer.git] / packaging / liblivebox-viewer.spec
index 7926769..913c788 100644 (file)
@@ -1,6 +1,8 @@
+%bcond_with wayland
+
 Name: liblivebox-viewer
 Summary: Library for developing the application
-Version: 0.20.3
+Version: 0.30.0
 Release: 1
 Group: HomeTF/Livebox
 License: Flora
@@ -12,23 +14,29 @@ BuildRequires: pkgconfig(aul)
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(gio-2.0)
 BuildRequires: pkgconfig(com-core)
-BuildRequires: pkgconfig(x11)
-BuildRequires: pkgconfig(xext)
 BuildRequires: pkgconfig(sqlite3)
 BuildRequires: pkgconfig(db-util)
 BuildRequires: pkgconfig(livebox-service)
+BuildRequires: pkgconfig(libtzplatform-config)
 BuildRequires: pkgconfig(vconf)
+Requires:      libtzplatform-config
+
+%if %{with wayland}
+%else
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(xext)
+%endif
 
 %description
 API for creating a new instance of the livebox and managing its life-cycle.
 
 %package devel
-Summary: Header and package configuration files for the livebox viewer development
+Summary: Livebox viewer development library (dev)
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 
 %description devel
-Livebox viewer development library (dev)
+Header and package configuration files for the livebox viewer development library (dev)
 
 %prep
 %setup -q
@@ -46,7 +54,16 @@ export CFLAGS="${CFLAGS} -DTIZEN_ENGINEER_MODE"
 export CXXFLAGS="${CXXFLAGS} -DTIZEN_ENGINEER_MODE"
 export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE"
 %endif
-%cmake .
+
+%if %{with wayland}
+export WAYLAND_SUPPORT=On
+export X11_SUPPORT=Off
+%else
+export WAYLAND_SUPPORT=Off
+export X11_SUPPORT=On
+%endif
+
+%cmake . -DWAYLAND_SUPPORT=${WAYLAND_SUPPORT} -DX11_SUPPORT=${X11_SUPPORT}
 make %{?jobs:-j%jobs}
 
 %install
@@ -54,7 +71,8 @@ rm -rf %{buildroot}
 %make_install
 mkdir -p %{buildroot}/%{_datarootdir}/license
 
-%post
+%post -n liblivebox-viewer -p /usr/sbin/ldconfig
+%postun -n liblivebox-viewer -p /usr/sbin/ldconfig
 
 %files -n liblivebox-viewer
 %manifest %{name}.manifest