do not hardcode library path
authorAnas Nashif <anas.nashif@intel.com>
Fri, 17 May 2013 04:29:04 +0000 (00:29 -0400)
committerAnas Nashif <anas.nashif@intel.com>
Fri, 17 May 2013 04:29:04 +0000 (00:29 -0400)
CMakeLists.txt
capi-location-geocoder.pc.in
packaging/capi-location-geocoder.spec

index af76580..7edc237 100755 (executable)
@@ -29,7 +29,6 @@ ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DEXPORT_API=__attribute__((visibility(\"default\")))")
 ADD_DEFINITIONS("-DTIZEN_DEBUG")
 
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
 
 aux_source_directory(src SOURCES)
 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
@@ -43,7 +42,7 @@ SET_TARGET_PROPERTIES(${fw_name}
 
 TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
 
-INSTALL(TARGETS ${fw_name} DESTINATION lib)
+INSTALL(TARGETS ${fw_name} DESTINATION %{LIB_INSTALL_DIR})
 INSTALL(
         DIRECTORY ${INC_DIR}/ DESTINATION include/location
         FILES_MATCHING
@@ -61,7 +60,7 @@ CONFIGURE_FILE(
     ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
     @ONLY
 )
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION %{LIB_INSTALL_DIR}/pkgconfig)
 
 ADD_SUBDIRECTORY(test)
 
index 150e613..241551f 100644 (file)
@@ -3,7 +3,7 @@
 
 prefix=@PREFIX@
 exec_prefix=/usr
-libdir=/usr/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=/usr/include/location
 
 Name: @PC_NAME@
index 30cb36c..b71bbb4 100755 (executable)
@@ -3,25 +3,24 @@ Summary:    A Geocoder library in Tizen Native API
 Version:    0.1.2
 Release:    1
 Group:      System/Libraries
-License:    Apache License, Version 2.0
+License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(location)
 BuildRequires:  pkgconfig(capi-base-common)
-Requires(post): /sbin/ldconfig  
-Requires(postun): /sbin/ldconfig
 
 %description
+A Geocoder library in Tizen Native API.
 
 
 %package devel
 Summary:  A Geocoder library in Tizen Native API (Development)
-Group:    TO_BE/FILLED_IN
-Requires: %{name} = %{version}-%{release}
+Group:    Development/Libraries
+Requires: %{name} = %{version}
 
 %description devel
-
+A Geocoder library in Tizen Native API (Development).
 
 
 %prep
@@ -31,12 +30,9 @@ Requires: %{name} = %{version}-%{release}
 %build
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
-
-
 make %{?jobs:-j%jobs}
 
 %install
-rm -rf %{buildroot}
 %make_install
 
 %post -p /sbin/ldconfig
@@ -45,6 +41,7 @@ rm -rf %{buildroot}
 
 
 %files
+%license LICENSE
 %manifest capi-location-geocoder.manifest
 %{_libdir}/libcapi-location-geocoder.so*