Skip to content
Snippets Groups Projects
Commit a45d8591 authored by Arkadiusz Janz's avatar Arkadiusz Janz
Browse files

Gitlab CI configuration, changed project name, added cpack support for building deb packages

parent da769b64
No related branches found
No related tags found
1 merge request!5Deb pack
FROM clarinpl/python:3.6
ARG APT_USERNAME
ARG APT_PASSWORD
RUN test -n "$APT_USERNAME"
RUN test -n "$APT_PASSWORD"
RUN apt-get update && apt-get install -y transport-https
RUN bash -c "wget -q -O - http://apt.clarin-pl.eu/KEY.gpg | apt-key add -"
RUN bash -c "echo 'deb https://apt.clarin-pl.eu/ /' > /etc/apt/sources.list.d/clarin.list"
# Install corpus2
RUN apt-get update && apt-get install -y \
corpus2-python3.6
RUN mkdir -p /home/install
WORKDIR /home/install
COPY ./src ./wccl
RUN mkdir wccl/build && \
cd wccl/build && \
cmake .. && \
cmake --build . && \
cpack
RUN apt-get install -y curl
WORKDIR /home/install/wccl/build
COPY ./uploaddeb.sh
RUN bash uploaddeb.sh $APT_USERNAME $APT_PASSWORD https://apt.clarin-pl.eu
PROJECT(WCCL)
PROJECT(wccl)
cmake_minimum_required(VERSION 2.8.0)
set(wccl_ver_major "0")
set(wccl_ver_minor "3")
set(wccl_ver_patch "2")
set(wccl_ver_patch "3")
set(LIBWCCL_VERSION "${wccl_ver_major}.${wccl_ver_minor}.${wccl_ver_patch}")
set(CMAKE_INSTALL_PREFIX /usr)
# use some of our own Find* scripts
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeScripts)
......@@ -86,6 +88,33 @@ else()
message(STATUS "Not building SWIG Python wrappers")
endif(WCCL_BUILD_SWIG)
# Sets a default install location for packages installed from deb - we use
# the same location as it's used when we build projects directly from source
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Detect python version descriptor
if(WCCL_BUILD_SWIG)
find_package(PythonLibs)
find_package(PythonInterp)
set(PYTHON_VERSION "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
endif(WCCL_BUILD_SWIG)
# Requires to install dependencies
set(CPACK_DEBIAN_PACKAGE_DEPENDS "")
# Set *.deb package name and version
if(PYTHON_VERSION)
SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}-${PYTHON_VERSION}")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${LIBWCCL_VERSION}-all")
else()
SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${LIBWCCL_VERSION}-all")
endif(PYTHON_VERSION)
SET(CPACK_PACKAGE_VERSION "${LIBWCCL_VERSION}")
# Include CPack
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "arkadiusz.janz@pwr.edu.pl")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "g419")
INCLUDE(CPack)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment