From 777b18c6ef5e1067d2d7ab2a6a839de3d32ebafc Mon Sep 17 00:00:00 2001 From: Yorwba Date: Mon, 22 Nov 2021 13:40:54 +0100 Subject: [PATCH 1/2] Clearly distinguish build steps for cppcms and tatodetect --- ansible/tasks/install_tatodetect.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/tasks/install_tatodetect.yml b/ansible/tasks/install_tatodetect.yml index 6fcbf55..f230a86 100644 --- a/ansible/tasks/install_tatodetect.yml +++ b/ansible/tasks/install_tatodetect.yml @@ -10,17 +10,17 @@ state: present - name: Fetch cppcms source get_url: url=http://downloads.sourceforge.net/project/cppcms/cppcms/1.0.5/cppcms-1.0.5.tar.bz2 dest=/tmp/ -- name: Extract source from the archive +- name: Extract cppcms source from the archive command: tar -jxvf cppcms-1.0.5.tar.bz2 chdir=/tmp/ when: install_state is failed or force_install == true -- name: Disable testing +- name: Disable testing for cppcms replace: path: '/tmp/cppcms-1.0.5/CMakeLists.txt' regexp: "^(enable_testing\\(\\))$" replace: "#\\1" -- name: Generate makefile +- name: Generate makefile for cppcms command: cmake . chdir=/tmp/cppcms-1.0.5 -- name: Compile +- name: Compile cppcms command: make -j2 chdir=/tmp/cppcms-1.0.5 - name: Install command: make install chdir=/tmp/cppcms-1.0.5 @@ -30,9 +30,9 @@ state: present - name: Fetch tatodetect source git: repo=https://github.com/Tatoeba/Tatodetect.git dest=/tmp/tatodetect -- name: Generate makefile +- name: Generate makefile for tatodetect command: cmake . chdir=/tmp/tatodetect -- name: Compile +- name: Compile tatodetect command: make -j2 chdir=/tmp/tatodetect - name: Copy the binary to system-wide location command: cp tatodetect /usr/local/bin/tatodetect chdir=/tmp/tatodetect From d5f9c25887bd2143f0acd99b07bbab7b2ebd271f Mon Sep 17 00:00:00 2001 From: Yorwba Date: Mon, 22 Nov 2021 13:41:40 +0100 Subject: [PATCH 2/2] Disable building tests for cppcms --- ansible/tasks/install_tatodetect.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/tasks/install_tatodetect.yml b/ansible/tasks/install_tatodetect.yml index f230a86..94d03ba 100644 --- a/ansible/tasks/install_tatodetect.yml +++ b/ansible/tasks/install_tatodetect.yml @@ -18,6 +18,11 @@ path: '/tmp/cppcms-1.0.5/CMakeLists.txt' regexp: "^(enable_testing\\(\\))$" replace: "#\\1" +- name: Disable building tests for cppcms + replace: + path: '/tmp/cppcms-1.0.5/CMakeLists.txt' + regexp: "^(.*\\$\\{TEST\\}.*)$" + replace: "#\\1" - name: Generate makefile for cppcms command: cmake . chdir=/tmp/cppcms-1.0.5 - name: Compile cppcms