INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
-#INCLUDE(FindPkgConfig)
-#pkg_check_modules(pkgs REQUIRED openssl libcryptsvc-devel)
+SET(pc_requires " cryptsvc ")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED ${pc_requires})
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
ADD_LIBRARY(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -ldl -lssl -lcrypto -lcryptsvc)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
SET_TARGET_PROPERTIES(
${PROJECT_NAME}
PROPERTIES
- SOVERSION 0
- VERSION 0.0.0
+ VERSION ${FULLVER}
+ SOVERSION ${MAJORVER}
)
##################################################################################################################
MESSAGE("add -DTARGET")
ENDIF("${ARCH}" STREQUAL "arm")
-CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc)
+SET(PC_NAME ${PROJECT_NAME})
+SET(PC_DESCRIPTION ${DESCRIPTION})
+SET(PC_LDFLAGS -l${PROJECT_NAME})
+SET(PC_REQUIRED ${pc_requires})
+CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
+
INSTALL(FILES ${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION /usr/include)
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
-prefix=/usr
-libdir=/usr/lib
-includedir=/usr/include
+# Package Information for pkg-config
-Name:dukgenerator
-Description:nothing
-Version: 1.0.0
-Requires: openssl libcryptsvc
-Libs: -L${libdir} -lcryptsvc
+prefix=@PREFIX@
+libdir=@PREFIX@/lib
+includedir=@PREFIX@/include
+
+Name: @PC_NAME@
+Description: @DESCRIPTION@
+Version: @FULLVER@
+Requires: @PC_REQUIRED@
+Libs: -L${libdir} @PC_LDFLAGS@
Cflags: -I${includedir}
-
+
-//
-// Copyright (c) 2013 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+//
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
//
#ifndef _DUK_GENERATOR_H_
-Name: dukgenerator
+Name: dukgenerator
Summary: nothing
Version: 1.0.0
-Release: 5
+Release: 6
Group: security
License: Apache License, Version 2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(openssl)
-BuildRequires: libcryptsvc-devel
+BuildRequires: pkgconfig(cryptsvc)
%description
%setup -q
%build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DDESCRIPTION=%{summary}
make %{?jobs:-j%jobs}
%files devel
%{_includedir}/*
%{_libdir}/pkgconfig/dukgenerator.pc
-%{_datadir}/license/%{name}
-
-//
-// Copyright (c) 2013 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+//
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
//
//