Add devel package for capmgr
authorSangyoon Jang <jeremy.jang@samsung.com>
Tue, 31 Jul 2018 08:10:31 +0000 (17:10 +0900)
committer장상윤/Tizen Platform Lab(SR)/Engineer/삼성전자 <jeremy.jang@samsung.com>
Tue, 31 Jul 2018 09:22:10 +0000 (18:22 +0900)
Change-Id: Ia35613df87bd6aa9b2407e4a4f3ac07ae174733e
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
packaging/capmgr.spec
src/client/CMakeLists.txt
src/client/capmgr.pc.in [new file with mode: 0644]

index e480636891e764c9ec3940ecab1fe45242891747..ab7273023b3a1dbe31ffa745a2b9312adaf338ea 100644 (file)
@@ -32,6 +32,14 @@ BuildRequires:  pkgconfig(sqlite3)
 %description
 Tizen Capability Manager
 
+%package devel
+Summary:   Capability Manager development files
+Group:     Application Framework/Package Management
+Requires:  %{name} = %{version}
+
+%description devel
+This package contains header files of capability manager library
+
 %package tests
 Summary: Unit-tests for capmgr
 Requires: %{name} = %{version}
@@ -74,13 +82,19 @@ systemctl daemon-reload
 %defattr(-,root,root,-)
 %{_bindir}/capmgr
 %{_bindir}/capmgr_test
-%{_libdir}/libcapmgr-client.so*
-%{_libdir}/libcapmgr-common.so*
+%{_libdir}/libcapmgr-client.so.*
+%{_libdir}/libcapmgr-common.so.*
 %{_sysconfdir}/dbus-1/system.d/%{name}.conf
 %{_unitdir}/%{name}.service
 %{_unitdir}/multi-user.target.wants/%{name}.service
 %{_tmpfilesdir}/%{name}.conf
 
+%files devel
+%{_includedir}/%{name}.h
+%{_libdir}/pkgconfig/%{name}.pc
+%{_libdir}/libcapmgr-client.so
+%{_libdir}/libcapmgr-common.so
+
 %files tests
 %{_bindir}/capmgr-ut/*
 /opt/share/capmgr-ut/*
index 82d2bfdc628b90972a4cfa391a40c740c736a5a1..ee0793fb3070680bd541216b2fab509d241325ba 100644 (file)
@@ -18,3 +18,6 @@ SET_TARGET_PROPERTIES(${TARGET_LIB_CLIENT} PROPERTIES SOVERSION ${MAJORVER})
 TARGET_LINK_LIBRARIES(${TARGET_LIB_CLIENT} PUBLIC ${TARGET_LIB_COMMON})
 
 INSTALL(TARGETS ${TARGET_LIB_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
+CONFIGURE_FILE(capmgr.pc.in capmgr.pc @ONLY)
+INSTALL(FILES capmgr.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+INSTALL(DIRECTORY include/ DESTINATION ${INCLUDEDIR} FILES_MATCHING PATTERN "*.h")
diff --git a/src/client/capmgr.pc.in b/src/client/capmgr.pc.in
new file mode 100644 (file)
index 0000000..5c95b61
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@PREFIX@
+exec_prefix=@EXEC_PREFIX@
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: capmgr
+Description: capability-manager API
+Version: @FULLVER@
+Requires:
+Libs: -L${libdir} -lcapmgr-client
+Cflags: -I${includedir}