Fix ug-setting-gallery-efl build into pure Wayland profile. 35/16535/2 accepted/tizen_3.0.2014.q3_common accepted/tizen_common accepted/tizen_generic accepted/tizen_ivi_panda tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/generic/20140408.105322 accepted/tizen/ivi/20140409.182421 accepted/tizen/ivi/panda/20140408.203109 submit/tizen/20140408.105302 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
authorRonan Le Martret <ronan@fridu.net>
Tue, 18 Feb 2014 12:00:23 +0000 (13:00 +0100)
committerRonan Le Martret <ronan@fridu.net>
Tue, 18 Feb 2014 12:07:08 +0000 (13:07 +0100)
Change-Id: Id093adf907f4e8301391fd41c22c359167845250
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
CMakeLists.txt
packaging/ug-setting-gallery-efl.spec

index 84c7570..e0cb8dc 100755 (executable)
@@ -33,6 +33,10 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CXXFLAGS}")
 
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 
+IF(WAYLAND_SUPPORT)
+    ADD_DEFINITIONS("-DWAYLAND")
+ENDIF(WAYLAND_SUPPORT)
+
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
index 2fb2528..5556da7 100755 (executable)
@@ -1,3 +1,5 @@
+%bcond_with wayland
+
 Name:       ug-setting-gallery-efl
 Summary:    UG setting gallery ELF
 Version:    1.0.43
@@ -35,17 +37,23 @@ cp %{SOURCE1001} .
 
 export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
 
-LDFLAGS="$LDFLAGS" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCH=%{ARCH}
+LDFLAGS="$LDFLAGS" %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCH=%{ARCH} \
+%if %{with wayland}
+         -DWAYLAND_SUPPORT=On
+%else
+         -DWAYLAND_SUPPORT=Off
+%endif
+
 
 make %{?jobs:-j%jobs}
 
 %install
 %make_install
-mkdir -p %{buildroot}/usr/share/license
+mkdir -p %{buildroot}%{_datarootdir}/license
 
 %post
 /sbin/ldconfig
-export LD_LIBRARY_PATH=/usr/lib/ug:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH=%{_prefix}/lib/ug:$LD_LIBRARY_PATH
 
 /usr/bin/vconftool set -t double db/gallery/setting/interval_time 3.0 -g 6514
 /usr/bin/vconftool set -t bool db/gallery/setting/repeat_state 0 -g 6514
@@ -57,7 +65,7 @@ export LD_LIBRARY_PATH=/usr/lib/ug:$LD_LIBRARY_PATH
 %files
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-/usr/ug/lib/*
-/usr/ug/res/*
-/usr/share/license/%{name}
+%{_prefix}/ug/lib/*
+%{_prefix}/ug/res/*
+%license %{_datarootdir}/license/%{name}