From ee0da99f3cca15da4aca702caa46674bb9246b5e Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 29 Jan 2013 20:47:06 -0800 Subject: [PATCH] Install libs in %_libdir and cleanup spec Change-Id: I9c7dfb5792537a6be728f810b8e8ceaa4ad69e8f --- CMakeLists.txt | 4 ++-- packaging/heynoti.spec | 44 ++++++++++++++++++-------------------------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db58bb8..5de2f29 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,8 +56,8 @@ CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) #CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc @ONLY) SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_NAME}.pc") -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) FOREACH(hfile ${HEADERS}) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${hfile} DESTINATION include/${PROJECT_NAME}) ENDFOREACH(hfile) diff --git a/packaging/heynoti.spec b/packaging/heynoti.spec index 6e208a7..56295d1 100644 --- a/packaging/heynoti.spec +++ b/packaging/heynoti.spec @@ -1,55 +1,46 @@ +# -Name: heynoti -Summary: HEY (ligHt Easy speedy) notification library -Version: 0.0.2 -Release: 39 -Group: System/Libraries -License: Apache License, Version 2.0 -Source0: %{name}-%{version}.tar.gz - -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig +Name: heynoti +Version: 0.0.2 +Release: 39 +License: Apache License, Version 2.0 +Summary: HEY (ligHt Easy speedy) notification library +Group: System/Libraries +Source0: %{name}-%{version}.tar.gz BuildRequires: cmake - BuildRequires: pkgconfig(dlog) -BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(ecore) - +BuildRequires: pkgconfig(glib-2.0) %description lightweight notification library, service APIs - %package devel -Summary: Notification library -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: heynoti +Summary: Notification library +Group: Development/Libraries +Requires: %{name} = %{version} +Requires: heynoti %description devel heynoti API (devel) - %prep %setup -q %build -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE="Debug" +%cmake . -DCMAKE_BUILD_TYPE="Debug" -make %{?jobs:-j%jobs} +make %{?_smp_mflags} %install -rm -rf %{buildroot} %make_install +mkdir -p %{buildroot}/opt/share/noti -%post -/sbin/ldconfig -mkdir -p /opt/share/noti -chmod 1755 /opt/share/noti +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -60,6 +51,7 @@ chmod 1755 /opt/share/noti %{_libdir}/libheynoti.so.0 %{_libdir}/libheynoti.so.0.0.2 %{_bindir}/heynotitool +%attr(1755,root,root) /opt/share/noti %files devel -- 2.7.4