From 633f43c395eb124cbfd0743266fbf994962d7c0d Mon Sep 17 00:00:00 2001 From: van <751890223@qq.com> Date: Mon, 20 May 2024 20:14:15 +0800 Subject: [PATCH] build: add app mayo 3D CAD viewer and converter based on Qt + OpenCascade log: add app --- io.github.mayo/linglong.yaml | 34 ++++++++++++++ .../0001-fix-desktop-and-binary-install.patch | 46 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 io.github.mayo/linglong.yaml create mode 100644 io.github.mayo/patches/0001-fix-desktop-and-binary-install.patch diff --git a/io.github.mayo/linglong.yaml b/io.github.mayo/linglong.yaml new file mode 100644 index 000000000..915056e22 --- /dev/null +++ b/io.github.mayo/linglong.yaml @@ -0,0 +1,34 @@ +package: + id: io.github.mayo + name: mayo + version: 0.8.0.1 + kind: app + description: | + 3D CAD viewer and converter based on Qt + OpenCascade + +runtime: + id: org.deepin.Runtime + version: 23.0.0 + +source: + kind: git + url: https://github.com/fougue/mayo.git + commit: ec5d7d7590396866f2db26c85826e6c4c2b272c4 + patch: patches/0001-fix-desktop-and-binary-install.patch + +depends: + - id: OCCT/7.7.2 + type: runtime + +build: + kind: cmake + manual: + configure: | + cp images/appicon.svg images/mayoIcon.svg + cp images/appicon_16.png images/mayoIcon_16.png + cp images/appicon_24.png images/mayoIcon_24.png + cp images/appicon_32.png images/mayoIcon_32.png + cp images/appicon_64.png images/mayoIcon_64.png + cp images/appicon_128.png images/mayoIcon_128.png + cp images/appicon_256.png images/mayoIcon_256.png + cmake -B ${build_dir} ${conf_args} ${extra_args} diff --git a/io.github.mayo/patches/0001-fix-desktop-and-binary-install.patch b/io.github.mayo/patches/0001-fix-desktop-and-binary-install.patch new file mode 100644 index 000000000..fb5c39410 --- /dev/null +++ b/io.github.mayo/patches/0001-fix-desktop-and-binary-install.patch @@ -0,0 +1,46 @@ +From 134678ead7c309a673f03b751ef4575498484e8b Mon Sep 17 00:00:00 2001 +From: van <751890223@qq.com> +Date: Mon, 20 May 2024 19:46:06 +0800 +Subject: [PATCH] fix-desktop-and-binary-install + +--- + CMakeLists.txt | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c5449b8..76433d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -687,3 +687,28 @@ add_custom_target( + src/mayo_version.h.cmake + README.md + ) ++ ++ ++#install desktop ++set(DESKTOP_FILE_CONTENT " ++[Desktop Entry] ++Type=Application ++Name=mayo ++Exec=mayo ++Icon=mayoIcon ++Categories=Utility; ++") ++file(WRITE ${CMAKE_BINARY_DIR}/mayo.desktop "${DESKTOP_FILE_CONTENT}") ++install(PROGRAMS ${CMAKE_BINARY_DIR}/mayo.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) ++ ++#install icons ++install(PROGRAMS images/mayoIcon.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/ ) ++install(PROGRAMS images/mayoIcon_16.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/16X16/apps/ ) ++install(PROGRAMS images/mayoIcon_24.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/24X24/apps/ ) ++install(PROGRAMS images/mayoIcon_32.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/32X32/apps/ ) ++install(PROGRAMS images/mayoIcon_64.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/64X64/apps/ ) ++install(PROGRAMS images/mayoIcon_128.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128X128/apps/ ) ++install(PROGRAMS images/mayoIcon_256.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256X256/apps/ ) ++ ++#install binary ++install(TARGETS mayo DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +\ No newline at end of file +-- +2.33.1 +