Small cleanups.
Removed upstreamed patch.
Suffixed all patches with .patch
Signed-off-by: Rosen Penev <rosenp@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=Netopeer2
-PKG_VERSION:=0.7-r1
-PKG_RELEASE:=3
+PKG_VERSION:=0.7-r2
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/CESNET/Netopeer2/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=040013d1e315c62c496b704475665165578c374ffb387cbbff422cf8898d3a12
+PKG_HASH:=59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
endef
CMAKE_OPTIONS += \
- -DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DCMAKE_BUILD_TYPE:STRING=Release \
-DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys \
-DENABLE_CONFIGURATION:BOOL=OFF \
-DMODEL_INSTALL:BOOL=OFF \
+++ /dev/null
-Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
-===================================================================
---- /dev/null
-+++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
-@@ -0,0 +1,5 @@
-+cmake_minimum_required(VERSION 2.6)
-+
-+add_subdirectory(server)
-+add_subdirectory(cli)
-+add_subdirectory(keystored)
-Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
-===================================================================
---- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/cli/CMakeLists.txt
-+++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 2.6)
-
- # include custom Modules
--set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
-
- project(netopeer2-cli C)
- include(GNUInstallDirs)
-@@ -83,7 +83,7 @@ endif()
- install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
-
- # clean cmake cache
--add_custom_target(cleancache
-+add_custom_target(cleancache_cli
- COMMAND make clean
- COMMAND find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
- COMMAND rm -rf Makefile Doxyfile
-Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
-===================================================================
---- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/keystored/CMakeLists.txt
-+++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 2.6)
-
- # include custom Modules
--set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
-
- project(keystored C)
- include(GNUInstallDirs)
-@@ -140,7 +140,7 @@ if (SSH_KEY_INSTALL)
- execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ssh-key-import.sh)")
- endif()
-
--add_custom_target(install-scripts-ide
-+add_custom_target(install-scripts-ide-keystored
- scripts/model-install.sh
- scripts/ssh-key-import.sh
- )
-Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
-===================================================================
---- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/server/CMakeLists.txt
-+++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 2.8.9)
-
- # include custom Modules
--set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
-
- project(netopeer2-server C)
- include(GNUInstallDirs)
-@@ -204,7 +204,7 @@ if (ENABLE_CONFIGURATION)
- execute_process(COMMAND ${PROJECT_BINARY_DIR}/model-install.sh)")
- endif()
-
--add_custom_target(install-scripts-ide
-+add_custom_target(install-scripts-ide-server
- ${PROJECT_BINARY_DIR}/model-install.sh
- )
--- /dev/null
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,5 @@
++cmake_minimum_required(VERSION 2.6)
++
++add_subdirectory(server)
++add_subdirectory(cli)
++add_subdirectory(keystored)
+--- a/cli/CMakeLists.txt
++++ b/cli/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(netopeer2-cli C)
+ include(GNUInstallDirs)
+@@ -84,7 +84,7 @@ endif()
+ install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+
+ # clean cmake cache
+-add_custom_target(cleancache
++add_custom_target(cleancache_cli
+ COMMAND make clean
+ COMMAND find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
+ COMMAND rm -rf Makefile Doxyfile
+--- a/keystored/CMakeLists.txt
++++ b/keystored/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(keystored C)
+ include(GNUInstallDirs)
+@@ -147,7 +147,7 @@ if (SSH_KEY_INSTALL)
+ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ssh-key-import.sh)")
+ endif()
+
+-add_custom_target(install-scripts-ide
++add_custom_target(install-scripts-ide-keystored
+ scripts/model-install.sh
+ scripts/ssh-key-import.sh
+ )
+--- a/server/CMakeLists.txt
++++ b/server/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.8.9)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(netopeer2-server C)
+ include(GNUInstallDirs)
+@@ -208,7 +208,7 @@ if (ENABLE_CONFIGURATION)
+ execute_process(COMMAND ${PROJECT_BINARY_DIR}/model-install.sh)")
+ endif()
+
+-add_custom_target(install-scripts-ide
++add_custom_target(install-scripts-ide-server
+ ${PROJECT_BINARY_DIR}/model-install.sh
+ )
+
+++ /dev/null
-Index: Netopeer2-0.6-r1/keystored/CMakeLists.txt
-===================================================================
---- Netopeer2-0.6-r1.orig/keystored/CMakeLists.txt
-+++ Netopeer2-0.6-r1/keystored/CMakeLists.txt
-@@ -69,6 +69,8 @@ find_package(SYSREPO REQUIRED)
- target_link_libraries(keystored ${SYSREPO_LIBRARIES})
- include_directories(${SYSREPO_INCLUDE_DIRS})
-
-+# skip step because of cross compiling
-+if (FALSE)
- # get sysrepo plugins directory
- if (NOT SR_PLUGINS_DIR)
- if (PKG_CONFIG_FOUND)
-@@ -154,3 +156,4 @@ add_custom_target(install-scripts-ide-ke
-
- # plugins should be installed into sysrepo plugins dir
- install(TARGETS keystored DESTINATION ${SR_PLUGINS_DIR})
-+endif()
--- /dev/null
+--- a/keystored/CMakeLists.txt
++++ b/keystored/CMakeLists.txt
+@@ -69,6 +69,8 @@ find_package(SYSREPO REQUIRED)
+ target_link_libraries(keystored ${SYSREPO_LIBRARIES})
+ include_directories(${SYSREPO_INCLUDE_DIRS})
+
++# skip step because of cross compiling
++if (FALSE)
+ # get sysrepo plugins directory
+ if (NOT SR_PLUGINS_DIR)
+ if (PKG_CONFIG_FOUND)
+@@ -154,3 +156,4 @@ add_custom_target(install-scripts-ide
+
+ # plugins should be installed into sysrepo plugins dir
+ install(TARGETS keystored DESTINATION ${SR_PLUGINS_DIR})
++endif()
+++ /dev/null
---- a/cli/commands.c
-+++ b/cli/commands.c
-@@ -1659,7 +1659,11 @@ parse_cert(const char *name, const char *path)
- BIO_printf(bio_out, "\n");
-
- BIO_printf(bio_out, "Valid until: ");
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
- ASN1_TIME_print(bio_out, X509_get_notAfter(cert));
-+#else
-+ ASN1_TIME_print(bio_out, X509_get0_notAfter(cert));
-+#endif
- BIO_printf(bio_out, "\n");
-
- has_san = 0;