From: Lukasz Pawelczyk Date: Wed, 10 May 2017 09:54:14 +0000 (+0200) Subject: Reverting 7a861dd40cc6661d2085d44d402c801c79feaaf9 X-Git-Tag: submit/tizen/20170522.121243~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71773136ef73c92b79c0542ca8089d0808aa039b;p=platform%2Fcore%2Fsecurity%2Fklay.git Reverting 7a861dd40cc6661d2085d44d402c801c79feaaf9 Change-Id: Idea4b951f0ff4476252627b3c8abd8c166df078e --- diff --git a/klay.pc.in b/klay.pc.in index ff6dd98..939e712 100644 --- a/klay.pc.in +++ b/klay.pc.in @@ -6,7 +6,8 @@ libdir=@LIB_INSTALL_DIR@ includedir=@INCLUDE_INSTALL_DIR@ Name: klay -Description: Tizen Klay library and header files +Description: Tizen Klay static library and header files +Requires : dlog glib-2.0 sqlite3 libxml-2.0 libtzplatform-config Version: @VERSION@ Libs: -L${libdir} -lklay Cflags: -I${includedir}/klay diff --git a/packaging/klay.spec b/packaging/klay.spec index 5ead7f0..64cbf89 100755 --- a/packaging/klay.spec +++ b/packaging/klay.spec @@ -1,9 +1,10 @@ +%define keepstatic 1 Name: klay Version: 0.0.1 Release: 0 License: Apache-2.0 Source0: file://%{name}-%{version}.tar.gz -Summary: Tizen Klay library +Summary: Tizen Klay static library and header files Group: Development/Libraries BuildRequires: gcc BuildRequires: cmake @@ -12,17 +13,16 @@ BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libtzplatform-config) -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig %description -The klay package provides a library which can be used for many servers -and clients. +The klay package provides a static library and header files +which can be used for many servers and clients %files %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libklay.so.%{version} -%{_libdir}/libklay.so.0 +%{_libdir}/*.a +%{_libdir}/pkgconfig/*.pc +%{_includedir}/klay %prep %setup -q @@ -47,37 +47,21 @@ make %{?jobs:-j%jobs} %clean rm -rf %{buildroot} -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -## Devel Package ############################################################## -%package devel -Summary: Tizen Klay development package -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -The klay-devel package provides libraries and header files necessary for -developing with the Klay library. +%preun -%files devel -%defattr(644,root,root,755) -%{_libdir}/libklay.so -%{_libdir}/pkgconfig/*.pc -%{_includedir}/klay +%postun ## Test Package ############################################################## -%package test +%package -n klay-test Summary: Klay test Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -%description test -Testcases for klay library. +%description -n klay-test +Testcases for klay library -%files test -%defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/klay-test -%attr(755,root,root) %{TZ_SYS_DATA}/klay-test/test-proc.sh +%files -n klay-test +%defattr(755,root,root,755) +%{_bindir}/klay-test +%{TZ_SYS_DATA}/klay-test/test-proc.sh +%defattr(-,root,root,-) %{TZ_SYS_DATA}/klay-test/sample-policy.xml diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e02a684..be96c5f 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,9 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -SET(LIB_VERSION "${VERSION}") -SET(LIB_SOVERSION "0") - SET (KLAY_SOURCES ${KLAY_SRC}/error.cpp ${KLAY_SRC}/process.cpp ${KLAY_SRC}/eventfd.cpp @@ -52,9 +49,7 @@ SET (KLAY_SOURCES ${KLAY_SRC}/error.cpp SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,noexecstack") -ADD_LIBRARY(${PROJECT_NAME} SHARED ${KLAY_SOURCES}) -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${LIB_SOVERSION}) -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${LIB_VERSION}) +ADD_LIBRARY(${PROJECT_NAME} STATIC ${KLAY_SOURCES}) PKG_CHECK_MODULES(KLAY_DEPS REQUIRED gio-2.0 libxml-2.0 @@ -68,5 +63,5 @@ INCLUDE_DIRECTORIES(SYSTEM ${KLAY_INCLUDE} TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${KLAY_DEPS_LIBRARIES}) -INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT DevelopmentLibraries) -INSTALL(DIRECTORY ${KLAY_INCLUDE}/ DESTINATION ${INCLUDE_INSTALL_DIR}) +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT DevelopmentLibraries) +INSTALL(DIRECTORY ${KLAY_INCLUDE}/ DESTINATION ${INCLUDE_INSTALL_DIR})