Install libs in %_libdir and cleanup spec
authorAnas Nashif <anas.nashif@intel.com>
Wed, 30 Jan 2013 04:47:06 +0000 (20:47 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Thu, 4 Apr 2013 20:01:17 +0000 (13:01 -0700)
Change-Id: I9c7dfb5792537a6be728f810b8e8ceaa4ad69e8f

CMakeLists.txt
packaging/heynoti.spec

index db58bb8..5de2f29 100755 (executable)
@@ -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)
index 6e208a7..56295d1 100644 (file)
@@ -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