From 8fa619eba1c07e82e34f50ec27fb7a2094b1bd46 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Wed, 6 Mar 2013 16:36:20 +0100 Subject: [PATCH] Fix x86_64 build - Fixed hardcoded library install path : Spec File, *CMakeLists.txt, *.pc.in - Use %cmake macro to set default paths : Spec file - Rename pkgmgr-info.manifest in pkgmgr-info.manifest.in (Fix hardcoded library path) - Rename pkgmgr-parser.manifest in pkgmgr-parser.manifest.in (Fix hardcoded library path) Change-Id: I54e79a1b11fe74ce3d164b7771ac3a58eb92245c Signed-off-by: Anas Nashif --- CMakeLists.txt | 8 +++--- packaging/pkgmgr-info.spec | 36 +++++-------------------- parser/CMakeLists.txt | 4 +-- parser/pkgmgr-parser.pc.in | 2 +- pkgmgr-info.manifest => pkgmgr-info.manifest.in | 2 +- pkgmgr-info.pc.in | 2 +- pkgmgr-parser.manifest | 13 --------- pkgmgr-parser.manifest.in | 13 +++++++++ 8 files changed, 28 insertions(+), 52 deletions(-) rename pkgmgr-info.manifest => pkgmgr-info.manifest.in (68%) delete mode 100755 pkgmgr-parser.manifest create mode 100755 pkgmgr-parser.manifest.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e604a4..33841ef 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,6 @@ SET(VERSION_MAJOR 0) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "\${prefix}") -SET(LIBDIR "\${prefix}/lib") SET(INCLUDEDIR "\${prefix}/include") set(CMAKE_SKIP_BUILD_RPATH true) @@ -55,8 +54,9 @@ TARGET_LINK_LIBRARIES(pkgmgr-info pkgmgr_parser ${libpkgs_LDFLAGS}) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/pkgmgr-info.pc.in ${CMAKE_BINARY_DIR}/pkgmgr-info.pc @ONLY) configure_file(parser_path.conf.in parser_path.conf @ONLY) - -INSTALL(TARGETS pkgmgr-info DESTINATION lib COMPONENT RuntimeLibraries) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr-info.pc DESTINATION lib/pkgconfig) +configure_file(pkgmgr-info.manifest.in pkgmgr-info.manifest @ONLY) +configure_file(pkgmgr-parser.manifest.in pkgmgr-parser.manifest @ONLY) +INSTALL(TARGETS pkgmgr-info DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr-info.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/pkgmgr-info.h DESTINATION include) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/parser_path.conf DESTINATION ${PREFIX}/etc/package-manager/) diff --git a/packaging/pkgmgr-info.spec b/packaging/pkgmgr-info.spec index 3ab9221..bbcc495 100755 --- a/packaging/pkgmgr-info.spec +++ b/packaging/pkgmgr-info.spec @@ -2,8 +2,8 @@ Name: pkgmgr-info Summary: Packager Manager infomation api for package Version: 0.0.92 Release: 1 -Group: System/Libraries -License: Apache License, Version 2.0 +Group: Application Framework/Package Management +License: Apache-2.0 Source0: %{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: pkgconfig(dlog) @@ -12,38 +12,27 @@ BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(db-util) BuildRequires: pkgconfig(libxml-2.0) -%define _unpackaged_files_terminate_build 0 - - %description Packager Manager infomation api for packaging -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig - - %package devel Summary: Packager Manager infomation api (devel) -Group: TO_BE/FILLED_IN +Group: Development/Libraries Requires: %{name} = %{version}-%{release} - %description devel Packager Manager infomation api (devel) - %package parser Summary: Library for manifest parser -Group: TO_BE/FILLED_IN +Group: Application Framework/Package Management Requires: %{name} = %{version}-%{release} -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig %description parser Library for manifest parser %package parser-devel Summary: Dev package for libpkgmgr-parser -Group: TO_BE/FILLED_IN +Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description parser-devel @@ -53,39 +42,28 @@ Dev package for libpkgmgr-parser %prep %setup -q - %build -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} - - +%cmake . make %{?jobs:-j%jobs} %install -rm -rf %{buildroot} %make_install - - - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig - - %files %manifest pkgmgr-info.manifest %defattr(-,root,root,-) %{_libdir}/libpkgmgr-info.so.* - %files devel %defattr(-,root,root,-) %{_includedir}/pkgmgr-info.h %{_libdir}/pkgconfig/pkgmgr-info.pc %{_libdir}/libpkgmgr-info.so - %files parser %manifest pkgmgr-parser.manifest %defattr(-,root,root,-) @@ -95,11 +73,9 @@ rm -rf %{buildroot} %{_prefix}/etc/package-manager/preload/xml.xsd %{_prefix}/etc/package-manager/parser_path.conf - %files parser-devel %defattr(-,root,root,-) %{_includedir}/pkgmgr/pkgmgr_parser.h %{_includedir}/pkgmgr/pkgmgr_parser_db.h %{_libdir}/pkgconfig/pkgmgr-parser.pc %{_libdir}/libpkgmgr_parser.so - diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt index a1c02f4..870973d 100755 --- a/parser/CMakeLists.txt +++ b/parser/CMakeLists.txt @@ -59,7 +59,7 @@ configure_file(xml.xsd.in xml.xsd @ONLY) ## Install INSTALL(TARGETS pkgmgr_parser - DESTINATION lib + DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) INSTALL(FILES pkgmgr_parser.h @@ -70,7 +70,7 @@ INSTALL(FILES INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr-parser.pc - DESTINATION lib/pkgconfig) + DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/preload_list.txt DESTINATION ${PREFIX}/etc/package-manager/preload/) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.xsd DESTINATION ${PREFIX}/etc/package-manager/preload/) diff --git a/parser/pkgmgr-parser.pc.in b/parser/pkgmgr-parser.pc.in index 71947db..547a51a 100755 --- a/parser/pkgmgr-parser.pc.in +++ b/parser/pkgmgr-parser.pc.in @@ -5,7 +5,7 @@ prefix=@PREFIX@ exec_prefix=@EXEC_PREFIX@ -libdir=@LIBDIR@ +libdir=@LIB_INSTALL_DIR@ includedir=@INCLUDEDIR@ Name: package manager parser library diff --git a/pkgmgr-info.manifest b/pkgmgr-info.manifest.in similarity index 68% rename from pkgmgr-info.manifest rename to pkgmgr-info.manifest.in index 6748697..5d27c3c 100644 --- a/pkgmgr-info.manifest +++ b/pkgmgr-info.manifest.in @@ -6,6 +6,6 @@ - + diff --git a/pkgmgr-info.pc.in b/pkgmgr-info.pc.in index 86ed8ad..6a40cfd 100755 --- a/pkgmgr-info.pc.in +++ b/pkgmgr-info.pc.in @@ -2,7 +2,7 @@ prefix=/usr exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include Name: pkgmgr-info diff --git a/pkgmgr-parser.manifest b/pkgmgr-parser.manifest deleted file mode 100755 index ec7caa6..0000000 --- a/pkgmgr-parser.manifest +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/pkgmgr-parser.manifest.in b/pkgmgr-parser.manifest.in new file mode 100755 index 0000000..c5ba49a --- /dev/null +++ b/pkgmgr-parser.manifest.in @@ -0,0 +1,13 @@ + + + + + + + + + + + + + -- 2.7.4