From 86c77384c8111e0601d6224180cff23d61d4edf8 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 14 12月 2019 12:20:15 +0800
Subject: [PATCH] fix centos 7 remove centos 8

---
 .travis.yml    |   32 ++++++++++++++++----------------
 CMakeLists.txt |    6 ++++++
 README.md      |   15 +--------------
 3 files changed, 23 insertions(+), 30 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 9207dba..ff9cbd1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -90,22 +90,22 @@
      script: 
         - docker run --name centos7_make -v `pwd`:/root/open-license-manager centos7_configured /bin/bash -c 
             "cd /root/open-license-manager/build && make && make install && VIRT_ENV=CONTAINER make test"
-   - os: linux
-     dist: bionic
-     name: "CentOS-8 Docker"
-     before_script: 
-        - docker run --name centos8_toconfigure -v `pwd`:/root/open-license-manager centos:centos8 /bin/bash -c \
-            "yum -y update && yum -y groupinstall 'Development Tools' && 
-             yum -y install wget cmake boost boost-devel openssl-devel zlib-devel && 
-             dnf -y --enablerepo=PowerTools install boost-static && 
-             wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1d.tar.gz && 
-             tar xzf OpenSSL_1_1_1d.tar.gz && cd openssl-OpenSSL_1_1_1d && 
-             ./config && make -j 8 && make install && 
-             cd /root/open-license-manager/build && cmake .."
-        - docker commit centos8_toconfigure centos8_configured
-     script: 
-        - docker run --name centos8_make -v `pwd`:/root/open-license-manager centos8_configured /bin/bash -c \
-            "cd /root/open-license-manager/build && make && make install && VIRT_ENV=CONTAINER make test"
+#   - os: linux
+#     dist: bionic
+#     name: "CentOS-8 Docker"
+#     before_script: 
+#        - docker run --name centos8_toconfigure -v `pwd`:/root/open-license-manager centos:centos8 /bin/bash -c \
+#            "yum -y update && yum -y groupinstall 'Development Tools' && 
+#             yum -y install wget cmake boost boost-devel openssl-devel zlib-devel && 
+#             dnf -y --enablerepo=PowerTools install boost-static && 
+#             wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1d.tar.gz && 
+#             tar xzf OpenSSL_1_1_1d.tar.gz && cd openssl-OpenSSL_1_1_1d && 
+#             ./config && make -j 8 && make install && 
+#             cd /root/open-license-manager/build && cmake .."
+#        - docker commit centos8_toconfigure centos8_configured
+#     script: 
+#        - docker run --name centos8_make -v `pwd`:/root/open-license-manager centos8_configured /bin/bash -c \
+#            "cd /root/open-license-manager/build && make && make install && VIRT_ENV=CONTAINER make test"
    - os: linux
      dist: bionic
      name: "Ubuntu 18.04 - MinGW cross-compile for Windows x64"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8fddab..a7543e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,6 +45,12 @@
 		MESSAGE(SEND_ERROR "Openssl required in Linux, please install it or specify -DOPENSSL_ROOT")
 	ENDIF(NOT OPENSSL_FOUND)
 	
+	#Zlib required when openssl version < 1.0.1f (centos 7)
+	SET ( ZLIB_USE_STATIC_LIBS ON ) 
+	find_package(ZLIB REQUIRED)
+	list(APPEND EXTERNAL_LIBS ${ZLIB_LIBRARIES})
+	MESSAGE(STATUS "Found zlib version ${ZLIB_VERSION} ")
+	
     find_package(Threads)
 	if(THREADS_HAVE_PTHREAD_ARG)
   		list(APPEND EXTERNAL_LIBS "-pthread")
diff --git a/README.md b/README.md
index 7041566..79bf932 100644
--- a/README.md
+++ b/README.md
@@ -83,21 +83,8 @@
 How to use
 ==========
 
-This simple example shows how to integrate open-licence-manager into your project
+The [examples](https://github.com/open-license-manager/examples) repository that shows various ways to integrate `open-licence-manager` into your project.
 
-```
-$ cd example
-$ cmake .
-$ make
-$ ./example
-license ERROR :
-    license file not found
-the pc signature is :
-    Jaaa-aaaa-MG9F-ZhBB
-$ ../install/bin/license_generator example -s Jaaa-aaaa-MG9F-ZhBB -o example.lic 
-$ ./example
-licence OK
-```
 
 # How to contribute
 The project is not dead but we take our time to answer. The best interaction you can have with us is through the issue system. Have a look to the [contribution guidelines](CONTRIBUTING.md)

--
Gitblit v1.9.1