Name: capi-network-wifi-direct
Summary: Network WiFi-Direct library in Tizen CAPI
-Version: 1.2.33
+Version: 1.2.34
Release: 1
Group: Network & Connectivity/Wireless
License: Apache-2.0
%description devel
wifi direct library (Shared Library) (Development)
-%description
-
-%package -n test-wifi-direct
-Summary: Test Application for Wi-Fi Direct
-Group: TO_BE_FILLED
-Requires: %{name} = %{version}-%{release}
+#%description
+#
+#%package -n test-wifi-direct
+#Summary: Test Application for Wi-Fi Direct
+#Group: TO_BE_FILLED
+#Requires: %{name} = %{version}-%{release}
-%description -n test-wifi-direct
-Test Application for Wi-Fi Direct
+#%description -n test-wifi-direct
+#Test Application for Wi-Fi Direct
%prep
%setup -q
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+
+
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if "%{?tizen_profile_name}" == "wearable"
-DTIZEN_FEATURE_SERVICE_DISCOVERY=0 \
%endif
%endif
%endif
- .
-
+ . -DVERSION=%{version} -DMAJORVERSION=${MAJORVER} -DCMAKE_LIB_DIR=%{_libdir}
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
%files
%manifest capi-network-wifi-direct.manifest
%defattr(-,root,root,-)
-%{_libdir}/libwifi-direct.so
-%{_libdir}/libwifi-direct.so.0
-%{_libdir}/libwifi-direct.so.0.0
+%{_libdir}/libwifi-direct.so*
/usr/share/license/%{name}
%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/capi-network-wifi-direct.pc
%{_includedir}/wifi-direct/wifi-direct.h
+%{_libdir}/libwifi-direct.so
-%files -n test-wifi-direct
-%manifest test-wifi-direct.manifest
-%defattr(4755,app,app,4755)
-%{_bindir}/test-wifi-direct
+#%files -n test-wifi-direct
+#%manifest test-wifi-direct.manifest
+#%defattr(4755,app,app,4755)
+#%{_bindir}/test-wifi-direct
PROJECT(wifi-direct C)
# Global setting
-SET(VERSION 0.0)
+#SET(VERSION 0.0)
MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_value)
GET_TARGET_PROPERTY (${_variable} ${_target} ${_property})
FILE(APPEND ${_laname} "dlpreopen='${_target_dlpreopen}'\n\n")
FILE(APPEND ${_laname} "# Directory that this library needs to be installed in:\n")
FILE(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}${_install_DIR}'\n")
- INSTALL( FILES ${_laname} DESTINATION ${CMAKE_INSTALL_PREFIX}${_install_DIR})
+ INSTALL( FILES ${_laname} DESTINATION ${_install_DIR})
ENDMACRO(CREATE_LIBTOOL_FILE)
# Build type : Release
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
+SET(LIBDIR ${CMAKE_LIB_DIR})
+
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/src/include)
ENDIF(TIZEN_TV)
# Linker flags
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed, --rpath=${LIBDIR}")
# Build
SET(SRCS
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION} SOVERSION 0)
-CREATE_LIBTOOL_FILE(${PROJECT_NAME} /lib)
+SET_TARGET_PROPERTIES(${PROJECT_NAME}
+ PROPERTIES
+ VERSION ${VERSION}
+ SOVERSION ${MAJORVERSION}
+ CLEAN_DIRECT_OUTPUT 1
+)
+CREATE_LIBTOOL_FILE(${PROJECT_NAME} ${LIBDIR})
# pkgconfig file
CONFIGURE_FILE(capi-network-wifi-direct.pc.in capi-network-wifi-direct.pc @ONLY)
# Install
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib COMPONENT Runtime)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR} COMPONENT Runtime)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/wifi-direct.h DESTINATION include/wifi-direct)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/capi-network-wifi-direct.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/capi-network-wifi-direct.pc DESTINATION ${LIBDIR}/pkgconfig)