Export devel package 24/56724/3
authorTomasz Iwanek <t.iwanek@samsung.com>
Tue, 12 Jan 2016 09:14:43 +0000 (10:14 +0100)
committerPawel Sikorski <p.sikorski@samsung.com>
Thu, 14 Jan 2016 12:10:06 +0000 (04:10 -0800)
This will be used in wgt-backend to use some of steps

Change-Id: I589b605930b7ef9aa7fa01abb7384759596d54e2

packaging/tpk-backend.spec
src/tpk/CMakeLists.txt
src/tpk/tpk-installer.pc.in [new file with mode: 0644]

index 16b4f7b..26c8c9f 100644 (file)
@@ -22,6 +22,14 @@ BuildRequires:  pkgconfig(tpk-manifest-handlers)
 %description
 Backend for tizen package files
 
+%package devel
+Summary:    Tpk-backend development files
+Group:      Application Framework/Package Management
+Requires:   %{name} = %{version}
+
+%description devel
+This package contains header files of tpk-installer library
+
 %package tests
 Summary: Unit tests for tpk-backend
 Requires: %{name} = %{version}
@@ -50,6 +58,12 @@ ln -s %{_bindir}/tpk-backend %{buildroot}%{_sysconfdir}/package-manager/backend/
 %license LICENSE
 %manifest tpk-backend.manifest
 %{_bindir}/tpk-backend
+%{_libdir}/libtpk-installer.so*
+
+%files devel
+%{_includedir}/app-installers/tpk/*.h
+%{_includedir}/app-installers/tpk/*/*.h
+%{_libdir}/pkgconfig/tpk-installer.pc
 
 %files tests
 %manifest tpk-backend-tests.manifest
index cc121b6..f57dc43 100644 (file)
@@ -7,7 +7,7 @@ SET(SRCS
     tpk_app_query_interface.cc
     tpk_installer.cc
 )
-ADD_LIBRARY(${TARGET_LIBNAME_TPK} STATIC ${SRCS})
+ADD_LIBRARY(${TARGET_LIBNAME_TPK} SHARED ${SRCS})
 ADD_EXECUTABLE(${TARGET_TPK_BACKEND} "tpk_backend.cc")
 
 TARGET_INCLUDE_DIRECTORIES(${TARGET_LIBNAME_TPK} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../")
@@ -23,4 +23,11 @@ APPLY_PKG_CONFIG(${TARGET_LIBNAME_TPK} PUBLIC
 
 TARGET_LINK_LIBRARIES(${TARGET_TPK_BACKEND} PRIVATE ${TARGET_LIBNAME_TPK})
 
+INSTALL(TARGETS ${TARGET_LIBNAME_TPK} DESTINATION ${LIB_INSTALL_DIR})
 INSTALL(TARGETS ${TARGET_TPK_BACKEND} DESTINATION ${BINDIR})
+
+# Export devel package
+CONFIGURE_FILE(tpk-installer.pc.in tpk-installer.pc @ONLY)
+INSTALL(FILES tpk-installer.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+INSTALL(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/app-installers/tpk/
+        FILES_MATCHING PATTERN "*.h")
diff --git a/src/tpk/tpk-installer.pc.in b/src/tpk/tpk-installer.pc.in
new file mode 100644 (file)
index 0000000..f0d2f82
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@PREFIX@
+exec_prefix=@PREFIX@
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: tpk-installer
+Description: Tpk-installer library
+Version: @VERSION@
+Requires: app-installers pkgmgr tpk-manifest-handlers manifest-parser
+Libs: -L${libdir} -ltpk-installer
+Cflags: -I${includedir}/app-installers/