From 340f4d63343ba6d91f31225f0b1dd053a9b8f73e Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 5 Feb 2013 06:44:33 -0800 Subject: [PATCH] Fixe build on x86_64 and cleanup spec Change-Id: I5adffa0738a114bebc11f46a82833e0ca7b95270 --- CMakeLists.txt | 5 ++--- packaging/librua.spec | 26 +++++++------------------- rua.pc.in | 2 +- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01055ed..860fcad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,6 @@ PROJECT(rua C) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "\${prefix}") -SET(LIBDIR "\${prefix}/lib") SET(INCLUDEDIR "\${prefix}/include/${PROJECT_NAME}") SET(VERSION 0.1.0) @@ -37,8 +36,8 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS}) CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) #CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc @ONLY) -INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib COMPONENT RuntimeLibraries) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig) +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/rua.h DESTINATION include/${PROJECT_NAME}) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/rua_db.sql DESTINATION /opt/share/) diff --git a/packaging/librua.spec b/packaging/librua.spec index ae7f5d2..77cb669 100644 --- a/packaging/librua.spec +++ b/packaging/librua.spec @@ -1,10 +1,9 @@ - Name: librua Summary: Recently used application Version: 0.1.0 Release: 34 -Group: System/Libraries -License: Apache License, Version 2.0 +Group: Application Framework/Libraries +License: Apache-2.0 Source0: librua-%{version}.tar.gz Requires(post): /sbin/ldconfig Requires(post): /usr/bin/sqlite3 @@ -13,12 +12,9 @@ BuildRequires: cmake BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(db-util) - %description Recently used application library - - %package devel Summary: Recently used application (devel) Group: Development/Libraries @@ -27,19 +23,15 @@ Requires: %{name} = %{version}-%{release} %description devel Recently used application library (devel) - %prep -%setup -q -n %{name}-%{version} - +%setup -q %build -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} - +%cmake . make %{?jobs:-j%jobs} %install -rm -rf %{buildroot} %make_install %post @@ -56,19 +48,15 @@ chsmack -a rua::db /opt/dbspace/.rua.db-journal %postun -p /sbin/ldconfig - - %files %manifest librua.manifest %defattr(-,root,root,-) %config(missingok) /opt/share/rua_db.sql -/usr/lib/librua.so.* - - +%{_libdir}/librua.so.* %files devel %defattr(-,root,root,-) /usr/include/rua/*.h -/usr/lib/librua.so -/usr/lib/pkgconfig/rua.pc +%{_libdir}/librua.so +%{_libdir}/pkgconfig/rua.pc diff --git a/rua.pc.in b/rua.pc.in index 08e4410..55aeb04 100644 --- a/rua.pc.in +++ b/rua.pc.in @@ -1,6 +1,6 @@ prefix=@PREFIX@ exec_prefix=@EXEC_PREFIX@ -libdir=@LIBDIR@ +libdir=@LIB_INSTALL_DIR@ includedir=@INCLUDEDIR@ Name: rua -- 2.7.4