summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-02-05 06:44:33 -0800
committerJunfeng Dong <junfeng.dong@intel.com>2013-04-11 16:22:47 +0800
commit340f4d63343ba6d91f31225f0b1dd053a9b8f73e (patch)
tree7d9d8a17bf3235cdac969ce1c7d7f8b71267bab5
parente9126525cf9c5dcd1234dedb28dea9ef4d06a2a0 (diff)
downloadlibrua-340f4d63343ba6d91f31225f0b1dd053a9b8f73e.tar.gz
librua-340f4d63343ba6d91f31225f0b1dd053a9b8f73e.tar.bz2
librua-340f4d63343ba6d91f31225f0b1dd053a9b8f73e.zip
Change-Id: I5adffa0738a114bebc11f46a82833e0ca7b95270
-rw-r--r--CMakeLists.txt5
-rw-r--r--packaging/librua.spec26
-rw-r--r--rua.pc.in2
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