diff options
Diffstat (limited to 'snap')
-rw-r--r-- | snap/.snapcraft/travis_snapcraft.cfg | bin | 2448 -> 0 bytes | |||
-rw-r--r-- | snap/CMakeLists.txt | 39 | ||||
-rw-r--r-- | snap/SNAP_VERSION.in | 1 | ||||
-rw-r--r-- | snap/snapcraft.yaml (renamed from snap/snapcraft.yaml.in) | 26 |
4 files changed, 38 insertions, 28 deletions
diff --git a/snap/.snapcraft/travis_snapcraft.cfg b/snap/.snapcraft/travis_snapcraft.cfg Binary files differdeleted file mode 100644 index 7af0cd282..000000000 --- a/snap/.snapcraft/travis_snapcraft.cfg +++ /dev/null diff --git a/snap/CMakeLists.txt b/snap/CMakeLists.txt index e75148f70..fb0f41cb9 100644 --- a/snap/CMakeLists.txt +++ b/snap/CMakeLists.txt @@ -1,6 +1,6 @@ # Remmina - The GTK+ Remote Desktop Client # -# Copyright (C) 2017 Marco Trevisan +# Copyright (C) 2017-2018 Marco Trevisan # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,16 +37,15 @@ if(NOT ${GIT_REVISION} STREQUAL ${REMMINA_VERSION_SUFFIX} AND set(SNAP_VERSION ${SNAP_VERSION}+git${GIT_REVISION}) endif() -set(SNAP_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) -set(SNAP_SETUP_DIR ${SNAP_BUILD_DIR}/snap) -set(SNAP_GUI_DIR ${SNAP_SETUP_DIR}/gui) +set(SNAP_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +set(SNAP_GUI_DIR ${SNAP_DIR}/gui) file(MAKE_DIRECTORY ${SNAP_GUI_DIR}) -file(RELATIVE_PATH CMAKE_SOURCE_DIR_RELATIVE ${SNAP_BUILD_DIR} +file(RELATIVE_PATH CMAKE_SOURCE_DIR_RELATIVE ${SNAP_DIR} ${CMAKE_SOURCE_DIR}) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/snapcraft.yaml.in - ${SNAP_BUILD_DIR}/snapcraft.yaml @ONLY) +configure_file(${SNAP_DIR}/SNAP_VERSION.in + ${SNAP_DIR}/SNAP_VERSION @ONLY) set(REMMINA_BINARY_PATH "remmina") set(REMMINA_ICON "\${SNAP}/meta/gui/icon.svg") @@ -54,29 +53,35 @@ configure_file(${CMAKE_SOURCE_DIR}/remmina/desktop/remmina.desktop.in ${SNAP_GUI_DIR}/${UNIQUE_APPNAME}.desktop @ONLY) configure_file(${CMAKE_SOURCE_DIR}/LICENSE - ${SNAP_SETUP_DIR}/license.txt COPYONLY) + ${SNAP_GUI_DIR}/license.txt COPYONLY) + +add_custom_target("snap-version-script" ALL + DEPENDS "${SNAP_DIR}/SNAP_VERSION" + COMMENT "Preparing snap version file ${SNAP_VERSION}" + VERBATIM + ) add_custom_target("snap-prime" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" COMMAND ${SNAPCRAFT} prime - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/snapcraft.yaml" + DEPENDS "${SNAP_DIR}/SNAP_VERSION" COMMENT "Priming snap package ${SNAP_VERSION}" VERBATIM ) add_custom_target("snap" COMMAND ${SNAPCRAFT} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/snapcraft.yaml" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + DEPENDS "${SNAP_DIR}/SNAP_VERSION" COMMENT "Create snap package ${SNAP_VERSION}" VERBATIM ) foreach(channel stable candidate beta edge) add_custom_target("snap-push-${channel}" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" COMMAND bash -c "${SNAPCRAFT} push --release ${channel} *.snap" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/snapcraft.yaml" + DEPENDS "${SNAP_DIR}/SNAP_VERSION" COMMENT "Create snap package ${SNAP_VERSION}" VERBATIM ) @@ -84,12 +89,12 @@ foreach(channel stable candidate beta edge) endforeach() add_custom_target("snap-push-transfer.sh" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" COMMAND bash -c "snap=$(ls *.snap -1 | head -n1); \ curl --upload-file $snap \ https://transfer.sh/$(basename $snap)" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/snapcraft.yaml" - COMMENT "Create snap package ${SNAP_VERSION}" + DEPENDS "${SNAP_DIR}/SNAP_VERSION" + COMMENT "Uploading snap package to transfer.sh ${SNAP_VERSION}" VERBATIM ) add_dependencies("snap-push-transfer.sh" "snap") diff --git a/snap/SNAP_VERSION.in b/snap/SNAP_VERSION.in new file mode 100644 index 000000000..9e5410a72 --- /dev/null +++ b/snap/SNAP_VERSION.in @@ -0,0 +1 @@ +@SNAP_VERSION@ diff --git a/snap/snapcraft.yaml.in b/snap/snapcraft.yaml index 989d7fe87..a6630b25d 100644 --- a/snap/snapcraft.yaml.in +++ b/snap/snapcraft.yaml @@ -1,7 +1,9 @@ -name: @SNAP_NAME@ -version: @SNAP_VERSION@ +name: remmina +version: git +version-script: cat parts/remmina/src/snap/SNAP_VERSION +# license: GPL-2.0-only summary: The GTK+ Remote Desktop Client -icon: @CMAKE_SOURCE_DIR_RELATIVE@/remmina/desktop/scalable/apps/remmina.svg +icon: remmina/desktop/scalable/apps/remmina.svg description: | Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travellers, who need to work with lots of remote @@ -44,7 +46,7 @@ parts: - libxtst-dev - libxv-dev configflags: - - -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ + - -DCMAKE_BUILD_TYPE=Release - -DWITH_WAYLAND=on - -DWITH_CLIENT=off - -DWITH_SERVER=off @@ -60,7 +62,7 @@ parts: # XXX: This is an hack to have a kind of bind-mount with absolute prefix. - -DCMAKE_INSTALL_PREFIX=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr organize: - snap/@SNAP_NAME@/current: . + snap/remmina/current: . prime: - -usr/include @@ -74,7 +76,7 @@ parts: source-depth: 1 source-branch: v0-7 configflags: - - -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ + - -DCMAKE_BUILD_TYPE=Release - -DWITH_STATIC_LIB=ON - -DWITH_GSSAPI=ON - -DWITH_NACL=0 @@ -82,14 +84,16 @@ parts: # XXX: This is an hack to have a kind of bind-mount with absolute prefix. - -DCMAKE_INSTALL_PREFIX=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr organize: - snap/@SNAP_NAME@/current: . + snap/remmina/current: . prime: - ./**/libssh*.so.* remmina: plugin: cmake - source: @CMAKE_SOURCE_DIR_RELATIVE@ + source: . + prepare: + cp -av $SNAPCRAFT_STAGE/../snap $SNAPCRAFT_PART_INSTALL/../src stage-packages: - xauth build-packages: @@ -108,14 +112,14 @@ parts: - libvte-2.91-dev - libxkbfile-dev configflags: - - -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ + - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_PREFIX_PATH=$SNAPCRAFT_STAGE/usr - -DSNAP_BUILD=on # XXX: This is an hack to have a kind of bind-mount with absolute prefix. - -DCMAKE_INSTALL_PREFIX=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr organize: - snap/@SNAP_NAME@/current: . + snap/remmina/current: . after: - libssh-0.7 @@ -151,4 +155,4 @@ slots: remmina-gapp: interface: dbus bus: session - name: @UNIQUE_APPNAME@ + name: org.remmina.Remmina |