diff --git a/project/bundles/3rdparty/ext_qt.master/CMakeLists.txt b/project/bundles/3rdparty/ext_qt.master/CMakeLists.txt deleted file mode 100644 index b9f1f91cd1..0000000000 --- a/project/bundles/3rdparty/ext_qt.master/CMakeLists.txt +++ /dev/null @@ -1,116 +0,0 @@ -# Script to build Qt for digiKam bundle. -# -# Copyright (c) 2015-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -SET(EXTPREFIX_qt "${EXTPREFIX}") -SET(QT_VERSION 5.11.3) - -IF (${QT_VERSION} STREQUAL "5.6.3") - - INCLUDE("config-5.6.3-linux.cmake") - - ExternalProject_Add(ext_qt - DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL https://download.qt.io/official_releases/qt/5.6/5.6.3/single/qt-everywhere-opensource-src-5.6.3.tar.xz - URL_MD5 010342d515b62ee1c0e709254f4ef9ab - - PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt563-appimage-support.patch - - CONFIGURE_COMMAND /configure ${QT_CONFIG} - - BUILD_COMMAND make -j - - UPDATE_COMMAND "" - BUILD_IN_SOURCE 1 - ALWAYS 0 - ) - -ELSEIF(${QT_VERSION} STREQUAL "5.9.7") - - INCLUDE("config-5.9.7-linux.cmake") - - ExternalProject_Add(ext_qt - DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL https://download.qt.io/official_releases/qt/5.9/5.9.7/single/qt-everywhere-opensource-src-5.9.7.tar.xz - URL_MD5 70e617aeb1f9bbf84a12b8cf09b01ece - - PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt597-appimage-support.patch - - CONFIGURE_COMMAND /configure ${QT_CONFIG} - - BUILD_COMMAND make -j - - UPDATE_COMMAND "" - BUILD_IN_SOURCE 1 - ALWAYS 0 - ) - -ELSEIF(${QT_VERSION} STREQUAL "5.10.1") - - INCLUDE("config-5.10.1-linux.cmake") - - ExternalProject_Add(ext_qt - DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL https://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz - URL_MD5 7e167b9617e7bd64012daaacb85477af - - PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt5101-appimage-support.patch - - CONFIGURE_COMMAND /configure ${QT_CONFIG} - - BUILD_COMMAND make -j - - UPDATE_COMMAND "" - BUILD_IN_SOURCE 1 - ALWAYS 0 - ) - -ELSEIF(${QT_VERSION} STREQUAL "5.11.3") - - INCLUDE("config-5.11.3-linux.cmake") - - ExternalProject_Add(ext_qt - DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL https://download.qt.io/official_releases/qt/5.11/5.11.3/single/qt-everywhere-src-5.11.3.tar.xz - URL_MD5 02b353bfe7a40a8dc4274e1d17226d2b - - PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt5113-appimage-support.patch - - CONFIGURE_COMMAND /configure ${QT_CONFIG} - - BUILD_COMMAND make -j - - UPDATE_COMMAND "" - BUILD_IN_SOURCE 1 - ALWAYS 0 - ) - -ELSEIF(${QT_VERSION} STREQUAL "5.12.2") - - INCLUDE("config-5.12.2-linux.cmake") - - ExternalProject_Add(ext_qt - DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL https://download.qt.io/official_releases/qt/5.12/5.12.2/single/qt-everywhere-src-5.12.2.tar.xz - URL_MD5 99c2eb46e533371798b4ca2d1458e065 - - PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt5122-appimage-support.patch - - CONFIGURE_COMMAND /configure ${QT_CONFIG} - - BUILD_COMMAND make -j - - UPDATE_COMMAND "" - BUILD_IN_SOURCE 1 - ALWAYS 0 - ) - -ELSE() - - MESSAGE(FATAL_ERROR "Qt version to install not supported !") - -ENDIF() diff --git a/project/bundles/3rdparty/ext_qt/CMakeLists.txt b/project/bundles/3rdparty/ext_qt/CMakeLists.txt index 2c2b0e9438..b9f1f91cd1 100644 --- a/project/bundles/3rdparty/ext_qt/CMakeLists.txt +++ b/project/bundles/3rdparty/ext_qt/CMakeLists.txt @@ -1,68 +1,116 @@ # Script to build Qt for digiKam bundle. # # Copyright (c) 2015-2019, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # SET(EXTPREFIX_qt "${EXTPREFIX}") +SET(QT_VERSION 5.11.3) -ExternalProject_Add(ext_qt - DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL https://download.qt.io/official_releases/qt/5.11/5.11.3/single/qt-everywhere-src-5.11.3.tar.xz - URL_MD5 02b353bfe7a40a8dc4274e1d17226d2b - - PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt-appimage-support.patch - - CONFIGURE_COMMAND /configure - -prefix ${EXTPREFIX_qt} - -opensource - -confirm-license - -nomake examples - -sql-sqlite - -fontconfig - -openssl - -optimized-qmake - -no-qml-debug - -no-mtdev - -no-journald - -no-syslog - -no-tslib - -no-directfb - -no-linuxfb - -no-libproxy - -no-pch - -no-compile-examples - -qt-zlib - -qt-pcre - -qt-harfbuzz - -qt-xcb - -qt-xkbcommon-x11 - -skip qt3d - -skip qtactiveqt - -skip qtandroidextras - -skip qtcanvas3d - -skip qtcharts - -skip qtconnectivity - -skip qtdatavis3d - -skip qtdoc - -skip qtgamepad - -skip qtgraphicaleffects - -skip qtlocation - -skip qtmultimedia - -skip qtpurchasing - -skip qtremoteobjects - -skip qtserialport - -skip qtscxml - -skip qtsensors - -skip qtspeech - -skip qttranslations - -skip qtvirtualkeyboard - -skip qtwayland - -skip qtwebsockets - - UPDATE_COMMAND "" - BUILD_IN_SOURCE 1 - ALWAYS 0 -) +IF (${QT_VERSION} STREQUAL "5.6.3") + + INCLUDE("config-5.6.3-linux.cmake") + + ExternalProject_Add(ext_qt + DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} + URL https://download.qt.io/official_releases/qt/5.6/5.6.3/single/qt-everywhere-opensource-src-5.6.3.tar.xz + URL_MD5 010342d515b62ee1c0e709254f4ef9ab + + PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt563-appimage-support.patch + + CONFIGURE_COMMAND /configure ${QT_CONFIG} + + BUILD_COMMAND make -j + + UPDATE_COMMAND "" + BUILD_IN_SOURCE 1 + ALWAYS 0 + ) + +ELSEIF(${QT_VERSION} STREQUAL "5.9.7") + + INCLUDE("config-5.9.7-linux.cmake") + + ExternalProject_Add(ext_qt + DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} + URL https://download.qt.io/official_releases/qt/5.9/5.9.7/single/qt-everywhere-opensource-src-5.9.7.tar.xz + URL_MD5 70e617aeb1f9bbf84a12b8cf09b01ece + + PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt597-appimage-support.patch + + CONFIGURE_COMMAND /configure ${QT_CONFIG} + + BUILD_COMMAND make -j + + UPDATE_COMMAND "" + BUILD_IN_SOURCE 1 + ALWAYS 0 + ) + +ELSEIF(${QT_VERSION} STREQUAL "5.10.1") + + INCLUDE("config-5.10.1-linux.cmake") + + ExternalProject_Add(ext_qt + DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} + URL https://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz + URL_MD5 7e167b9617e7bd64012daaacb85477af + + PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt5101-appimage-support.patch + + CONFIGURE_COMMAND /configure ${QT_CONFIG} + + BUILD_COMMAND make -j + + UPDATE_COMMAND "" + BUILD_IN_SOURCE 1 + ALWAYS 0 + ) + +ELSEIF(${QT_VERSION} STREQUAL "5.11.3") + + INCLUDE("config-5.11.3-linux.cmake") + + ExternalProject_Add(ext_qt + DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} + URL https://download.qt.io/official_releases/qt/5.11/5.11.3/single/qt-everywhere-src-5.11.3.tar.xz + URL_MD5 02b353bfe7a40a8dc4274e1d17226d2b + + PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt5113-appimage-support.patch + + CONFIGURE_COMMAND /configure ${QT_CONFIG} + + BUILD_COMMAND make -j + + UPDATE_COMMAND "" + BUILD_IN_SOURCE 1 + ALWAYS 0 + ) + +ELSEIF(${QT_VERSION} STREQUAL "5.12.2") + + INCLUDE("config-5.12.2-linux.cmake") + + ExternalProject_Add(ext_qt + DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} + URL https://download.qt.io/official_releases/qt/5.12/5.12.2/single/qt-everywhere-src-5.12.2.tar.xz + URL_MD5 99c2eb46e533371798b4ca2d1458e065 + + PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt5122-appimage-support.patch + + CONFIGURE_COMMAND /configure ${QT_CONFIG} + + BUILD_COMMAND make -j + + UPDATE_COMMAND "" + BUILD_IN_SOURCE 1 + ALWAYS 0 + ) + +ELSE() + + MESSAGE(FATAL_ERROR "Qt version to install not supported !") + +ENDIF() diff --git a/project/bundles/3rdparty/ext_qt.master/config-5.10.1-linux.cmake b/project/bundles/3rdparty/ext_qt/config-5.10.1-linux.cmake similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/config-5.10.1-linux.cmake rename to project/bundles/3rdparty/ext_qt/config-5.10.1-linux.cmake diff --git a/project/bundles/3rdparty/ext_qt.master/config-5.11.3-linux.cmake b/project/bundles/3rdparty/ext_qt/config-5.11.3-linux.cmake similarity index 94% rename from project/bundles/3rdparty/ext_qt.master/config-5.11.3-linux.cmake rename to project/bundles/3rdparty/ext_qt/config-5.11.3-linux.cmake index 868b946b26..8bc63e405e 100644 --- a/project/bundles/3rdparty/ext_qt.master/config-5.11.3-linux.cmake +++ b/project/bundles/3rdparty/ext_qt/config-5.11.3-linux.cmake @@ -1,83 +1,83 @@ # Script to build Qt for digiKam bundle. # # Copyright (c) 2015-2019, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # LIST(APPEND QT_CONFIG # Framework install path. -prefix ${EXTPREFIX_qt} # Compilation rules to enable. -release # No debug symbols -verbose # Print details while configuration -opensource # Build open-source framework edition -confirm-license # Silency ack the license -opengl desktop # Enable OpenGL support from Desktop -fontconfig # Enable Fontconfig support -openssl-linked # Use SSL from system and link -sql-sqlite # Enable Sqlite plugin support # Compilation rules to disable. -nomake tests # Do not build test codes -nomake examples # Do not build basis example codes -no-compile-examples # Do not build extra example codes # -no-icu # Do not support ICU: https://wiki.qt.io/Qt_5_ICU -no-mtdev # Do not support multi-touch -no-libproxy # Do not support network proxy -no-pch # Do not support pre-compiled header -no-journald # Do not support journald log -no-syslog # Do not support syslog log -no-tslib # Do not support touch screen -no-directfb # Do not support Direct Framebuffer -no-linuxfb # Do not support Linux Framebuffer # Specific 3rdParty libraries to enable. -qt-zlib # Use internal Z compression lib -qt-pcre # Use internal regular expression lib https://doc.qt.io/archives/qt-5.8/qtcore-attribution-pcre.html -qt-harfbuzz # Use internal OpenType lib -system-freetype # Use system font rendering lib https://doc.qt.io/qt-5/qtgui-attribution-freetype.html -qt-xcb # Use internal X11 lib http://doc.qt.io/qt-5/linux-requirements.html -qt-xkbcommon-x11 # Use internal X11 keyboard lib https://doc.qt.io/qt-5/qtgui-attribution-xkbcommon.html # Qt5 Framework components to disable. -skip qt3d # 3D core -skip qtactiveqt # No need ActiveX support -skip qtandroidextras # For embeded devices only -skip qtwinextras # For Windows devices only -skip qtmacextras # For MacOS devices only -skip qtcanvas3d # 3D extensions -skip qtcharts # No need data models charts support -skip qtconnectivity # For embeded devices only -skip qtscript # No need scripting (deprecated) -skip qtdatavis3d # no need 3D data visualizations support -skip qtdoc # No need documentation -skip qtenginio # No need backend-as-service support -skip qtgamepad # No need gamepad hardware support. -skip qtgraphicaleffects # Advanced graphical effects in GUI -skip qtlocation # No need geolocation -skip qtquickcontrols2 # QtQuick support for QML -skip qtmultimedia # No need multimedia support (replaced by QtAV+ffmpeg) -skip qtnetworkauth # No need network authentification support. -skip qtpurchasing # No need in-app purchase of products support -skip qtremoteobjects # No need sharing QObject properties between processes support -skip qtserialport # No need serial port support -skip qtscxml # No need SCXML state machines support -skip qtsensors # For embeded devices only -skip qtspeech # No need speech synthesis support -skip qttranslations # No need translation tools. -skip qtvirtualkeyboard # No need virtual keyboard support -skip qtwayland # Specific to Linux -skip qtwebsockets # No need websocket support -skip qtwebview # QML extension for QWebEngine -skip qtwebglplugin # No need browser OpenGL extention support -# -skip qtwebengine # No need Chromium browser support (QtWebkit instead) -# -skip qtwebchannel # QtWebChannel support ==> QWebEngine dependency -# -skip qtquickcontrols # QtQuick support ==> QWebEngine dependency + -skip qtwebengine # No need Chromium browser support (QtWebkit instead) + -skip qtwebchannel # QtWebChannel support ==> QWebEngine dependency + -skip qtquickcontrols # QtQuick support ==> QWebEngine dependency ) MESSAGE(STATUS "Use Linux ${QT_VERSION} configuration:") MESSAGE(STATUS ${QT_CONFIG}) diff --git a/project/bundles/3rdparty/ext_qt.master/config-5.12.2-linux.cmake b/project/bundles/3rdparty/ext_qt/config-5.12.2-linux.cmake similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/config-5.12.2-linux.cmake rename to project/bundles/3rdparty/ext_qt/config-5.12.2-linux.cmake diff --git a/project/bundles/3rdparty/ext_qt.master/config-5.6.3-linux.cmake b/project/bundles/3rdparty/ext_qt/config-5.6.3-linux.cmake similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/config-5.6.3-linux.cmake rename to project/bundles/3rdparty/ext_qt/config-5.6.3-linux.cmake diff --git a/project/bundles/3rdparty/ext_qt.master/config-5.9.7-linux.cmake b/project/bundles/3rdparty/ext_qt/config-5.9.7-linux.cmake similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/config-5.9.7-linux.cmake rename to project/bundles/3rdparty/ext_qt/config-5.9.7-linux.cmake diff --git a/project/bundles/3rdparty/ext_qt.master/configure-5.10.1-linux.txt b/project/bundles/3rdparty/ext_qt/configure-5.10.1-linux.txt similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/configure-5.10.1-linux.txt rename to project/bundles/3rdparty/ext_qt/configure-5.10.1-linux.txt diff --git a/project/bundles/3rdparty/ext_qt.master/configure-5.11.3-linux.txt b/project/bundles/3rdparty/ext_qt/configure-5.11.3-linux.txt similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/configure-5.11.3-linux.txt rename to project/bundles/3rdparty/ext_qt/configure-5.11.3-linux.txt diff --git a/project/bundles/3rdparty/ext_qt.master/configure-5.12.2-linux.txt b/project/bundles/3rdparty/ext_qt/configure-5.12.2-linux.txt similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/configure-5.12.2-linux.txt rename to project/bundles/3rdparty/ext_qt/configure-5.12.2-linux.txt diff --git a/project/bundles/3rdparty/ext_qt.master/configure-5.6.3-linux.txt b/project/bundles/3rdparty/ext_qt/configure-5.6.3-linux.txt similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/configure-5.6.3-linux.txt rename to project/bundles/3rdparty/ext_qt/configure-5.6.3-linux.txt diff --git a/project/bundles/3rdparty/ext_qt.master/configure-5.9.7-linux.txt b/project/bundles/3rdparty/ext_qt/configure-5.9.7-linux.txt similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/configure-5.9.7-linux.txt rename to project/bundles/3rdparty/ext_qt/configure-5.9.7-linux.txt diff --git a/project/bundles/3rdparty/ext_qt/qt-appimage-support.patch b/project/bundles/3rdparty/ext_qt/qt-appimage-support.patch deleted file mode 100644 index a5f165569f..0000000000 --- a/project/bundles/3rdparty/ext_qt/qt-appimage-support.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/qtbase/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp -index cb1e367b9f..f798cc0c62 100644 ---- a/qtbase/src/platformsupport/services/genericunix/qgenericunixservices.cpp -+++ b/qtbase/src/platformsupport/services/genericunix/qgenericunixservices.cpp -@@ -164,7 +164,30 @@ static inline bool launch(const QString &launcher, const QUrl &url) - #if !QT_CONFIG(process) - const bool ok = ::system(qPrintable(command + QLatin1String(" &"))); - #else -- const bool ok = QProcess::startDetached(command); -+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); -+ -+ // If we are running into AppImage bundle, switch env var to the right values. -+ if (env.contains(QLatin1String("APPIMAGE_ORIGINAL_LD_LIBRARY_PATH")) && -+ env.contains(QLatin1String("APPIMAGE_ORIGINAL_QT_PLUGIN_PATH")) && -+ env.contains(QLatin1String("APPIMAGE_ORIGINAL_XDG_DATA_DIRS")) && -+ env.contains(QLatin1String("APPIMAGE_ORIGINAL_PATH"))) -+ { -+ qDebug() << "Adjusting environment variables for AppImage bundle"; -+ -+ env.insert(QLatin1String("LD_LIBRARY_PATH"), -+ env.value(QLatin1String("APPIMAGE_ORIGINAL_LD_LIBRARY_PATH"))); -+ env.insert(QLatin1String("QT_PLUGIN_PATH"), -+ env.value(QLatin1String("APPIMAGE_ORIGINAL_QT_PLUGIN_PATH"))); -+ env.insert(QLatin1String("XDG_DATA_DIRS"), -+ env.value(QLatin1String("APPIMAGE_ORIGINAL_XDG_DATA_DIRS"))); -+ env.insert(QLatin1String("PATH"), -+ env.value(QLatin1String("APPIMAGE_ORIGINAL_PATH"))); -+ } -+ -+ QProcess process; -+ process.setProcessEnvironment(env); -+ process.setProgram(command); -+ const bool ok = process.startDetached(); - #endif - if (!ok) - qWarning("Launch failed (%s)", qPrintable(command)); diff --git a/project/bundles/3rdparty/ext_qt.master/qt5101-appimage-support.patch b/project/bundles/3rdparty/ext_qt/qt5101-appimage-support.patch similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/qt5101-appimage-support.patch rename to project/bundles/3rdparty/ext_qt/qt5101-appimage-support.patch diff --git a/project/bundles/3rdparty/ext_qt.master/qt5113-appimage-support.patch b/project/bundles/3rdparty/ext_qt/qt5113-appimage-support.patch similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/qt5113-appimage-support.patch rename to project/bundles/3rdparty/ext_qt/qt5113-appimage-support.patch diff --git a/project/bundles/3rdparty/ext_qt.master/qt5122-appimage-support.patch b/project/bundles/3rdparty/ext_qt/qt5122-appimage-support.patch similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/qt5122-appimage-support.patch rename to project/bundles/3rdparty/ext_qt/qt5122-appimage-support.patch diff --git a/project/bundles/3rdparty/ext_qt.master/qt563-appimage-support.patch b/project/bundles/3rdparty/ext_qt/qt563-appimage-support.patch similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/qt563-appimage-support.patch rename to project/bundles/3rdparty/ext_qt/qt563-appimage-support.patch diff --git a/project/bundles/3rdparty/ext_qt.master/qt597-appimage-support.patch b/project/bundles/3rdparty/ext_qt/qt597-appimage-support.patch similarity index 100% rename from project/bundles/3rdparty/ext_qt.master/qt597-appimage-support.patch rename to project/bundles/3rdparty/ext_qt/qt597-appimage-support.patch diff --git a/project/bundles/appimage.master/01-build-centos6.sh b/project/bundles/appimage.master/01-build-centos6.sh deleted file mode 100755 index d2a5a28233..0000000000 --- a/project/bundles/appimage.master/01-build-centos6.sh +++ /dev/null @@ -1,290 +0,0 @@ -#!/bin/bash - -# Script to build a CentOS 6 installation to compile an AppImage bundle of digiKam. -# This script must be run as sudo -# -# Copyright (c) 2015-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -# Halt and catch errors -set -eE -trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG -trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR - -################################################################################################# -# Manage script traces to log file - -mkdir -p ./logs -exec > >(tee ./logs/build-centos6.full.log) 2>&1 - -################################################################################################# - -echo "01-build-centos6.sh : build a CentOS 6 installation to compile an AppImage of digiKam." -echo "--------------------------------------------------------------------------------------" - -################################################################################################# -# Pre-processing checks - -. ./config.sh -. ./common.sh -ChecksRunAsRoot -StartScript -ChecksCPUCores -CentOS6Adjustments -ORIG_WD="`pwd`" - -################################################################################################# - -echo -e "---------- Update Linux CentOS 6\n" - -yum -y install epel-release - -if [[ "$(arch)" = "x86_64" ]] ; then - - yum upgrade ca-certificates --disablerepo=epel - -fi - -if [[ ! -f /etc/yum.repos.d/epel.repo ]] ; then - - yum install epel-release - - # we need to be up to date in order to install the xcb-keysyms dependency - yum -y update -fi - -################################################################################################# - -echo -e "---------- Install New Development Packages\n" - -# Packages for base dependencies and Qt5. -yum -y install wget \ - tar \ - bzip2 \ - gettext \ - git \ - subversion \ - libtool \ - which \ - fuse \ - automake \ - mesa-libEGL \ - cmake3 \ - gcc-c++ \ - patch \ - libxcb \ - libxcb-devel \ - xcb-util \ - xcb-util-keysyms-devel \ - xcb-util-devel \ - xcb-util-image-devel \ - xcb-util-renderutil-devel \ - xcb-util-wm-devel \ - xkeyboard-config \ - gperf \ - bison \ - flex \ - zlib-devel \ - expat-devel \ - fuse-devel \ - libtool-ltdl-devel \ - glib2-devel \ - glibc-headers \ - mysql-devel \ - eigen3-devel \ - cppunit-devel \ - libstdc++-devel \ - libxml2-devel \ - libstdc++-devel \ - libXrender-devel \ - lcms2-devel \ - libXi-devel \ - mesa-libGL-devel \ - mesa-libGLU-devel \ - glibc-devel \ - libudev-devel \ - libuuid-devel \ - sqlite-devel \ - libusb-devel \ - libexif-devel \ - libical-devel \ - libxslt-devel \ - xz-devel \ - lz4-devel \ - inotify-tools-devel \ - cups-devel \ - openal-soft-devel \ - openssl-devel \ - libical-devel \ - libcap-devel \ - libicu-devel \ - libXScrnSaver-devel \ - mesa-libEGL-devel \ - patchelf \ - dpkg - -################################################################################################# -if [ ] ; then - -if [[ ! -f /etc/yum.repos.d/mlampe-python2.7_epel6.repo ]] ; then - - echo -e "---------- Install New Python Interpreter\n" - - cd /etc/yum.repos.d - wget https://copr.fedorainfracloud.org/coprs/g/python/python2.7_epel6/repo/epel-6/mlampe-python2.7_epel6.repo - yum -y --nogpgcheck install python2.7 - -fi - -if [[ ! -f /opt/rh/rh-ruby24/enable ]] ; then - - echo -e "---------- Install New Ruby Interpreter\n" - - yum -y install centos-release-scl-rh centos-release-scl - yum -y --nogpgcheck install rh-ruby24 - -fi -fi -if [[ ! -f /etc/yum.repos.d/mlampe-devtoolset-4.1-epel-6.repo ]] ; then - - echo -e "---------- Install New Compiler Tools Set\n" - - cd /etc/yum.repos.d - wget https://copr.fedorainfracloud.org/coprs/mlampe/devtoolset-4.1/repo/epel-6/mlampe-devtoolset-4.1-epel-6.repo - yum -y --nogpgcheck install devtoolset-4-gcc devtoolset-4-gcc-c++ - -fi - -################################################################################################# - -# Install new repo to get ffmpeg dependencies - -if [[ ! -f /etc/yum.repos.d/nux-dextop.repo ]] ; then - - echo -e "---------- Install Repository for ffmpeg packages\n" - - if [[ "$(arch)" = "x86_64" ]] ; then - - rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro - rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm - - else - - rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro - rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/i386/nux-dextop-release-0-2.el6.nux.noarch.rpm - - fi - -fi - -yum -y install fdk-aac-devel \ - faac-devel \ - lame-devel \ - opencore-amr-devel \ - opus-devel \ - librtmp-devel \ - speex-devel \ - libtheora-devel \ - libvorbis-devel \ - libvpx-devel \ - x264-devel \ - x265-devel \ - xvidcore-devel \ - yasm \ - fribidi-devel - -################################################################################################# - -echo -e "---------- Clean-up Old Packages\n" - -# Remove system based devel package to prevent conflict with new one. -yum -y erase qt-devel \ - boost-devel \ - libgphoto2 \ - sane-backends \ - libjpeg-devel \ - jasper-devel \ - libpng-devel \ - libtiff-devel \ - ffmpeg \ - ffmpeg-devel \ - ant \ - pulseaudio-libs-devel - -################################################################################################# - -echo -e "---------- Prepare CentOS to Compile Extra Dependencies\n" - -# Workaround for: On CentOS 6, .pc files in /usr/lib/pkgconfig are not recognized -# However, this is where .pc files get installed when bulding libraries... (FIXME) -# I found this by comparing the output of librevenge's "make install" command -# between Ubuntu and CentOS 6 -ln -sf /usr/share/pkgconfig /usr/lib/pkgconfig - -# Make sure we build from the /, parts of this script depends on that. We also need to run as root... -cd / - -# Create the working directories. - -if [ ! -d $BUILDING_DIR ] ; then - mkdir -p $BUILDING_DIR -fi -if [ ! -d $DOWNLOAD_DIR ] ; then - mkdir -p $DOWNLOAD_DIR -fi -if [ ! -d $INSTALL_DIR ] ; then - mkdir -p $INSTALL_DIR -fi - - -# enable new compiler -. /opt/rh/devtoolset-4/enable - -# enable new Ruby interpreter -#. /opt/rh/rh-ruby24/enable - -################################################################################################# -# Low level libraries dependencies -# NOTE: The order to compile each component here is very important. - -cd $BUILDING_DIR - -rm -rf $BUILDING_DIR/* || true - -cmake3 $ORIG_WD/../3rdparty \ - -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \ - -DINSTALL_ROOT=$INSTALL_DIR \ - -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR - -# --- digiKam dependencies stage1 ------------- - -cmake3 --build . --config RelWithDebInfo --target ext_jpeg -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_jasper -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_png -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_tiff -- -j$CPU_CORES -#cmake3 --build . --config RelWithDebInfo --target ext_openssl -- -j$CPU_CORES -#cmake3 --build . --config RelWithDebInfo --target ext_freetype -- -j$CPU_CORES -#cmake3 --build . --config RelWithDebInfo --target ext_fontconfig -- -j$CPU_CORES # depend of freetype -#cmake3 --build . --config RelWithDebInfo --target ext_libicu -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_qt -- -j$CPU_CORES # depend of fontconfig, freetype, libtiff, libjpeg, libpng - -# --- digiKam dependencies stage2 ------------- - -cmake3 --build . --config RelWithDebInfo --target ext_boost -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_libass -- -j$CPU_CORES # depend of fontconfig -cmake3 --build . --config RelWithDebInfo --target ext_ffmpeg -- -j$CPU_CORES # depend of libass -cmake3 --build . --config RelWithDebInfo --target ext_qtav -- -j$CPU_CORES # depend of qt and ffmpeg -cmake3 --build . --config RelWithDebInfo --target ext_libgphoto2 -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_sane -- -j$CPU_CORES # depend of libgphoto2 -cmake3 --build . --config RelWithDebInfo --target ext_exiv2 -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_opencv -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_lensfun -- -j$CPU_CORES -#cmake3 --build . --config RelWithDebInfo --target ext_liblqr -- -j$CPU_CORES -#cmake3 --build . --config RelWithDebInfo --target ext_linuxdeployqt -- -j$CPU_CORES # depend of qt - -################################################################################################# - -TerminateScript diff --git a/project/bundles/appimage.master/02-build-extralibs.sh b/project/bundles/appimage.master/02-build-extralibs.sh deleted file mode 100755 index 2cdcc6493a..0000000000 --- a/project/bundles/appimage.master/02-build-extralibs.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -# Script to build extra libraries using CentOS 6. -# This script must be run as sudo -# -# Copyright (c) 2015-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -# Halt and catch errors -set -eE -trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG -trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR - -################################################################################################# -# Manage script traces to log file - -mkdir -p ./logs -exec > >(tee ./logs/build-extralibs.full.log) 2>&1 - -################################################################################################# - -echo "02-build-extralibs.sh : build extra libraries under CentoOS 6." -echo "--------------------------------------------------------------" - -################################################################################################# -# Pre-processing checks - -. ./config.sh -. ./common.sh -ChecksRunAsRoot -StartScript -ChecksCPUCores -CentOS6Adjustments -. /opt/rh/devtoolset-4/enable - -ORIG_WD="`pwd`" - -################################################################################################# - -cd $BUILDING_DIR - -rm -rf $BUILDING_DIR/* || true - -cmake3 $ORIG_WD/../3rdparty \ - -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \ - -DINSTALL_ROOT=$INSTALL_DIR \ - -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR - -# NOTE: The order to compile each component here is very important. - -# core KF5 frameworks dependencies -cmake3 --build . --config RelWithDebInfo --target ext_extra-cmake-modules -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kconfig -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_breeze-icons -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kcoreaddons -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kwindowsystem -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_solid -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_threadweaver -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_karchive -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kdbusaddons -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_ki18n -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kcrash -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kcodecs -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kauth -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kguiaddons -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kwidgetsaddons -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kitemviews -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kcompletion -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kconfigwidgets -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kiconthemes -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kservice -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kglobalaccel -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kxmlgui -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kbookmarks -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kimageformats -- -j$CPU_CORES - -# Extra support for digiKam - -# libksane support -cmake3 --build . --config RelWithDebInfo --target ext_libksane -- -j$CPU_CORES - -# Desktop integration support -cmake3 --build . --config RelWithDebInfo --target ext_kjobwidgets -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_kio -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_knotifyconfig -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_knotifications -- -j$CPU_CORES - -# Geolocation support -cmake3 --build . --config RelWithDebInfo --target ext_marble -- -j$CPU_CORES - -# Calendar support -cmake3 --build . --config RelWithDebInfo --target ext_kcalcore -- -j$CPU_CORES - -################################################################################################# - -TerminateScript - diff --git a/project/bundles/appimage.master/03-build-digikam.sh b/project/bundles/appimage.master/03-build-digikam.sh deleted file mode 100755 index 7638c5269e..0000000000 --- a/project/bundles/appimage.master/03-build-digikam.sh +++ /dev/null @@ -1,163 +0,0 @@ -#! /bin/bash - -# Script to build digiKam under Linux -# This script must be run as sudo -# -# Copyright (c) 2015-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -# Halt and catch errors -set -eE -trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG -trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR - -if [ "root" != "$USER" ]; then - echo "This script must be run as root..." - exit -fi - -################################################################################################# -# Manage script traces to log file - -mkdir -p ./logs -exec > >(tee ./logs/build-digikam.full.log) 2>&1 - -################################################################################################# - -echo "03-build-digikam.sh : build digiKam using CentOS 6." -echo "---------------------------------------------------" - -################################################################################################# -# Pre-processing checks - -. ./config.sh -. ./common.sh -ChecksRunAsRoot -StartScript -ChecksCPUCores -CentOS6Adjustments -. /opt/rh/devtoolset-4/enable - -################################################################################################# - -# Pathes rules -ORIG_PATH="$PATH" -ORIG_WD="`pwd`" - -################################################################################################# -# Build digiKam in temporary directory and installation - -if [ -d "$DK_BUILDTEMP/digikam-$DK_VERSION" ] ; then - - echo "---------- Updating existing $DK_BUILDTEMP" - - cd "$DK_BUILDTEMP" - cd digikam-$DK_VERSION - - git reset --hard - git pull - - mkdir -p build - cd build - -else - - echo "---------- Creating $DK_BUILDTEMP" - mkdir -p "$DK_BUILDTEMP" - - if [ $? -ne 0 ] ; then - echo "---------- Cannot create $DK_BUILDTEMP directory." - echo "---------- Aborting..." - exit; - fi - - cd "$DK_BUILDTEMP" - echo -e "\n\n" - echo "---------- Downloading digiKam $DK_VERSION" - - git clone --progress --verbose $DK_GITURL digikam-$DK_VERSION - cd digikam-$DK_VERSION - export GITSLAVE=".gitslave.bundle" - ./download-repos - - if [ $? -ne 0 ] ; then - echo "---------- Cannot clone repositories." - echo "---------- Aborting..." - exit; - fi - - git checkout $DK_VERSION - - mkdir build - cd build - -fi - -echo -e "\n\n" -echo "---------- Configure digiKam $DK_VERSION" - -cmake3 -G "Unix Makefiles" .. \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ - -DCMAKE_LIBRARY_PATH=$INSTALL_DIR/lib \ - -DBUILD_TESTING=OFF \ - -DDIGIKAMSC_CHECKOUT_PO=ON \ - -DDIGIKAMSC_CHECKOUT_DOC=OFF \ - -DDIGIKAMSC_COMPILE_PO=ON \ - -DDIGIKAMSC_COMPILE_DOC=OFF \ - -DDIGIKAMSC_COMPILE_DIGIKAM=ON \ - -DDIGIKAMSC_COMPILE_LIBKSANE=OFF \ - -DDIGIKAMSC_COMPILE_LIBMEDIAWIKI=ON \ - -DDIGIKAMSC_COMPILE_LIBKVKONTAKTE=OFF \ - -DENABLE_KFILEMETADATASUPPORT=OFF \ - -DENABLE_AKONADICONTACTSUPPORT=OFF \ - -DENABLE_MYSQLSUPPORT=ON \ - -DENABLE_INTERNALMYSQL=ON \ - -DENABLE_MEDIAPLAYER=ON \ - -DENABLE_DBUS=ON \ - -DENABLE_APPSTYLES=ON \ - -DENABLE_QWEBENGINE=OFF \ - -DENABLE_KIO=OFF \ - -DENABLE_LEGACY=OFF \ - -Wno-dev - -if [ $? -ne 0 ]; then - echo "---------- Cannot configure digiKam $DK_VERSION." - echo "---------- Aborting..." - exit; -fi - -cat ../build/core/app/utils/digikam_version.h | grep "digikam_version\[\]" | awk '{print $6}' | tr -d '";' > $ORIG_WD/data/RELEASEID.txt - -echo -e "\n\n" -echo "---------- Building digiKam $DK_VERSION" - -make -j$CPU_CORES - -if [ $? -ne 0 ]; then - echo "---------- Cannot compile digiKam $DK_VERSION." - echo "---------- Aborting..." - exit; -fi - -echo -e "\n\n" -echo "---------- Installing digiKam $DK_VERSION" -echo -e "\n\n" - -make install/fast && cd "$ORIG_WD" && rm -rf "$DK_BUILDTEMP" - -if [ $? -ne 0 ]; then - echo "---------- Cannot install digiKam $DK_VERSION." - echo "---------- Aborting..." - exit; -fi - -################################################################################################# - -export PATH=$ORIG_PATH - -TerminateScript - diff --git a/project/bundles/appimage.master/04-build-appimage.sh b/project/bundles/appimage.master/04-build-appimage.sh deleted file mode 100755 index efbe7d71b8..0000000000 --- a/project/bundles/appimage.master/04-build-appimage.sh +++ /dev/null @@ -1,504 +0,0 @@ -#!/bin/bash - -# Script to bundle data using previously-built KF5 with digiKam installation -# and create a Linux AppImage bundle file. -# -# Copyright (c) 2015-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -# Halt and catch errors -set -eE -trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG -trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR - -if [ "root" != "$USER" ]; then - echo "This script must be run as root..." - exit -fi - -if [[ "$(arch)" = "x86_64" ]] ; then - - LIB_PATH_ALT=lib64 - -else - - LIB_PATH_ALT=lib - -fi - -################################################################################################# -# Manage script traces to log file - -mkdir -p ./logs -exec > >(tee ./logs/build-appimage.full.log) 2>&1 - -################################################################################################# - -echo "04-build-appimage.sh : build digiKam AppImage bundle." -echo "-----------------------------------------------------" - -################################################################################################# -# Pre-processing checks - -. ./config.sh -. ./common.sh -ChecksRunAsRoot -StartScript -ChecksCPUCores -CentOS6Adjustments -. /opt/rh/devtoolset-4/enable - -################################################################################################# - -# Working directory -ORIG_WD="`pwd`" - -DK_RELEASEID=`cat $ORIG_WD/data/RELEASEID.txt` - -################################################################################################# - -echo -e "---------- Build icons-set ressource\n" - -cd $ORIG_WD/icon-rcc - -rm -f CMakeCache.txt > /dev/null - -cmake3 -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ - -DCMAKE_BUILD_TYPE=debug \ - -DCMAKE_COLOR_MAKEFILE=ON \ - -Wno-dev \ - . - -make -j$CPU_CORES - -################################################################################################# - -echo -e "---------- Prepare directories in bundle\n" - -# Make sure we build from the /, parts of this script depends on that. We also need to run as root... -cd / - -# Prepare the install location -rm -rf $APP_IMG_DIR/ || true -mkdir -p $APP_IMG_DIR/usr/bin -mkdir -p $APP_IMG_DIR/usr/etc -mkdir -p $APP_IMG_DIR/usr/share -mkdir -p $APP_IMG_DIR/usr/share/icons -mkdir -p $APP_IMG_DIR/usr/share/metainfo -mkdir -p $APP_IMG_DIR/usr/share/dbus-1/interfaces -mkdir -p $APP_IMG_DIR/usr/share/dbus-1/services - -# make sure lib and lib64 are the same thing -mkdir -p $APP_IMG_DIR/usr/lib -mkdir -p $APP_IMG_DIR/usr/lib/libexec -mkdir -p $APP_IMG_DIR/usr/lib/libgphoto2 -mkdir -p $APP_IMG_DIR/usr/lib/libgphoto2_port -cd $APP_IMG_DIR/usr -ln -s lib lib64 - -################################################################################################# - -echo -e "---------- Copy Files in bundle\n" - -cd $APP_IMG_DIR - -# FIXME: How to find out which subset of plugins is really needed? I used strace when running the binary -cp -r $INSTALL_DIR/plugins ./usr/ -rm -fr ./usr/plugins/ktexteditor -rm -fr ./usr/plugins/kf5/parts -rm -fr ./usr/plugins/konsolepart.so - -# copy runtime data files -cp -r $INSTALL_DIR/share/digikam ./usr/share -cp -r $INSTALL_DIR/share/showfoto ./usr/share -cp $ORIG_WD/icon-rcc/breeze.rcc ./usr/share/digikam -cp $ORIG_WD/icon-rcc/breeze-dark.rcc ./usr/share/digikam - -cd $APP_IMG_DIR/usr/share/showfoto -ln -s ../digikam/breeze.rcc breeze.rcc -ln -s ../digikam/breeze-dark.rcc breeze-dark.rcc - -cd $APP_IMG_DIR -cp $ORIG_WD/data/qt.conf ./usr/bin -cp -r $INSTALL_DIR/share/lensfun ./usr/share -cp -r $INSTALL_DIR/share/knotifications5 ./usr/share -cp -r $INSTALL_DIR/share/kservices5 ./usr/share -cp -r $INSTALL_DIR/share/kservicetypes5 ./usr/share -cp -r $INSTALL_DIR/share/kxmlgui5 ./usr/share -cp -r $INSTALL_DIR/share/kf5 ./usr/share -cp -r $INSTALL_DIR/share/solid ./usr/share -cp -r $INSTALL_DIR/share/OpenCV ./usr/share -cp -r $INSTALL_DIR/share/dbus-1/interfaces/kf5* ./usr/share/dbus-1/interfaces/ -cp -r $INSTALL_DIR/share/dbus-1/services/*kde* ./usr/share/dbus-1/services/ -cp -r $INSTALL_DIR/lib/libexec/kf5 ./usr/lib/libexec/ - -# AppImage stream data file -cp -r $INSTALL_DIR/share/metainfo/org.kde.digikam.appdata.xml ./usr/share/metainfo/digikam.appdata.xml -cp -r $INSTALL_DIR/share/metainfo/org.kde.showfoto.appdata.xml ./usr/share/metainfo/showfoto.appdata.xml - -# QWebEngine bin data files. -[[ -e $INSTALL_DIR/ressources ]] && cp -r $INSTALL_DIR/resources ./usr/ - -# copy libgphoto2 drivers -find $INSTALL_DIR/lib/libgphoto2 -name "*.so" -type f -exec cp {} ./usr/lib/libgphoto2 \; 2>/dev/null -find $INSTALL_DIR/lib/libgphoto2_port -name "*.so" -type f -exec cp {} ./usr/lib/libgphoto2_port \; 2>/dev/null - -# copy sane backends - -cp -r $INSTALL_DIR/lib/sane ./usr/lib -cp -r $INSTALL_DIR/etc/sane.d ./usr/etc - -# copy i18n - -# Qt translations files -if [[ -e $INSTALL_DIR/translations ]]; then - - cp -r $INSTALL_DIR/translations ./usr - # optimizations - rm ./usr/translations/assistant* - rm ./usr/translations/designer* - rm ./usr/translations/linguist* - rm ./usr/translations/qmlviewer* - rm ./usr/translations/qtmultimedia* - rm ./usr/translations/qtscript* - rm ./usr/translations/qtquick* - rm ./usr/translations/qt_help* - rm ./usr/translations/qtserialport* - rm ./usr/translations/qtwebsockets* - -fi - -# KF5 translations files -FILES=$(cat $ORIG_WD/logs/build-extralibs.full.log | grep $INSTALL_DIR/share/locale | grep -e .qm -e .mo | cut -d' ' -f3) - -for FILE in $FILES ; do - cp --parents $FILE ./ -done - -# digiKam translations files -FILES=$(cat $ORIG_WD/logs/build-digikam.full.log | grep $INSTALL_DIR/share/locale | grep -e .qm -e .mo | cut -d' ' -f3) - -for FILE in $FILES ; do - cp --parents $FILE ./ -done - -# digiKam icons files -FILES=$(cat $ORIG_WD/logs/build-digikam.full.log | grep $INSTALL_DIR/share/icons/ | cut -d' ' -f3) - -for FILE in $FILES ; do - cp --parents $FILE ./ -done - -# Marble data and plugins files - -cp -r $INSTALL_DIR/lib/marble/plugins/ ./usr/bin/ - -cp -r $INSTALL_DIR/share/marble/data ./usr/bin/ - -# otherwise segfaults!? -cp $(ldconfig -p | grep /usr/$LIB_PATH_ALT/libsasl2.so.2 | cut -d ">" -f 2 | xargs) ./usr/lib/ -cp $(ldconfig -p | grep /usr/$LIB_PATH_ALT/libGL.so.1 | cut -d ">" -f 2 | xargs) ./usr/lib/ -cp $(ldconfig -p | grep /usr/$LIB_PATH_ALT/libGLU.so.1 | cut -d ">" -f 2 | xargs) ./usr/lib/ - -# Fedora 23 seemed to be missing SOMETHING from the Centos 6.7. The only message was: -# This application failed to start because it could not find or load the Qt platform plugin "xcb". -# Setting export QT_DEBUG_PLUGINS=1 revealed the cause. -# QLibraryPrivate::loadPlugin failed on "/usr/lib64/qt5/plugins/platforms/libqxcb.so" : -# "Cannot load library /usr/lib64/qt5/plugins/platforms/libqxcb.so: (/lib64/libEGL.so.1: undefined symbol: drmGetNodeTypeFromFd)" -# Which means that we have to copy libEGL.so.1 in too - -# Otherwise F23 cannot load the Qt platform plugin "xcb" -cp $(ldconfig -p | grep /usr/$LIB_PATH_ALT/libEGL.so.1 | cut -d ">" -f 2 | xargs) ./usr/lib/ - -# let's not copy xcb itself, that breaks on dri3 systems https://bugs.kde.org/show_bug.cgi?id=360552 -#cp $(ldconfig -p | grep libxcb.so.1 | cut -d ">" -f 2 | xargs) ./usr/lib/ - -# For Fedora 20 -#######cp $(ldconfig -p | grep $INSTALL_DIR/lib/libfreetype.so.6 | cut -d ">" -f 2 | xargs) ./usr/lib/ - -cp $INSTALL_DIR/bin/digikam ./usr/bin -cp $INSTALL_DIR/bin/showfoto ./usr/bin -cp $INSTALL_DIR/bin/kbuildsycoca5 ./usr/bin -cp $INSTALL_DIR/bin/solid-hardware5 ./usr/bin - -# QWebEngine runtime process -[[ -e $INSTALL_DIR/libexec/QtWebEngineProcess ]] && cp $INSTALL_DIR/libexec/QtWebEngineProcess ./usr/bin - -# For Solid action when camera is connected to computer -cp $INSTALL_DIR/bin/qdbus ./usr/share/digikam/utils -sed -i "/Exec=/c\Exec=digikam-camera downloadFromUdi %i" ./usr/share/solid/actions/digikam-opencamera.desktop - -################################################################################################# - -echo -e "---------- Scan dependencies recurssively\n" - -CopyReccursiveDependencies $INSTALL_DIR/bin/digikam ./usr/lib -CopyReccursiveDependencies $INSTALL_DIR/bin/showfoto ./usr/lib -CopyReccursiveDependencies $INSTALL_DIR/plugins/platforms/libqxcb.so ./usr/lib - -FILES=$(ls $INSTALL_DIR/lib/libdigikam*.so) - -for FILE in $FILES ; do - CopyReccursiveDependencies ${FILE} ./usr/lib -done - -FILES=$(ls $INSTALL_DIR/plugins/imageformats/*.so) - -for FILE in $FILES ; do - CopyReccursiveDependencies ${FILE} ./usr/lib -done - -# Copy in the indirect dependencies -FILES=$(find . -type f -executable) - -for FILE in $FILES ; do - CopyReccursiveDependencies ${FILE} ./usr/lib -done - -################################################################################################# - -echo -e "---------- Clean-up Bundle Directory Contents\n" - -ln -s libssl.so.10 usr/lib/libssl.so || true - -# The following are assumed to be part of the base system -rm -f usr/lib/libcom_err.so.2 || true -rm -f usr/lib/libcrypt.so.1 || true -rm -f usr/lib/libdl.so.2 || true -rm -f usr/lib/libexpat.so.1 || true -rm -f usr/lib/libgcc_s.so.1 || true -rm -f usr/lib/libglib-2.0.so.0 || true -rm -f usr/lib/libgpg-error.so.0 || true -rm -f usr/lib/libgssapi_krb5.so.2 || true -rm -f usr/lib/libgssapi.so.3 || true -rm -f usr/lib/libhcrypto.so.4 || true -rm -f usr/lib/libheimbase.so.1 || true -rm -f usr/lib/libheimntlm.so.0 || true -rm -f usr/lib/libhx509.so.5 || true -rm -f usr/lib/libICE.so.6 || true -rm -f usr/lib/libidn.so.11 || true -rm -f usr/lib/libk5crypto.so.3 || true -rm -f usr/lib/libkeyutils.so.1 || true -rm -f usr/lib/libkrb5.so.26 || true -rm -f usr/lib/libkrb5.so.3 || true -rm -f usr/lib/libkrb5support.so.0 || true -# rm -f usr/lib/liblber-2.4.so.2 || true # needed for debian wheezy -# rm -f usr/lib/libldap_r-2.4.so.2 || true # needed for debian wheezy -rm -f usr/lib/libm.so.6 || true -rm -f usr/lib/libp11-kit.so.0 || true -rm -f usr/lib/libpcre.so.3 || true -rm -f usr/lib/libpthread.so.0 || true -rm -f usr/lib/libresolv.so.2 || true -rm -f usr/lib/libroken.so.18 || true -rm -f usr/lib/librt.so.1 || true -rm -f usr/lib/libsasl2.so.2 || true -rm -f usr/lib/libSM.so.6 || true -rm -f usr/lib/libusb-1.0.so.0 || true -rm -f usr/lib/libuuid.so.1 || true -rm -f usr/lib/libwind.so.0 || true -rm -f usr/lib/libfontconfig.so.* || true -# Remove this library, else appimage cannot be started properly (Bug #390162) -rm -f usr/lib/libopenal.so.1 || true - -# Remove these libraries, we need to use the system versions; this means 11.04 is not supported (12.04 is our baseline) -rm -f usr/lib/libGL.so.* || true -rm -f usr/lib/libdrm.so.* || true -rm -f usr/lib/libX11.so.* || true -rm -f usr/lib/libz.so.1 || true - -# These seem to be available on most systems but not Ubuntu 11.04 -# rm -f usr/lib/libffi.so.6 usr/lib/libGL.so.1 usr/lib/libglapi.so.0 usr/lib/libxcb.so.1 usr/lib/libxcb-glx.so.0 || true - -# Delete potentially dangerous libraries -rm -f usr/lib/libstdc* usr/lib/libgobject* usr/lib/libc.so.* || true -rm -f usr/lib/libxcb.so.1 - -# Do NOT delete libX* because otherwise on Ubuntu 11.04: -# loaded library "Xcursor" malloc.c:3096: sYSMALLOc: Assertion (...) Aborted - -# We don't bundle the developer stuff -rm -rf usr/include || true -rm -rf usr/lib/cmake3 || true -rm -rf usr/lib/pkgconfig || true -rm -rf usr/share/ECM/ || true -rm -rf usr/share/gettext || true -rm -rf usr/share/pkgconfig || true - -################################################################################################# - -echo -e "---------- Strip Binaries Files \n" - -if [[ $DK_DEBUG = 1 ]] ; then - FILES=$(find . -type f -executable | grep -Ev '(digikam|showfoto|exiv2)') -else - FILES=$(find . -type f -executable) -fi - -for FILE in $FILES ; do - echo -e "Strip symbols in: $FILE" - strip ${FILE} 2>/dev/null || true -done - -################################################################################################# - -echo -e "---------- Strip Configuration Files \n" - -# Since we set $APP_IMG_DIR as the prefix, we need to patch it away too (FIXME) -# Probably it would be better to use /app as a prefix because it has the same length for all apps -cd usr/ ; find . -type f -exec sed -i -e 's|$APP_IMG_DIR/usr/|./././././././././|g' {} \; ; cd .. - -# On openSUSE Qt is picking up the wrong libqxcb.so -# (the one from the system when in fact it should use the bundled one) - is this a Qt bug? -# Also, Krita has a hardcoded /usr which we patch away -cd usr/ ; find . -type f -exec sed -i -e 's|/usr|././|g' {} \; ; cd .. - -# We do not bundle this, so let's not search that inside the AppImage. -# Fixes "Qt: Failed to create XKB context!" and lets us enter text -sed -i -e 's|././/share/X11/|/usr/share/X11/|g' ./usr/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so -sed -i -e 's|././/share/X11/|/usr/share/X11/|g' ./usr/lib/libQt5XcbQpa.so.5 - -# Workaround for: -# D-Bus library appears to be incorrectly set up; -# failed to read machine uuid: Failed to open -# The file is more commonly in /etc/machine-id -# sed -i -e 's|/var/lib/dbus/machine-id|//././././etc/machine-id|g' ./usr/lib/libdbus-1.so.3 -# or -rm -f ./usr/lib/libdbus-1.so.3 || true - -################################################################################################# - -cd / - -APP=digikam - -#if [[ $DK_DEBUG = 1 ]] ; then -# DEBUG_SUF="-debug" -#fi - -if [[ "$ARCH" = "x86_64" ]] ; then - APPIMAGE=$APP"-"$DK_RELEASEID$DK_EPOCH"-x86-64$DEBUG_SUF.appimage" -elif [[ "$ARCH" = "i686" ]] ; then - APPIMAGE=$APP"-"$DK_RELEASEID$DK_EPOCH"-i386$DEBUG_SUF.appimage" -fi - -echo -e "---------- Create Bundle with AppImage SDK stage1\n" - -# Source functions - -if [[ ! -s ./functions.sh ]] ; then - wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh -fi - -. ./functions.sh - -# Install desktopintegration in usr/bin/digikam.wrapper -cd $APP_IMG_DIR - -# We will use a dedicated bash script to run inside the AppImage to be sure that XDG_* variable are set for Qt5 -cp ${ORIG_WD}/data/AppRun ./ - -# desktop integration rules - -cp $INSTALL_DIR/share/applications/org.kde.digikam.desktop ./digikam.desktop -cp $INSTALL_DIR/share/icons/hicolor/64x64/apps/digikam.png ./digikam.png - -mkdir -p $APP_IMG_DIR/usr/share/icons/default/128x128/apps -cp -r $INSTALL_DIR/share/icons/hicolor/128x128/apps/digikam.png ./usr/share/icons/default/128x128/apps/digikam.png - -mkdir -p $APP_IMG_DIR/usr/share/icons/default/128x128/mimetypes -cp -r $INSTALL_DIR/share/icons/hicolor/128x128/apps/digikam.png ./usr/share/icons/default/128x128/mimetypes/application-vnd.digikam.png - -mkdir -p $ORIG_WD/bundle -rm -f $ORIG_WD/bundle/* || true - -echo -e "---------- Create Bundle with AppImage SDK stage2\n" - -cd / - -# Get right version of Appimage toolkit. - -if [[ "$ARCH" = "x86_64" ]] ; then - APPIMGBIN=AppImageTool-x86_64.AppImage -elif [[ "$ARCH" = "i686" ]] ; then - APPIMGBIN=AppImageTool-i686.AppImage -fi - -if [[ ! -s ./$APPIMGBIN ]] ; then - wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/$APPIMGBIN -O ./$APPIMGBIN -fi - -chmod a+x ./$APPIMGBIN - -./$APPIMGBIN $APP_IMG_DIR/ $ORIG_WD/bundle/$APPIMAGE -chmod a+rwx $ORIG_WD/bundle/$APPIMAGE - -################################################################################################# -# Show resume information and future instructions to host installer file to remote server - -echo -e "\n---------- Compute package checksums for digiKam $DK_RELEASEID\n" > $ORIG_WD/bundle/$APPIMAGE.sum -echo "File : $APPIMAGE" >> $ORIG_WD/bundle/$APPIMAGE.sum -echo -n "Size : " >> $ORIG_WD/bundle/$APPIMAGE.sum -du -h "$ORIG_WD/bundle/$APPIMAGE" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum -echo -n "MD5 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum -md5sum "$ORIG_WD/bundle/$APPIMAGE" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum -echo -n "SHA1 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum -sha1sum "$ORIG_WD/bundle/$APPIMAGE" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum -echo -n "SHA256 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum -sha256sum "$ORIG_WD/bundle/$APPIMAGE" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum - -# Checksums to post on Phabricator at release time. -sha256sum "$ORIG_WD/bundle/$APPIMAGE" > $ORIG_WD/bundle/sha256_release.sum - -if [[ $DK_SIGN = 1 ]] ; then - - cat ~/.gnupg/dkorg-gpg-pwd.txt | gpg --batch --yes --passphrase-fd 0 -sabv "$ORIG_WD/bundle/$APPIMAGE" - mv -f $ORIG_WD/bundle/$APPIMAGE.asc $ORIG_WD/bundle/$APPIMAGE.sig - - echo "File : $APPIMAGE.sig" >> $ORIG_WD/bundle/$APPIMAGE.sum - echo -n "Size : " >> $ORIG_WD/bundle/$APPIMAGE.sum - du -h "$ORIG_WD/bundle/$APPIMAGE.sig" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum - echo -n "MD5 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum - md5sum "$ORIG_WD/bundle/$APPIMAGE.sig" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum - echo -n "SHA1 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum - sha1sum "$ORIG_WD/bundle/$APPIMAGE.sig" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum - echo -n "SHA256 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum - sha256sum "$ORIG_WD/bundle/$APPIMAGE.sig" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum - - # Checksums to post on Phabricator at release time. - sha256sum "$ORIG_WD/bundle/$APPIMAGE.sig" >> $ORIG_WD/bundle/sha256_release.sum - -fi - -cat $ORIG_WD/bundle/$APPIMAGE.sum - -if [[ $DK_UPLOAD = 1 ]] ; then - - echo -e "---------- Cleanup older bundle AppImage files from files.kde.org repository \n" - - if [[ "$ARCH" = "x86_64" ]] ; then - ssh $DK_UPLOADURL rm -f $DK_UPLOADDIR*-x86-64*.appimage* - elif [[ "$ARCH" = "i686" ]] ; then - ssh $DK_UPLOADURL rm -f $DK_UPLOADDIR*-i386*.appimage* - fi - - echo -e "---------- Upload new bundle AppImage files to files.kde.org repository \n" - - scp $ORIG_WD/bundle/$APPIMAGE $DK_UPLOADURL:$DK_UPLOADDIR - scp $ORIG_WD/bundle/$APPIMAGE.sum $DK_UPLOADURL:$DK_UPLOADDIR - - if [[ $DK_SIGN = 1 ]] ; then - scp $ORIG_WD/bundle/$APPIMAGE.sig $DK_UPLOADURL:$DK_UPLOADDIR - fi - -else - echo -e "\n------------------------------------------------------------------" - curl https://download.kde.org/README_UPLOAD - echo -e "------------------------------------------------------------------\n" -fi - -################################################################################################# - -TerminateScript diff --git a/project/bundles/appimage.master/README b/project/bundles/appimage.master/README deleted file mode 100644 index 93834e7594..0000000000 --- a/project/bundles/appimage.master/README +++ /dev/null @@ -1,165 +0,0 @@ -RESUME ------- -This scripts build a binary digiKam AppImage bundle for Linux using CentOS 6. - - -AUTHORS -------- -(c) 2015-2019 by : - -Gilles Caulier - - -DESCRIPTION ------------ -These files and scripts are used to make binary AppImage bundle of the digiKam -Software Collection for Linux. - -For more information about AppImage, see at this url: -http://appimage.org/ - -In addition to this README, there are comments in the scripts that provide some -additional explanation for how they work. - - -BUNDLE CONTENTS ---------------- - -Note : the bundle is relocatable. - -. -└── usr - ├── bin Main executable - │   ├── data Marble data - │   └── plugins Marble plugins - ├── lib All Shared libraries, including 64 bits - ├── lib64 -> lib Symbolic link, for compatibility - ├── plugins Qt5 based plugins - │   ├── bearer - │   ├── designer - │   ├── generic - │   ├── geoservices - │   ├── iconengines - │   ├── imageformats - │   ├── kauth KF5 authentification - │   ├── kf5 Generic KF5 plugins - │   ├── mediaservice - │   ├── org.kde.kglobalaccel5.platforms KF5 global accelerators - │   ├── platforminputcontexts - │   ├── platforms - │   ├── playlistformats - │   ├── position - │   ├── sensorgestures - │   ├── sensors - │   ├── sqldrivers - │   ├── webkit - │   └── xcbglintegrations - ├── share Shared data files - │   ├── digikam digiKam - │   ├── knotifications5 KF5 - │   ├── kservices5 KF5 - │   ├── kservicetypes5 KF5 - │   ├── kxmlgui5 KF5 - │   ├── lensfun Lens database for Lensfun - │   ├── locale KF5 i18n - │   ├── metainfo Application metadata - │   ├── OpenCV OpenCv shared lib data - │   └── solid KF5 Solid - └── translations Qt5 i18n - - -REQUIREMENTS ------------- - -- For technical reasons about compatibility with libc, CentOS 6 is used to be compatible - at run-time under other Linux distributions. - -- Create a fresh CentOS 6 environment in a Virtual Machine: - Install from CentOS-6.8-x86_64-bin-DVD1.iso (from Pasteur institue mirror for ex: http://ftp.pasteur.fr/mirrors/CentOS/6.10/isos/) - yum install git - git clone git://anongit.kde.org/digikam.git DK - cd DK/project/appimage/ - -- You must set the digiKam git tags to checkout right source code in bundle. -- You must set the option to host debug symbols or not in bundle. - -NOTE: Look in config.sh file for settings details. - - -COMPONENTS ----------- -There are 4 scripts to be run by the user. 2 first ones installs -components on CentOS 6 and all dependencies, next one digiKam, and last one makes a -binary AppImage bundle for Linux. - - -SCRIPT DESCRIPTIONS -------------------- -All scripts should be run from within this directory. - -* 01-build-centos6.sh: - -This script downloads and configures all packages for CentOS 6 to compile digiKam, KF5, Qt5, -and all other important low level libraries. When the system is ready, this script compile -and install low level and Qt5 libraries. - -* 02-build-extralibs.sh: - -This script configures, compile, and install KF5 frameworks and Marble. - -* 03-build-digikam.sh: - -This script configures, and compile digiKam. - -* 04-build-installer.sh: - -Once you've successfully built digiKam, this script create the AppImage bundle. -This include applications documentations and translations. -Depending of configuration done in config.sh, this script is able to upload automatically -the bundle file on files.kde.org digiKam area through ssh. A valid ssh key configured -with remote KDE server need to be set previously with the account. You can load ssh key -at startup following these instructions: - -1/ As root, mkdir /root/.ssh -2/ Put your ssh keys in /root/.ssh -3/ Edit /root/.bashrc and add these lines at end: - -# --- ssh key rules - -if [ ! -S ~/.ssh/ssh_auth_sock ]; then - eval `ssh-agent` - ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock -fi - -export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock -ssh-add -l > /dev/null || ssh-add - -# --- - -Note: the bundle can be signed with GPG. You must setup your private and public keys before -and put your passphare to a text file (~/.gnupg/dkorg-gpg-pwd.txt) - -4/ Re-login as root to setup password using "su -". - -Source : https://unix.stackexchange.com/questions/90853/how-can-i-run-ssh-add-automatically-without-password-prompt - -* makeall.sh - -This script permit to build whole Linux bundle from scratch in one time. - -* update.sh - -This script re-build only digiKam and Linux bundle. - - -AT RUN-TIME ON TARGET COMPUTER ------------------------------- -- Make AppImage file executable (CentOS : chmod +x _bundle_file_). -- Add Fuse on on computer (CentOS : yum install fuse). -- Add user right to use Fuse (CentOS : usermod -a -G fuse _user_name_). - - -LICENSES --------- -The scripts and other contents of this package are licensed -under the GNU General Public License version 2, or any later version. diff --git a/project/bundles/appimage.master/common.sh b/project/bundles/appimage.master/common.sh deleted file mode 100755 index f230a6d3aa..0000000000 --- a/project/bundles/appimage.master/common.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2013-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -######################################################################## -# Check if run as root -ChecksRunAsRoot() -{ - -if [[ $EUID -ne 0 ]]; then - echo "This script should be run as root using sudo command." - exit 1 -else - echo "Check run as root passed..." -fi - -} - -######################################################################## -# Check CPU core available (Linux or MacOS) -ChecksCPUCores() -{ - -CPU_CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) - -if [[ $CPU_CORES -gt 1 ]]; then - CPU_CORES=$((CPU_CORES-1)) -fi - -echo "CPU Cores to use : $CPU_CORES" - -} - -######################################################################## -# For time execution measurement ; startup -StartScript() -{ - -BEGIN_SCRIPT=$(date +"%s") - -} - -######################################################################## -# For time execution measurement : shutdown -TerminateScript() -{ - -TERMIN_SCRIPT=$(date +"%s") -difftimelps=$(($TERMIN_SCRIPT-$BEGIN_SCRIPT)) -echo "Elaspsed time for script execution : $(($difftimelps / 3600 )) hours $((($difftimelps % 3600) / 60)) minutes $(($difftimelps % 60)) seconds" - -} - -######################################################################## -# Adjust devel env.for Centos6 -CentOS6Adjustments() -{ - -# Chek if we are inside CentOS 6 or not. -grep -r "CentOS release 6" /etc/redhat-release || exit 1 - -# That's not always set correctly in CentOS 6.7 -export LC_ALL=en_US.UTF-8 -export LANG=en_us.UTF-8 - -# Determine which architecture should be built -if [[ "$(arch)" = "i686" || "$(arch)" = "x86_64" ]] ; then - ARCH=$(arch) - echo "Architecture is $ARCH" -else - echo "Architecture could not be determined" - exit 1 -fi - -# if the library path doesn't point to our usr/lib, linking will be broken and we won't find all deps either -export LD_LIBRARY_PATH=/usr/lib64/:/usr/lib:/digikam.appdir/usr/lib - -} - -######################################################################## -# Copy dependencies with ldd analysis -# arg1 : original file path to parse. -# arg2 : target path to copy dependencies -CopyReccursiveDependencies() -{ - -echo "Scan dependencies for $1" - -FILES=$(ldd $1 | grep "=>" | awk '{print $3}') - -for FILE in $FILES ; do - if [ -f "$FILE" ] ; then - cp -u $FILE $2 2> /dev/null || true -# echo " ==> $FILE" - fi -done - -} diff --git a/project/bundles/appimage.master/config.sh b/project/bundles/appimage.master/config.sh deleted file mode 100644 index 904098f906..0000000000 --- a/project/bundles/appimage.master/config.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -######################################################################## - -# Absolute path where are downloaded all tarballs to compile. -DOWNLOAD_DIR="/digikam.appimage/download" - -# Absolute path where are compiled all tarballs -BUILDING_DIR="/digikam.appimage/build" - -# Absolute path where are installed all software components -INSTALL_DIR="/usr" - -# Absolute path where are bundled all software components -APP_IMG_DIR="/digikam.appimage/appdir" - -# Setup variables needed to help everything find what we build - -#export PATH=$INSTALL_DIR/bin:$PATH -#export LD_LIBRARY_PATH=$INSTALL_DIR/lib:$INSTALL_DIR/lib64:$LD_LIBRARY_PATH -#export PKG_CONFIG_PATH=$INSTALL_DIR/share/pkgconfig:$INSTALL_DIR/lib/pkgconfig::$INSTALL_DIR/lib64/pkgconfig/usr/lib/pkgconfig:$PKG_CONFIG_PATH -#export CMAKE_PREFIX_PATH=$INSTALL_DIR:$CMAKE_PREFIX_PATH - -######################################################################## - -# URL to git repository to checkout digiKam source code -# Read/write url is an alternative when official read only server is down. -#DK_GITURL="git://anongit.kde.org/digikam.git" -DK_GITURL="git@git.kde.org:digikam" - -# Location to build source code. -DK_BUILDTEMP=$BUILDING_DIR/dktemp - -# digiKam tag version from git. Official tarball do not include extra shared libraries. -# The list of tags can be listed with this url: https://quickgit.kde.org/?p=digikam.git&a=tags -# If you want to package current implemntation from git, use "master" as tag. -#DK_VERSION=v6.0.0 -DK_VERSION=master -#DK_VERSION=development/dplugins - -# Installer sub version to differentiates newer updates of the installer itself, even if the underlying application hasn’t changed. -#DK_EPOCH="-01" -# Epoch with time-stamp for pre-release bundle in ISO format -DK_EPOCH="-`date "+%Y%m%dT%H%M%S"`" - -# Installer will include or not digiKam debug symbols -DK_DEBUG=1 - -# Sign bundles with GPG. Passphrase must be hosted in ~/.gnupg/dkorg-gpg-pwd.txt -DK_SIGN=0 - -# Upload automatically bundle to files.kde.org (pre-release only). -DK_UPLOAD=0 -DK_UPLOADURL="digikam@milonia.kde.org" -DK_UPLOADDIR="/srv/archives/files/digikam/" diff --git a/project/bundles/appimage.master/data/AppRun b/project/bundles/appimage.master/data/AppRun deleted file mode 100755 index d582f580ba..0000000000 --- a/project/bundles/appimage.master/data/AppRun +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/bash - -# Main AppImage script to wrap XDG_* variable properly for Qt5. -# -# Copyright (c) 2015-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -preload_shared_library () -{ - FILE=$1 - echo "$FILE" - - if [[ "$(arch)" = "x86_64" ]] ; then - # 64 bits system - - if [ -f "/usr/lib64/$FILE" ] ; then - export LD_PRELOAD=$LD_PRELOAD:/usr/lib64/$FILE - elif [ -f "/usr/lib/x86_64-linux-gnu/$FILE" ] ; then - export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/$FILE - elif [ -f "/lib/x86_64-linux-gnu/$FILE" ] ; then - export LD_PRELOAD=$LD_PRELOAD:/lib/x86_64-linux-gnu/$FILE - fi - - else - # 32 bits system - - if [ -f "/usr/lib/$FILE" ] ; then - export LD_PRELOAD=$LD_PRELOAD:/usr/lib/$FILE - elif [ -f "/usr/lib/i386-linux-gnu/$FILE" ] ; then - export LD_PRELOAD=$LD_PRELOAD:/usr/lib/i386-linux-gnu/$FILE - elif [ -f "/lib/i386-linux-gnu/$FILE" ] ; then - export LD_PRELOAD=$LD_PRELOAD:/lib/i386-linux-gnu/$FILE - fi - - fi -} - -preload_shared_library libfreetype.so -preload_shared_library libudev.so - -echo "-- digiKam AppImage Bundle" -echo "-- Use 'help' as CLI argument to know all available options for digiKam application" -echo "-- Preloading shared libs: $LD_PRELOAD" - -DIR="`dirname \"$0\"`" -DIR="`( cd \"$DIR\" && pwd )`" -export APPDIR=$DIR - -export APPIMAGE_ORIGINAL_LD_LIBRARY_PATH=$LD_LIBRARY_PATH -export APPIMAGE_ORIGINAL_QT_PLUGIN_PATH=$QT_PLUGIN_PATH -export APPIMAGE_ORIGINAL_XDG_DATA_DIRS=$XDG_DATA_DIRS -export APPIMAGE_ORIGINAL_PATH=$PATH - -export LD_LIBRARY_PATH=$DIR/usr/lib/:$LD_LIBRARY_PATH -export QT_PLUGIN_PATH=$DIR/usr/plugins/ -export XDG_DATA_DIRS=$DIR/usr/share/:$XDG_DATA_DIRS -export PATH=$DIR/usr/bin:$DIR/usr/lib:$DIR/usr/lib/libexec/kf5:$DIR/usr/share/digikam/utils:$PATH -export KDE_FORK_SLAVES=1 -export CAMLIBS=$DIR/usr/lib/libgphoto2 -export IOLIBS=$DIR/usr/lib/libgphoto2_port - -# code to disable Plasma desktopk detection with QDesktopService -export APPIMAGE_ORIGINAL_KDE_FULL_SESSION=$KDE_FULL_SESSION -export APPIMAGE_ORIGINAL_DESKTOP_SESSION=$DESKTOP_SESSION -export APPIMAGE_ORIGINAL_XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP -export APPIMAGE_ORIGINAL_XDG_SESSION_DESKTOP=$XDG_SESSION_DESKTOP -#unset KDE_FULL_SESSION -#unset DESKTOP_SESSION -#unset XDG_CURRENT_DESKTOP -#unset XDG_SESSION_DESKTOP - -# if no customized Qt debug loggin variable is set, turn on one for a better readability - -if [ -z "$QT_MESSAGE_PATTERN" ]; then - export QT_MESSAGE_PATTERN="`echo -e "\033[34m%{function}\033[0m: %{message}"`" -fi - -export APPIMAGE_STARTUP_LD_LIBRARY_PATH=$LD_LIBRARY_PATH -export APPIMAGE_STARTUP_QT_PLUGIN_PATH=$QT_PLUGIN_PATH -export APPIMAGE_STARTUP_XDG_DATA_DIRS=$XDG_DATA_DIRS -export APPIMAGE_STARTUP_PATH=$PATH - -# Parse CLI options. - -if [[ $1 == "showfoto" ]] ; then - - # Run Showfoto as well. - showfoto ${@:2} - -elif [[ $1 == "debug" ]] ; then - - if [[ $2 == "showfoto" ]] ; then - - # Showfoto in debug mode. - - echo "Starting Showfoto into GDB..." - echo "Use 'bt' command on debugger prompt to get a crash backtrace." - echo "Use 'q' command to quit debugger session." - gdb -ex=r --args showfoto ${@:3} - - else - - # digiKam in debug mode. - - echo "Starting digiKam into GDB..." - echo "Use 'bt' command on debugger prompt to get a crash backtrace." - echo "Use 'q' command to quit debugger session." - gdb -ex=r --args digikam ${@:2} - - fi - -elif [[ $1 == "help" ]] ; then - - # digiKam/Showfoto CLI help. - - echo "digiKam AppImage bundle CLI options:" - echo " without option : run digiKam." - echo " : run Showfoto instead digiKam." - echo " : run digiKam into GDB." - echo " : run Showfoto into GDB." - echo " : show these information." - -else - - # Run digiKam as well. - - digikam $@ - -fi diff --git a/project/bundles/appimage.master/data/qt.conf b/project/bundles/appimage.master/data/qt.conf deleted file mode 100644 index 54562e5a53..0000000000 --- a/project/bundles/appimage.master/data/qt.conf +++ /dev/null @@ -1,4 +0,0 @@ -[Paths] -Prefix=../ -Translations=translations -Plugins=plugins diff --git a/project/bundles/appimage.master/icon-rcc/CMakeLists.txt b/project/bundles/appimage.master/icon-rcc/CMakeLists.txt deleted file mode 100644 index f0ef0d8566..0000000000 --- a/project/bundles/appimage.master/icon-rcc/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (c) 2010-2017 by Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if (POLICY CMP0063) - cmake_policy(SET CMP0063 NEW) -endif (POLICY CMP0063) - -cmake_minimum_required(VERSION 3.0.0) - -find_package(Qt5 NO_MODULE REQUIRED Core) -get_target_property(QT_RCC_EXECUTABLE Qt5::rcc LOCATION) - -add_executable(qrcAlias main.cpp) -target_link_libraries(qrcAlias PUBLIC Qt5::Core) - -add_custom_command(OUTPUT breeze.rcc - COMMAND ${QT_RCC_EXECUTABLE} -project -o icons.qrc - COMMAND $/$ -i icons.qrc -o aliased.qrc - COMMAND ${QT_RCC_EXECUTABLE} -binary -o ${CMAKE_BINARY_DIR}/breeze.rcc -root /icons/breeze aliased.qrc - - WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/icons/breeze - DEPENDS qrcAlias -) - -add_custom_command(OUTPUT breeze-dark.rcc - COMMAND ${QT_RCC_EXECUTABLE} -project -o icons.qrc - COMMAND $/$ -i icons.qrc -o aliased.qrc - COMMAND ${QT_RCC_EXECUTABLE} -binary -o ${CMAKE_BINARY_DIR}/breeze-dark.rcc -root /icons/breeze-dark aliased.qrc - - WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/icons/breeze-dark - DEPENDS qrcAlias -) - -add_custom_target(icons ALL - DEPENDS breeze.rcc breeze-dark.rcc -) - -install(FILES ${CMAKE_BINARY_DIR}/breeze.rcc DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/) -install(FILES ${CMAKE_BINARY_DIR}/breeze-dark.rcc DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/) diff --git a/project/bundles/appimage.master/icon-rcc/main.cpp b/project/bundles/appimage.master/icon-rcc/main.cpp deleted file mode 100644 index 409ba61fa8..0000000000 --- a/project/bundles/appimage.master/icon-rcc/main.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 2016 Kåre Särs - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ -#include -#include -#include -#include -#include -#include -#include - -QString link(const QString &path, const QString &fileName) -{ - QFile in(path + QLatin1Char('/') + fileName); - if (!in.open(QIODevice::ReadOnly)) { - qDebug() << "failed to read" << path << fileName << in.fileName(); - return QString(); - } - - QString firstLine = in.readLine(); - if (firstLine.isEmpty()) { - qDebug() << in.fileName() << "line could not be read..."; - return QString(); - } - QRegularExpression fNameReg(QStringLiteral("(.*\\.(?:svg|png|gif|ico))")); - QRegularExpressionMatch match = fNameReg.match(firstLine); - if (!match.hasMatch()) { - return QString(); - } - - QFileInfo linkInfo(path + QLatin1Char('/') + match.captured(1)); - QString aliasLink = link(linkInfo.path(), linkInfo.fileName()); - if (!aliasLink.isEmpty()) { - //qDebug() << fileName << "=" << match.captured(1) << "=" << aliasLink; - return aliasLink; - } - - return path + QLatin1Char('/') + match.captured(1); -} - -int parseFile(const QString &infile, const QString &outfile) -{ - QFile in(infile); - QFile out(outfile); - QRegularExpression imageReg(QStringLiteral("(.*\\.(?:svg|png|gif|ico))")); - - if (!in.open(QIODevice::ReadOnly)) { - qDebug() << "Failed to open" << infile; - return -1; - } - if (!out.open(QIODevice::WriteOnly)) { - qDebug() << "Failed to create" << outfile; - return -2; - } - - while (in.bytesAvailable()) { - QString line = QString::fromLocal8Bit(in.readLine()); - QRegularExpressionMatch match = imageReg.match(line); - if (!match.hasMatch()) { - //qDebug() << "No Match: " << line; - out.write(qPrintable(line)); - continue; - } - - QFileInfo info(match.captured(1)); - - QString aliasLink = link(info.path(), info.fileName()); - if (aliasLink.isEmpty()) { - //qDebug() << "No alias: " << line; - out.write(qPrintable(line)); - continue; - } - - QString newLine = QStringLiteral("%2\n").arg(match.captured(1), aliasLink); - //qDebug() << newLine; - out.write(qPrintable(newLine)); - } - return 0; -} - -int main(int argc, char *argv[]) -{ - QCoreApplication app(argc, argv); - - QCommandLineParser parser; - - QCommandLineOption inOption(QStringList() << QLatin1String("i") << QLatin1String("infile"), QStringLiteral("Input qrc file"), QStringLiteral("infile")); - QCommandLineOption outOption(QStringList() << QLatin1String("o") << QLatin1String("outfile"), QStringLiteral("Output qrc file"), QStringLiteral("outfile")); - parser.setApplicationDescription( - QLatin1String("On Windows git handles symbolic links by converting them " - "to text files containing the links to the actual file. This application " - "takes a .qrc file as input and outputs a .qrc file with the symbolic " - "links converted to qrc-aliases.")); - parser.addHelpOption(); - parser.addVersionOption(); - parser.addOption(inOption); - parser.addOption(outOption); - parser.process(app); - - const QString inName = parser.value(inOption); - const QString outName = parser.value(outOption); - - return parseFile(inName, outName); -} diff --git a/project/bundles/appimage.master/makeall.sh b/project/bundles/appimage.master/makeall.sh deleted file mode 100755 index 368d59f473..0000000000 --- a/project/bundles/appimage.master/makeall.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Script to run all Linux sub-scripts to build AppImage bundle. -# -# Copyright (c) 2015-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -# Halt and catch errors -set -eE -trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG -trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR - -################################################################################################# -# Pre-processing checks - -. ./config.sh -. ./common.sh -StartScript -ChecksRunAsRoot -ChecksCPUCores -CentOS6Adjustments - -echo "This script will build from scratch the digiKam AppImage bundle for Linux." -echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - -./01-build-centos6.sh -./02-build-extralibs.sh -./03-build-digikam.sh -./04-build-appimage.sh - -echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - -TerminateScript diff --git a/project/bundles/appimage.master/update.sh b/project/bundles/appimage.master/update.sh deleted file mode 100755 index 35a14bf0b1..0000000000 --- a/project/bundles/appimage.master/update.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Script to run all Linux sub-scripts to build AppImage bundle. -# -# Copyright (c) 2015-2019, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -# Halt and catch errors -set -eE -trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG -trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR - -################################################################################################# -# Pre-processing checks - -. ./config.sh -. ./common.sh -StartScript -ChecksRunAsRoot -ChecksCPUCores -CentOS6Adjustments - -echo "+++++++++++++++++++++++ Update Linux AppImage bundle ++++++++++++++++++++++++++++++" -echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - -./03-build-digikam.sh -./04-build-appimage.sh - -echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - -TerminateScript diff --git a/project/bundles/appimage/01-build-centos6.sh b/project/bundles/appimage/01-build-centos6.sh index 441ac232fb..91491ef7bf 100755 --- a/project/bundles/appimage/01-build-centos6.sh +++ b/project/bundles/appimage/01-build-centos6.sh @@ -1,255 +1,292 @@ #!/bin/bash # Script to build a CentOS 6 installation to compile an AppImage bundle of digiKam. # This script must be run as sudo # # Copyright (c) 2015-2019, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # Halt and catch errors set -eE trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR ################################################################################################# # Manage script traces to log file mkdir -p ./logs exec > >(tee ./logs/build-centos6.full.log) 2>&1 ################################################################################################# echo "01-build-centos6.sh : build a CentOS 6 installation to compile an AppImage of digiKam." echo "--------------------------------------------------------------------------------------" ################################################################################################# # Pre-processing checks . ./config.sh . ./common.sh ChecksRunAsRoot StartScript ChecksCPUCores CentOS6Adjustments ORIG_WD="`pwd`" ################################################################################################# echo -e "---------- Update Linux CentOS 6\n" yum -y install epel-release if [[ "$(arch)" = "x86_64" ]] ; then yum upgrade ca-certificates --disablerepo=epel fi if [[ ! -f /etc/yum.repos.d/epel.repo ]] ; then yum install epel-release # we need to be up to date in order to install the xcb-keysyms dependency yum -y update fi ################################################################################################# echo -e "---------- Install New Development Packages\n" # Packages for base dependencies and Qt5. yum -y install wget \ tar \ bzip2 \ gettext \ git \ subversion \ libtool \ which \ fuse \ automake \ mesa-libEGL \ cmake3 \ gcc-c++ \ patch \ libxcb \ + libxcb-devel \ xcb-util \ + xcb-util-keysyms-devel \ + xcb-util-devel \ + xcb-util-image-devel \ + xcb-util-renderutil-devel \ + xcb-util-wm-devel \ xkeyboard-config \ gperf \ - ruby \ bison \ flex \ zlib-devel \ expat-devel \ fuse-devel \ libtool-ltdl-devel \ glib2-devel \ glibc-headers \ mysql-devel \ eigen3-devel \ - openssl-devel \ cppunit-devel \ libstdc++-devel \ - freetype-devel \ - fontconfig-devel \ libxml2-devel \ libstdc++-devel \ libXrender-devel \ lcms2-devel \ - xcb-util-keysyms-devel \ libXi-devel \ mesa-libGL-devel \ mesa-libGLU-devel \ - libxcb-devel \ - xcb-util-devel \ glibc-devel \ libudev-devel \ - libicu-devel \ + libuuid-devel \ sqlite-devel \ libusb-devel \ libexif-devel \ libical-devel \ libxslt-devel \ xz-devel \ lz4-devel \ inotify-tools-devel \ - openssl-devel \ cups-devel \ openal-soft-devel \ - libical-devel + openssl-devel \ + libical-devel \ + libcap-devel \ + libicu-devel \ + libXScrnSaver-devel \ + mesa-libEGL-devel \ + patchelf \ + dpkg ################################################################################################# -if [[ ! -f /opt/rh/devtoolset-4/enable ]] ; then +if [[ ! -f /etc/yum.repos.d/mlampe-python2.7_epel6.repo ]] ; then - echo -e "---------- Install New Compiler Tools Set\n" + echo -e "---------- Install New Python Interpreter\n" - if [[ "$(arch)" = "x86_64" ]] ; then + cd /etc/yum.repos.d + wget https://copr.fedorainfracloud.org/coprs/g/python/python2.7_epel6/repo/epel-6/mlampe-python2.7_epel6.repo + yum -y --nogpgcheck install python2.7 - # Newer compiler than what comes with official CentOS 6 (only 64 bits) - # TODO: This official devetoolset version 6 and later do not compile qtwebkit. - #yum -y install centos-release-scl-rh - #yum -y install devtoolset-6-gcc devtoolset-6-gcc-c++ +fi - # Newer compiler for CentOS 6 64 bits - cd /etc/yum.repos.d - wget https://copr.fedorainfracloud.org/coprs/mlampe/devtoolset-4.1/repo/epel-6/mlampe-devtoolset-4.1-epel-6.repo - yum -y --nogpgcheck install devtoolset-4-gcc devtoolset-4-gcc-c++ - rm -f /etc/yum.repos.d/mlampe-devtoolset-4.1-epel-6.repo +if [[ ! -f /opt/rh/rh-ruby24/enable ]] ; then - else + echo -e "---------- Install New Ruby Interpreter\n" - # Newer compiler for CentOS 6 32 bits - cd /etc/yum.repos.d - wget https://copr.fedorainfracloud.org/coprs/mlampe/devtoolset-4.1/repo/epel-6/mlampe-devtoolset-4.1-epel-6.repo - yum -y --nogpgcheck install devtoolset-4-gcc devtoolset-4-gcc-c++ - rm -f /etc/yum.repos.d/mlampe-devtoolset-4.1-epel-6.repo + yum -y install centos-release-scl-rh centos-release-scl + yum -y --nogpgcheck install rh-ruby24 - fi +fi + +if [[ ! -f /etc/yum.repos.d/mlampe-devtoolset-7-epel-6.repo ]] ; then + + echo -e "---------- Install New Compiler Tools Set\n" + + cd /etc/yum.repos.d + wget https://copr.fedorainfracloud.org/coprs/mlampe/devtoolset-7/repo/epel-6/mlampe-devtoolset-7-epel-6.repo + yum -y --nogpgcheck install devtoolset-7-toolchain fi ################################################################################################# # Install new repo to get ffmpeg dependencies if [[ ! -f /etc/yum.repos.d/nux-dextop.repo ]] ; then echo -e "---------- Install Repository for ffmpeg packages\n" if [[ "$(arch)" = "x86_64" ]] ; then rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm else rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/i386/nux-dextop-release-0-2.el6.nux.noarch.rpm fi fi -yum -y install libass-devel \ - fdk-aac-devel \ +yum -y install fdk-aac-devel \ faac-devel \ lame-devel \ opencore-amr-devel \ opus-devel \ librtmp-devel \ speex-devel \ libtheora-devel \ libvorbis-devel \ libvpx-devel \ x264-devel \ x265-devel \ xvidcore-devel \ - yasm + yasm \ + fribidi-devel ################################################################################################# echo -e "---------- Clean-up Old Packages\n" # Remove system based devel package to prevent conflict with new one. -yum -y erase qt-devel boost-devel libgphoto2 sane-backends libjpeg-devel jasper-devel libpng-devel libtiff-devel ffmpeg ffmpeg-devel ant pulseaudio-libs-devel +yum -y erase qt-devel \ + boost-devel \ + libgphoto2 \ + sane-backends \ + libjpeg-devel \ + jasper-devel \ + libpng-devel \ + libtiff-devel \ + ffmpeg \ + ffmpeg-devel \ + ant \ + pulseaudio-libs-devel \ + libfreetype-devel \ + libfontconfig-devel ################################################################################################# echo -e "---------- Prepare CentOS to Compile Extra Dependencies\n" # Workaround for: On CentOS 6, .pc files in /usr/lib/pkgconfig are not recognized # However, this is where .pc files get installed when bulding libraries... (FIXME) # I found this by comparing the output of librevenge's "make install" command # between Ubuntu and CentOS 6 ln -sf /usr/share/pkgconfig /usr/lib/pkgconfig # Make sure we build from the /, parts of this script depends on that. We also need to run as root... cd / -# Create the build dir for the 3rdparty deps +# Create the working directories. + if [ ! -d $BUILDING_DIR ] ; then - mkdir $BUILDING_DIR + mkdir -p $BUILDING_DIR fi if [ ! -d $DOWNLOAD_DIR ] ; then - mkdir $DOWNLOAD_DIR + mkdir -p $DOWNLOAD_DIR +fi +if [ ! -d $INSTALL_DIR ] ; then + mkdir -p $INSTALL_DIR fi + # enable new compiler -. /opt/rh/devtoolset-4/enable +. /opt/rh/devtoolset-7/enable + +# enable new Ruby interpreter +. /opt/rh/rh-ruby24/enable ################################################################################################# +# Low level libraries dependencies +# NOTE: The order to compile each component here is very important. cd $BUILDING_DIR rm -rf $BUILDING_DIR/* || true cmake3 $ORIG_WD/../3rdparty \ - -DCMAKE_INSTALL_PREFIX:PATH=/usr \ - -DINSTALL_ROOT=/usr \ + -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \ + -DINSTALL_ROOT=$INSTALL_DIR \ -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR -# Low level libraries and Qt5 dependencies -# NOTE: The order to compile each component here is very important. - -cmake3 --build . --config RelWithDebInfo --target ext_jpeg -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_jasper -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_png -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_tiff -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_qt -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_libgphoto2 -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_sane -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_boost -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_opencv -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_lensfun -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_qtwebkit -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_exiv2 -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_ffmpeg -- -j$CPU_CORES -cmake3 --build . --config RelWithDebInfo --target ext_qtav -- -j$CPU_CORES +# --- digiKam dependencies stage1 ------------- + +cmake3 --build . --config RelWithDebInfo --target ext_jpeg -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_jasper -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_png -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_tiff -- -j$CPU_CORES +#cmake3 --build . --config RelWithDebInfo --target ext_openssl -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_freetype -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_fontconfig -- -j$CPU_CORES # depend of freetype +#cmake3 --build . --config RelWithDebInfo --target ext_libicu -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_qt -- -j$CPU_CORES # depend of fontconfig, freetype, libtiff, libjpeg, libpng +cmake3 --build . --config RelWithDebInfo --target ext_qtwebkit -- -j$CPU_CORES # depend of qt + +# --- digiKam dependencies stage2 ------------- + +cmake3 --build . --config RelWithDebInfo --target ext_boost -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_libass -- -j$CPU_CORES # depend of fontconfig +cmake3 --build . --config RelWithDebInfo --target ext_ffmpeg -- -j$CPU_CORES # depend of libass +cmake3 --build . --config RelWithDebInfo --target ext_qtav -- -j$CPU_CORES # depend of qt and ffmpeg +cmake3 --build . --config RelWithDebInfo --target ext_libgphoto2 -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_sane -- -j$CPU_CORES # depend of libgphoto2 +cmake3 --build . --config RelWithDebInfo --target ext_exiv2 -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_opencv -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_lensfun -- -j$CPU_CORES +#cmake3 --build . --config RelWithDebInfo --target ext_liblqr -- -j$CPU_CORES +cmake3 --build . --config RelWithDebInfo --target ext_linuxdeployqt -- -j$CPU_CORES # depend of qt ################################################################################################# TerminateScript diff --git a/project/bundles/appimage/02-build-extralibs.sh b/project/bundles/appimage/02-build-extralibs.sh index 7afae430aa..2cdcc6493a 100755 --- a/project/bundles/appimage/02-build-extralibs.sh +++ b/project/bundles/appimage/02-build-extralibs.sh @@ -1,100 +1,100 @@ #!/bin/bash # Script to build extra libraries using CentOS 6. # This script must be run as sudo # # Copyright (c) 2015-2019, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # Halt and catch errors set -eE trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR ################################################################################################# # Manage script traces to log file mkdir -p ./logs exec > >(tee ./logs/build-extralibs.full.log) 2>&1 ################################################################################################# echo "02-build-extralibs.sh : build extra libraries under CentoOS 6." echo "--------------------------------------------------------------" ################################################################################################# # Pre-processing checks . ./config.sh . ./common.sh ChecksRunAsRoot StartScript ChecksCPUCores CentOS6Adjustments . /opt/rh/devtoolset-4/enable ORIG_WD="`pwd`" ################################################################################################# cd $BUILDING_DIR rm -rf $BUILDING_DIR/* || true cmake3 $ORIG_WD/../3rdparty \ - -DCMAKE_INSTALL_PREFIX:PATH=/usr \ - -DINSTALL_ROOT=/usr \ + -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \ + -DINSTALL_ROOT=$INSTALL_DIR \ -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR # NOTE: The order to compile each component here is very important. # core KF5 frameworks dependencies cmake3 --build . --config RelWithDebInfo --target ext_extra-cmake-modules -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kconfig -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_breeze-icons -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kcoreaddons -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kwindowsystem -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_solid -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_threadweaver -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_karchive -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kdbusaddons -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_ki18n -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kcrash -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kcodecs -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kauth -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kguiaddons -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kwidgetsaddons -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kitemviews -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kcompletion -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kconfigwidgets -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kiconthemes -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kservice -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kglobalaccel -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kxmlgui -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kbookmarks -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kimageformats -- -j$CPU_CORES # Extra support for digiKam # libksane support cmake3 --build . --config RelWithDebInfo --target ext_libksane -- -j$CPU_CORES # Desktop integration support cmake3 --build . --config RelWithDebInfo --target ext_kjobwidgets -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_kio -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_knotifyconfig -- -j$CPU_CORES cmake3 --build . --config RelWithDebInfo --target ext_knotifications -- -j$CPU_CORES # Geolocation support cmake3 --build . --config RelWithDebInfo --target ext_marble -- -j$CPU_CORES # Calendar support cmake3 --build . --config RelWithDebInfo --target ext_kcalcore -- -j$CPU_CORES ################################################################################################# TerminateScript diff --git a/project/bundles/appimage/03-build-digikam.sh b/project/bundles/appimage/03-build-digikam.sh index 9c31e26371..7638c5269e 100755 --- a/project/bundles/appimage/03-build-digikam.sh +++ b/project/bundles/appimage/03-build-digikam.sh @@ -1,166 +1,163 @@ #! /bin/bash # Script to build digiKam under Linux # This script must be run as sudo # # Copyright (c) 2015-2019, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # Halt and catch errors set -eE trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR if [ "root" != "$USER" ]; then echo "This script must be run as root..." exit fi ################################################################################################# # Manage script traces to log file mkdir -p ./logs exec > >(tee ./logs/build-digikam.full.log) 2>&1 ################################################################################################# echo "03-build-digikam.sh : build digiKam using CentOS 6." echo "---------------------------------------------------" ################################################################################################# # Pre-processing checks . ./config.sh . ./common.sh ChecksRunAsRoot StartScript ChecksCPUCores CentOS6Adjustments . /opt/rh/devtoolset-4/enable ################################################################################################# # Pathes rules ORIG_PATH="$PATH" ORIG_WD="`pwd`" ################################################################################################# # Build digiKam in temporary directory and installation if [ -d "$DK_BUILDTEMP/digikam-$DK_VERSION" ] ; then echo "---------- Updating existing $DK_BUILDTEMP" cd "$DK_BUILDTEMP" cd digikam-$DK_VERSION git reset --hard git pull mkdir -p build cd build else echo "---------- Creating $DK_BUILDTEMP" mkdir -p "$DK_BUILDTEMP" if [ $? -ne 0 ] ; then echo "---------- Cannot create $DK_BUILDTEMP directory." echo "---------- Aborting..." exit; fi cd "$DK_BUILDTEMP" echo -e "\n\n" echo "---------- Downloading digiKam $DK_VERSION" git clone --progress --verbose $DK_GITURL digikam-$DK_VERSION cd digikam-$DK_VERSION export GITSLAVE=".gitslave.bundle" ./download-repos if [ $? -ne 0 ] ; then echo "---------- Cannot clone repositories." echo "---------- Aborting..." exit; fi git checkout $DK_VERSION mkdir build cd build fi echo -e "\n\n" echo "---------- Configure digiKam $DK_VERSION" cmake3 -G "Unix Makefiles" .. \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ + -DCMAKE_LIBRARY_PATH=$INSTALL_DIR/lib \ -DBUILD_TESTING=OFF \ -DDIGIKAMSC_CHECKOUT_PO=ON \ -DDIGIKAMSC_CHECKOUT_DOC=OFF \ -DDIGIKAMSC_COMPILE_PO=ON \ -DDIGIKAMSC_COMPILE_DOC=OFF \ -DDIGIKAMSC_COMPILE_DIGIKAM=ON \ -DDIGIKAMSC_COMPILE_LIBKSANE=OFF \ -DDIGIKAMSC_COMPILE_LIBMEDIAWIKI=ON \ -DDIGIKAMSC_COMPILE_LIBKVKONTAKTE=OFF \ -DENABLE_KFILEMETADATASUPPORT=OFF \ -DENABLE_AKONADICONTACTSUPPORT=OFF \ -DENABLE_MYSQLSUPPORT=ON \ -DENABLE_INTERNALMYSQL=ON \ -DENABLE_MEDIAPLAYER=ON \ -DENABLE_DBUS=ON \ -DENABLE_APPSTYLES=ON \ -DENABLE_QWEBENGINE=OFF \ -DENABLE_KIO=OFF \ -DENABLE_LEGACY=OFF \ -Wno-dev if [ $? -ne 0 ]; then echo "---------- Cannot configure digiKam $DK_VERSION." echo "---------- Aborting..." exit; fi -if [ -d ./extra/libmediawiki/src ]; then - ln -sf src ./extra/libmediawiki/MediaWiki -fi - cat ../build/core/app/utils/digikam_version.h | grep "digikam_version\[\]" | awk '{print $6}' | tr -d '";' > $ORIG_WD/data/RELEASEID.txt echo -e "\n\n" echo "---------- Building digiKam $DK_VERSION" make -j$CPU_CORES if [ $? -ne 0 ]; then echo "---------- Cannot compile digiKam $DK_VERSION." echo "---------- Aborting..." exit; fi echo -e "\n\n" echo "---------- Installing digiKam $DK_VERSION" echo -e "\n\n" make install/fast && cd "$ORIG_WD" && rm -rf "$DK_BUILDTEMP" if [ $? -ne 0 ]; then echo "---------- Cannot install digiKam $DK_VERSION." echo "---------- Aborting..." exit; fi ################################################################################################# export PATH=$ORIG_PATH TerminateScript diff --git a/project/bundles/appimage/04-build-appimage.sh b/project/bundles/appimage/04-build-appimage.sh index da5b2f897b..efbe7d71b8 100755 --- a/project/bundles/appimage/04-build-appimage.sh +++ b/project/bundles/appimage/04-build-appimage.sh @@ -1,508 +1,504 @@ #!/bin/bash # Script to bundle data using previously-built KF5 with digiKam installation # and create a Linux AppImage bundle file. # # Copyright (c) 2015-2019, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # Halt and catch errors set -eE trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR if [ "root" != "$USER" ]; then echo "This script must be run as root..." exit fi if [[ "$(arch)" = "x86_64" ]] ; then LIB_PATH_ALT=lib64 else LIB_PATH_ALT=lib fi ################################################################################################# # Manage script traces to log file mkdir -p ./logs exec > >(tee ./logs/build-appimage.full.log) 2>&1 ################################################################################################# echo "04-build-appimage.sh : build digiKam AppImage bundle." echo "-----------------------------------------------------" ################################################################################################# # Pre-processing checks . ./config.sh . ./common.sh ChecksRunAsRoot StartScript ChecksCPUCores CentOS6Adjustments . /opt/rh/devtoolset-4/enable ################################################################################################# # Working directory ORIG_WD="`pwd`" -APP_IMG_DIR="/digikam.appdir" DK_RELEASEID=`cat $ORIG_WD/data/RELEASEID.txt` ################################################################################################# echo -e "---------- Build icons-set ressource\n" cd $ORIG_WD/icon-rcc rm -f CMakeCache.txt > /dev/null -cmake3 -DCMAKE_INSTALL_PREFIX="/usr" \ +cmake3 -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ -DCMAKE_BUILD_TYPE=debug \ -DCMAKE_COLOR_MAKEFILE=ON \ -Wno-dev \ . make -j$CPU_CORES ################################################################################################# echo -e "---------- Prepare directories in bundle\n" # Make sure we build from the /, parts of this script depends on that. We also need to run as root... cd / # Prepare the install location rm -rf $APP_IMG_DIR/ || true mkdir -p $APP_IMG_DIR/usr/bin mkdir -p $APP_IMG_DIR/usr/etc mkdir -p $APP_IMG_DIR/usr/share mkdir -p $APP_IMG_DIR/usr/share/icons mkdir -p $APP_IMG_DIR/usr/share/metainfo mkdir -p $APP_IMG_DIR/usr/share/dbus-1/interfaces mkdir -p $APP_IMG_DIR/usr/share/dbus-1/services # make sure lib and lib64 are the same thing mkdir -p $APP_IMG_DIR/usr/lib mkdir -p $APP_IMG_DIR/usr/lib/libexec mkdir -p $APP_IMG_DIR/usr/lib/libgphoto2 mkdir -p $APP_IMG_DIR/usr/lib/libgphoto2_port cd $APP_IMG_DIR/usr ln -s lib lib64 ################################################################################################# echo -e "---------- Copy Files in bundle\n" cd $APP_IMG_DIR # FIXME: How to find out which subset of plugins is really needed? I used strace when running the binary -cp -r /usr/plugins ./usr/ +cp -r $INSTALL_DIR/plugins ./usr/ rm -fr ./usr/plugins/ktexteditor rm -fr ./usr/plugins/kf5/parts rm -fr ./usr/plugins/konsolepart.so # copy runtime data files -cp -r /usr/share/digikam ./usr/share -cp -r /usr/share/showfoto ./usr/share +cp -r $INSTALL_DIR/share/digikam ./usr/share +cp -r $INSTALL_DIR/share/showfoto ./usr/share cp $ORIG_WD/icon-rcc/breeze.rcc ./usr/share/digikam cp $ORIG_WD/icon-rcc/breeze-dark.rcc ./usr/share/digikam cd $APP_IMG_DIR/usr/share/showfoto ln -s ../digikam/breeze.rcc breeze.rcc ln -s ../digikam/breeze-dark.rcc breeze-dark.rcc cd $APP_IMG_DIR -cp $ORIG_WD/data/qt.conf ./usr/bin -cp -r /usr/share/lensfun ./usr/share -cp -r /usr/share/knotifications5 ./usr/share -cp -r /usr/share/kservices5 ./usr/share -cp -r /usr/share/kservicetypes5 ./usr/share -cp -r /usr/share/kxmlgui5 ./usr/share -cp -r /usr/share/kf5 ./usr/share -cp -r /usr/share/solid ./usr/share -cp -r /usr/share/OpenCV ./usr/share -cp -r /usr/share/dbus-1/interfaces/kf5* ./usr/share/dbus-1/interfaces/ -cp -r /usr/share/dbus-1/services/*kde* ./usr/share/dbus-1/services/ -cp -r /usr/$LIB_PATH_ALT/libexec/kf5 ./usr/lib/libexec/ +cp $ORIG_WD/data/qt.conf ./usr/bin +cp -r $INSTALL_DIR/share/lensfun ./usr/share +cp -r $INSTALL_DIR/share/knotifications5 ./usr/share +cp -r $INSTALL_DIR/share/kservices5 ./usr/share +cp -r $INSTALL_DIR/share/kservicetypes5 ./usr/share +cp -r $INSTALL_DIR/share/kxmlgui5 ./usr/share +cp -r $INSTALL_DIR/share/kf5 ./usr/share +cp -r $INSTALL_DIR/share/solid ./usr/share +cp -r $INSTALL_DIR/share/OpenCV ./usr/share +cp -r $INSTALL_DIR/share/dbus-1/interfaces/kf5* ./usr/share/dbus-1/interfaces/ +cp -r $INSTALL_DIR/share/dbus-1/services/*kde* ./usr/share/dbus-1/services/ +cp -r $INSTALL_DIR/lib/libexec/kf5 ./usr/lib/libexec/ # AppImage stream data file -cp -r /usr/share/metainfo/org.kde.digikam.appdata.xml ./usr/share/metainfo/digikam.appdata.xml -cp -r /usr/share/metainfo/org.kde.showfoto.appdata.xml ./usr/share/metainfo/showfoto.appdata.xml +cp -r $INSTALL_DIR/share/metainfo/org.kde.digikam.appdata.xml ./usr/share/metainfo/digikam.appdata.xml +cp -r $INSTALL_DIR/share/metainfo/org.kde.showfoto.appdata.xml ./usr/share/metainfo/showfoto.appdata.xml # QWebEngine bin data files. -[[ -e /usr/ressources ]] && cp -r /usr/resources ./usr/ +[[ -e $INSTALL_DIR/ressources ]] && cp -r $INSTALL_DIR/resources ./usr/ # copy libgphoto2 drivers -find /usr/lib/libgphoto2 -name "*.so" -type f -exec cp {} ./usr/lib/libgphoto2 \; 2>/dev/null -find /usr/lib/libgphoto2_port -name "*.so" -type f -exec cp {} ./usr/lib/libgphoto2_port \; 2>/dev/null +find $INSTALL_DIR/lib/libgphoto2 -name "*.so" -type f -exec cp {} ./usr/lib/libgphoto2 \; 2>/dev/null +find $INSTALL_DIR/lib/libgphoto2_port -name "*.so" -type f -exec cp {} ./usr/lib/libgphoto2_port \; 2>/dev/null # copy sane backends -cp -r /usr/lib/sane ./usr/lib -cp -r /usr/etc/sane.d ./usr/etc +cp -r $INSTALL_DIR/lib/sane ./usr/lib +cp -r $INSTALL_DIR/etc/sane.d ./usr/etc # copy i18n # Qt translations files -if [[ -e /usr/translations ]]; then +if [[ -e $INSTALL_DIR/translations ]]; then - cp -r /usr/translations ./usr + cp -r $INSTALL_DIR/translations ./usr # optimizations rm ./usr/translations/assistant* rm ./usr/translations/designer* rm ./usr/translations/linguist* rm ./usr/translations/qmlviewer* rm ./usr/translations/qtmultimedia* rm ./usr/translations/qtscript* rm ./usr/translations/qtquick* rm ./usr/translations/qt_help* rm ./usr/translations/qtserialport* rm ./usr/translations/qtwebsockets* fi # KF5 translations files -FILES=$(cat $ORIG_WD/logs/build-extralibs.full.log | grep /usr/share/locale | grep -e .qm -e .mo | cut -d' ' -f3) +FILES=$(cat $ORIG_WD/logs/build-extralibs.full.log | grep $INSTALL_DIR/share/locale | grep -e .qm -e .mo | cut -d' ' -f3) for FILE in $FILES ; do cp --parents $FILE ./ done # digiKam translations files -FILES=$(cat $ORIG_WD/logs/build-digikam.full.log | grep /usr/share/locale | grep -e .qm -e .mo | cut -d' ' -f3) +FILES=$(cat $ORIG_WD/logs/build-digikam.full.log | grep $INSTALL_DIR/share/locale | grep -e .qm -e .mo | cut -d' ' -f3) for FILE in $FILES ; do cp --parents $FILE ./ done # digiKam icons files -FILES=$(cat $ORIG_WD/logs/build-digikam.full.log | grep /usr/share/icons/ | cut -d' ' -f3) +FILES=$(cat $ORIG_WD/logs/build-digikam.full.log | grep $INSTALL_DIR/share/icons/ | cut -d' ' -f3) for FILE in $FILES ; do cp --parents $FILE ./ done # Marble data and plugins files -cp -r /usr/$LIB_PATH_ALT/marble/plugins/ ./usr/bin/ +cp -r $INSTALL_DIR/lib/marble/plugins/ ./usr/bin/ -cp -r /usr/share/marble/data ./usr/bin/ +cp -r $INSTALL_DIR/share/marble/data ./usr/bin/ # otherwise segfaults!? cp $(ldconfig -p | grep /usr/$LIB_PATH_ALT/libsasl2.so.2 | cut -d ">" -f 2 | xargs) ./usr/lib/ cp $(ldconfig -p | grep /usr/$LIB_PATH_ALT/libGL.so.1 | cut -d ">" -f 2 | xargs) ./usr/lib/ cp $(ldconfig -p | grep /usr/$LIB_PATH_ALT/libGLU.so.1 | cut -d ">" -f 2 | xargs) ./usr/lib/ # Fedora 23 seemed to be missing SOMETHING from the Centos 6.7. The only message was: # This application failed to start because it could not find or load the Qt platform plugin "xcb". # Setting export QT_DEBUG_PLUGINS=1 revealed the cause. # QLibraryPrivate::loadPlugin failed on "/usr/lib64/qt5/plugins/platforms/libqxcb.so" : # "Cannot load library /usr/lib64/qt5/plugins/platforms/libqxcb.so: (/lib64/libEGL.so.1: undefined symbol: drmGetNodeTypeFromFd)" # Which means that we have to copy libEGL.so.1 in too # Otherwise F23 cannot load the Qt platform plugin "xcb" cp $(ldconfig -p | grep /usr/$LIB_PATH_ALT/libEGL.so.1 | cut -d ">" -f 2 | xargs) ./usr/lib/ # let's not copy xcb itself, that breaks on dri3 systems https://bugs.kde.org/show_bug.cgi?id=360552 #cp $(ldconfig -p | grep libxcb.so.1 | cut -d ">" -f 2 | xargs) ./usr/lib/ # For Fedora 20 -cp $(ldconfig -p | grep /usr/$LIB_PATH_ALT/libfreetype.so.6 | cut -d ">" -f 2 | xargs) ./usr/lib/ +#######cp $(ldconfig -p | grep $INSTALL_DIR/lib/libfreetype.so.6 | cut -d ">" -f 2 | xargs) ./usr/lib/ -cp /usr/bin/digikam ./usr/bin -cp /usr/bin/showfoto ./usr/bin -cp /usr/bin/kbuildsycoca5 ./usr/bin -cp /usr/bin/solid-hardware5 ./usr/bin +cp $INSTALL_DIR/bin/digikam ./usr/bin +cp $INSTALL_DIR/bin/showfoto ./usr/bin +cp $INSTALL_DIR/bin/kbuildsycoca5 ./usr/bin +cp $INSTALL_DIR/bin/solid-hardware5 ./usr/bin # QWebEngine runtime process -[[ -e /usr/libexec/QtWebEngineProcess ]] && cp /usr/libexec/QtWebEngineProcess ./usr/bin +[[ -e $INSTALL_DIR/libexec/QtWebEngineProcess ]] && cp $INSTALL_DIR/libexec/QtWebEngineProcess ./usr/bin # For Solid action when camera is connected to computer -cp /usr/bin/qdbus ./usr/share/digikam/utils +cp $INSTALL_DIR/bin/qdbus ./usr/share/digikam/utils sed -i "/Exec=/c\Exec=digikam-camera downloadFromUdi %i" ./usr/share/solid/actions/digikam-opencamera.desktop ################################################################################################# echo -e "---------- Scan dependencies recurssively\n" -CopyReccursiveDependencies /usr/bin/digikam ./usr/lib -CopyReccursiveDependencies /usr/bin/showfoto ./usr/lib -CopyReccursiveDependencies /usr/plugins/platforms/libqxcb.so ./usr/lib +CopyReccursiveDependencies $INSTALL_DIR/bin/digikam ./usr/lib +CopyReccursiveDependencies $INSTALL_DIR/bin/showfoto ./usr/lib +CopyReccursiveDependencies $INSTALL_DIR/plugins/platforms/libqxcb.so ./usr/lib -FILES=$(ls /usr/$LIB_PATH_ALT/libdigikam*.so) +FILES=$(ls $INSTALL_DIR/lib/libdigikam*.so) for FILE in $FILES ; do CopyReccursiveDependencies ${FILE} ./usr/lib done -#FILES=$(ls /usr/$LIB_PATH_ALT/plugins/imageformats/*.so) -# -#for FILE in $FILES ; do -# CopyReccursiveDependencies /usr/plugins/imageformats/*.so ./usr/lib -#done +FILES=$(ls $INSTALL_DIR/plugins/imageformats/*.so) + +for FILE in $FILES ; do + CopyReccursiveDependencies ${FILE} ./usr/lib +done # Copy in the indirect dependencies FILES=$(find . -type f -executable) for FILE in $FILES ; do CopyReccursiveDependencies ${FILE} ./usr/lib done ################################################################################################# echo -e "---------- Clean-up Bundle Directory Contents\n" ln -s libssl.so.10 usr/lib/libssl.so || true # The following are assumed to be part of the base system rm -f usr/lib/libcom_err.so.2 || true rm -f usr/lib/libcrypt.so.1 || true rm -f usr/lib/libdl.so.2 || true rm -f usr/lib/libexpat.so.1 || true rm -f usr/lib/libgcc_s.so.1 || true rm -f usr/lib/libglib-2.0.so.0 || true rm -f usr/lib/libgpg-error.so.0 || true rm -f usr/lib/libgssapi_krb5.so.2 || true rm -f usr/lib/libgssapi.so.3 || true rm -f usr/lib/libhcrypto.so.4 || true rm -f usr/lib/libheimbase.so.1 || true rm -f usr/lib/libheimntlm.so.0 || true rm -f usr/lib/libhx509.so.5 || true rm -f usr/lib/libICE.so.6 || true rm -f usr/lib/libidn.so.11 || true rm -f usr/lib/libk5crypto.so.3 || true rm -f usr/lib/libkeyutils.so.1 || true rm -f usr/lib/libkrb5.so.26 || true rm -f usr/lib/libkrb5.so.3 || true rm -f usr/lib/libkrb5support.so.0 || true # rm -f usr/lib/liblber-2.4.so.2 || true # needed for debian wheezy # rm -f usr/lib/libldap_r-2.4.so.2 || true # needed for debian wheezy rm -f usr/lib/libm.so.6 || true rm -f usr/lib/libp11-kit.so.0 || true rm -f usr/lib/libpcre.so.3 || true rm -f usr/lib/libpthread.so.0 || true rm -f usr/lib/libresolv.so.2 || true rm -f usr/lib/libroken.so.18 || true rm -f usr/lib/librt.so.1 || true rm -f usr/lib/libsasl2.so.2 || true rm -f usr/lib/libSM.so.6 || true rm -f usr/lib/libusb-1.0.so.0 || true rm -f usr/lib/libuuid.so.1 || true rm -f usr/lib/libwind.so.0 || true rm -f usr/lib/libfontconfig.so.* || true # Remove this library, else appimage cannot be started properly (Bug #390162) rm -f usr/lib/libopenal.so.1 || true # Remove these libraries, we need to use the system versions; this means 11.04 is not supported (12.04 is our baseline) rm -f usr/lib/libGL.so.* || true rm -f usr/lib/libdrm.so.* || true rm -f usr/lib/libX11.so.* || true rm -f usr/lib/libz.so.1 || true # These seem to be available on most systems but not Ubuntu 11.04 # rm -f usr/lib/libffi.so.6 usr/lib/libGL.so.1 usr/lib/libglapi.so.0 usr/lib/libxcb.so.1 usr/lib/libxcb-glx.so.0 || true # Delete potentially dangerous libraries rm -f usr/lib/libstdc* usr/lib/libgobject* usr/lib/libc.so.* || true rm -f usr/lib/libxcb.so.1 # Do NOT delete libX* because otherwise on Ubuntu 11.04: # loaded library "Xcursor" malloc.c:3096: sYSMALLOc: Assertion (...) Aborted # We don't bundle the developer stuff rm -rf usr/include || true rm -rf usr/lib/cmake3 || true rm -rf usr/lib/pkgconfig || true rm -rf usr/share/ECM/ || true rm -rf usr/share/gettext || true rm -rf usr/share/pkgconfig || true ################################################################################################# echo -e "---------- Strip Binaries Files \n" if [[ $DK_DEBUG = 1 ]] ; then FILES=$(find . -type f -executable | grep -Ev '(digikam|showfoto|exiv2)') else FILES=$(find . -type f -executable) fi for FILE in $FILES ; do echo -e "Strip symbols in: $FILE" strip ${FILE} 2>/dev/null || true done ################################################################################################# echo -e "---------- Strip Configuration Files \n" # Since we set $APP_IMG_DIR as the prefix, we need to patch it away too (FIXME) # Probably it would be better to use /app as a prefix because it has the same length for all apps cd usr/ ; find . -type f -exec sed -i -e 's|$APP_IMG_DIR/usr/|./././././././././|g' {} \; ; cd .. # On openSUSE Qt is picking up the wrong libqxcb.so # (the one from the system when in fact it should use the bundled one) - is this a Qt bug? # Also, Krita has a hardcoded /usr which we patch away cd usr/ ; find . -type f -exec sed -i -e 's|/usr|././|g' {} \; ; cd .. # We do not bundle this, so let's not search that inside the AppImage. # Fixes "Qt: Failed to create XKB context!" and lets us enter text sed -i -e 's|././/share/X11/|/usr/share/X11/|g' ./usr/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so sed -i -e 's|././/share/X11/|/usr/share/X11/|g' ./usr/lib/libQt5XcbQpa.so.5 # Workaround for: # D-Bus library appears to be incorrectly set up; # failed to read machine uuid: Failed to open # The file is more commonly in /etc/machine-id # sed -i -e 's|/var/lib/dbus/machine-id|//././././etc/machine-id|g' ./usr/lib/libdbus-1.so.3 # or rm -f ./usr/lib/libdbus-1.so.3 || true ################################################################################################# cd / APP=digikam #if [[ $DK_DEBUG = 1 ]] ; then # DEBUG_SUF="-debug" #fi if [[ "$ARCH" = "x86_64" ]] ; then APPIMAGE=$APP"-"$DK_RELEASEID$DK_EPOCH"-x86-64$DEBUG_SUF.appimage" elif [[ "$ARCH" = "i686" ]] ; then APPIMAGE=$APP"-"$DK_RELEASEID$DK_EPOCH"-i386$DEBUG_SUF.appimage" fi echo -e "---------- Create Bundle with AppImage SDK stage1\n" # Source functions if [[ ! -s ./functions.sh ]] ; then wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh fi . ./functions.sh # Install desktopintegration in usr/bin/digikam.wrapper cd $APP_IMG_DIR # We will use a dedicated bash script to run inside the AppImage to be sure that XDG_* variable are set for Qt5 cp ${ORIG_WD}/data/AppRun ./ # desktop integration rules -cp /usr/share/applications/org.kde.digikam.desktop ./digikam.desktop -cp /usr/share/icons/hicolor/64x64/apps/digikam.png ./digikam.png +cp $INSTALL_DIR/share/applications/org.kde.digikam.desktop ./digikam.desktop +cp $INSTALL_DIR/share/icons/hicolor/64x64/apps/digikam.png ./digikam.png mkdir -p $APP_IMG_DIR/usr/share/icons/default/128x128/apps -cp -r /usr/share/icons/hicolor/128x128/apps/digikam.png ./usr/share/icons/default/128x128/apps/digikam.png +cp -r $INSTALL_DIR/share/icons/hicolor/128x128/apps/digikam.png ./usr/share/icons/default/128x128/apps/digikam.png mkdir -p $APP_IMG_DIR/usr/share/icons/default/128x128/mimetypes -cp -r /usr/share/icons/hicolor/128x128/apps/digikam.png ./usr/share/icons/default/128x128/mimetypes/application-vnd.digikam.png - -# TODO: this AppImage sdk API is obsolete. -#get_desktopintegration digikam +cp -r $INSTALL_DIR/share/icons/hicolor/128x128/apps/digikam.png ./usr/share/icons/default/128x128/mimetypes/application-vnd.digikam.png mkdir -p $ORIG_WD/bundle rm -f $ORIG_WD/bundle/* || true echo -e "---------- Create Bundle with AppImage SDK stage2\n" cd / # Get right version of Appimage toolkit. if [[ "$ARCH" = "x86_64" ]] ; then APPIMGBIN=AppImageTool-x86_64.AppImage elif [[ "$ARCH" = "i686" ]] ; then APPIMGBIN=AppImageTool-i686.AppImage fi if [[ ! -s ./$APPIMGBIN ]] ; then wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/$APPIMGBIN -O ./$APPIMGBIN fi chmod a+x ./$APPIMGBIN ./$APPIMGBIN $APP_IMG_DIR/ $ORIG_WD/bundle/$APPIMAGE chmod a+rwx $ORIG_WD/bundle/$APPIMAGE ################################################################################################# # Show resume information and future instructions to host installer file to remote server echo -e "\n---------- Compute package checksums for digiKam $DK_RELEASEID\n" > $ORIG_WD/bundle/$APPIMAGE.sum echo "File : $APPIMAGE" >> $ORIG_WD/bundle/$APPIMAGE.sum echo -n "Size : " >> $ORIG_WD/bundle/$APPIMAGE.sum du -h "$ORIG_WD/bundle/$APPIMAGE" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum echo -n "MD5 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum md5sum "$ORIG_WD/bundle/$APPIMAGE" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum echo -n "SHA1 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum sha1sum "$ORIG_WD/bundle/$APPIMAGE" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum echo -n "SHA256 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum sha256sum "$ORIG_WD/bundle/$APPIMAGE" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum # Checksums to post on Phabricator at release time. sha256sum "$ORIG_WD/bundle/$APPIMAGE" > $ORIG_WD/bundle/sha256_release.sum if [[ $DK_SIGN = 1 ]] ; then cat ~/.gnupg/dkorg-gpg-pwd.txt | gpg --batch --yes --passphrase-fd 0 -sabv "$ORIG_WD/bundle/$APPIMAGE" mv -f $ORIG_WD/bundle/$APPIMAGE.asc $ORIG_WD/bundle/$APPIMAGE.sig echo "File : $APPIMAGE.sig" >> $ORIG_WD/bundle/$APPIMAGE.sum echo -n "Size : " >> $ORIG_WD/bundle/$APPIMAGE.sum du -h "$ORIG_WD/bundle/$APPIMAGE.sig" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum echo -n "MD5 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum md5sum "$ORIG_WD/bundle/$APPIMAGE.sig" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum echo -n "SHA1 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum sha1sum "$ORIG_WD/bundle/$APPIMAGE.sig" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum echo -n "SHA256 sum : " >> $ORIG_WD/bundle/$APPIMAGE.sum sha256sum "$ORIG_WD/bundle/$APPIMAGE.sig" | { read first rest ; echo $first ; } >> $ORIG_WD/bundle/$APPIMAGE.sum # Checksums to post on Phabricator at release time. sha256sum "$ORIG_WD/bundle/$APPIMAGE.sig" >> $ORIG_WD/bundle/sha256_release.sum fi cat $ORIG_WD/bundle/$APPIMAGE.sum if [[ $DK_UPLOAD = 1 ]] ; then echo -e "---------- Cleanup older bundle AppImage files from files.kde.org repository \n" if [[ "$ARCH" = "x86_64" ]] ; then ssh $DK_UPLOADURL rm -f $DK_UPLOADDIR*-x86-64*.appimage* elif [[ "$ARCH" = "i686" ]] ; then ssh $DK_UPLOADURL rm -f $DK_UPLOADDIR*-i386*.appimage* fi echo -e "---------- Upload new bundle AppImage files to files.kde.org repository \n" scp $ORIG_WD/bundle/$APPIMAGE $DK_UPLOADURL:$DK_UPLOADDIR scp $ORIG_WD/bundle/$APPIMAGE.sum $DK_UPLOADURL:$DK_UPLOADDIR if [[ $DK_SIGN = 1 ]] ; then scp $ORIG_WD/bundle/$APPIMAGE.sig $DK_UPLOADURL:$DK_UPLOADDIR fi else echo -e "\n------------------------------------------------------------------" curl https://download.kde.org/README_UPLOAD echo -e "------------------------------------------------------------------\n" fi ################################################################################################# TerminateScript diff --git a/project/bundles/appimage.master/04-build-linuxdeployqt.sh b/project/bundles/appimage/04-build-linuxdeployqt.sh similarity index 100% rename from project/bundles/appimage.master/04-build-linuxdeployqt.sh rename to project/bundles/appimage/04-build-linuxdeployqt.sh diff --git a/project/bundles/appimage/README b/project/bundles/appimage/README index b2c6989636..93834e7594 100644 --- a/project/bundles/appimage/README +++ b/project/bundles/appimage/README @@ -1,165 +1,165 @@ RESUME ------ This scripts build a binary digiKam AppImage bundle for Linux using CentOS 6. AUTHORS ------- -(c) 2015-2018 by : +(c) 2015-2019 by : Gilles Caulier DESCRIPTION ----------- These files and scripts are used to make binary AppImage bundle of the digiKam Software Collection for Linux. For more information about AppImage, see at this url: http://appimage.org/ In addition to this README, there are comments in the scripts that provide some additional explanation for how they work. BUNDLE CONTENTS --------------- -Note : the bundle is rellocable. +Note : the bundle is relocatable. . └── usr ├── bin Main executable │   ├── data Marble data │   └── plugins Marble plugins ├── lib All Shared libraries, including 64 bits ├── lib64 -> lib Symbolic link, for compatibility ├── plugins Qt5 based plugins │   ├── bearer │   ├── designer │   ├── generic │   ├── geoservices │   ├── iconengines │   ├── imageformats │   ├── kauth KF5 authentification │   ├── kf5 Generic KF5 plugins │   ├── mediaservice │   ├── org.kde.kglobalaccel5.platforms KF5 global accelerators │   ├── platforminputcontexts │   ├── platforms │   ├── playlistformats │   ├── position │   ├── sensorgestures │   ├── sensors │   ├── sqldrivers │   ├── webkit │   └── xcbglintegrations ├── share Shared data files │   ├── digikam digiKam │   ├── knotifications5 KF5 │   ├── kservices5 KF5 │   ├── kservicetypes5 KF5 │   ├── kxmlgui5 KF5 │   ├── lensfun Lens database for Lensfun │   ├── locale KF5 i18n │   ├── metainfo Application metadata │   ├── OpenCV OpenCv shared lib data │   └── solid KF5 Solid └── translations Qt5 i18n REQUIREMENTS ------------ - For technical reasons about compatibility with libc, CentOS 6 is used to be compatible at run-time under other Linux distributions. - Create a fresh CentOS 6 environment in a Virtual Machine: Install from CentOS-6.8-x86_64-bin-DVD1.iso (from Pasteur institue mirror for ex: http://ftp.pasteur.fr/mirrors/CentOS/6.10/isos/) yum install git git clone git://anongit.kde.org/digikam.git DK cd DK/project/appimage/ - You must set the digiKam git tags to checkout right source code in bundle. - You must set the option to host debug symbols or not in bundle. NOTE: Look in config.sh file for settings details. COMPONENTS ---------- There are 4 scripts to be run by the user. 2 first ones installs components on CentOS 6 and all dependencies, next one digiKam, and last one makes a binary AppImage bundle for Linux. SCRIPT DESCRIPTIONS ------------------- All scripts should be run from within this directory. * 01-build-centos6.sh: This script downloads and configures all packages for CentOS 6 to compile digiKam, KF5, Qt5, and all other important low level libraries. When the system is ready, this script compile and install low level and Qt5 libraries. * 02-build-extralibs.sh: This script configures, compile, and install KF5 frameworks and Marble. * 03-build-digikam.sh: This script configures, and compile digiKam. * 04-build-installer.sh: Once you've successfully built digiKam, this script create the AppImage bundle. This include applications documentations and translations. Depending of configuration done in config.sh, this script is able to upload automatically the bundle file on files.kde.org digiKam area through ssh. A valid ssh key configured with remote KDE server need to be set previously with the account. You can load ssh key at startup following these instructions: 1/ As root, mkdir /root/.ssh 2/ Put your ssh keys in /root/.ssh 3/ Edit /root/.bashrc and add these lines at end: # --- ssh key rules if [ ! -S ~/.ssh/ssh_auth_sock ]; then eval `ssh-agent` ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock fi export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock ssh-add -l > /dev/null || ssh-add # --- Note: the bundle can be signed with GPG. You must setup your private and public keys before and put your passphare to a text file (~/.gnupg/dkorg-gpg-pwd.txt) -4/ Re-login as root to setup password. +4/ Re-login as root to setup password using "su -". Source : https://unix.stackexchange.com/questions/90853/how-can-i-run-ssh-add-automatically-without-password-prompt * makeall.sh This script permit to build whole Linux bundle from scratch in one time. * update.sh This script re-build only digiKam and Linux bundle. AT RUN-TIME ON TARGET COMPUTER ------------------------------ - Make AppImage file executable (CentOS : chmod +x _bundle_file_). - Add Fuse on on computer (CentOS : yum install fuse). - Add user right to use Fuse (CentOS : usermod -a -G fuse _user_name_). LICENSES -------- The scripts and other contents of this package are licensed under the GNU General Public License version 2, or any later version. diff --git a/project/bundles/appimage/common.sh b/project/bundles/appimage/common.sh index c6f6fb57f8..f230a6d3aa 100755 --- a/project/bundles/appimage/common.sh +++ b/project/bundles/appimage/common.sh @@ -1,101 +1,101 @@ #!/bin/bash # Copyright (c) 2013-2019, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. ######################################################################## # Check if run as root ChecksRunAsRoot() { if [[ $EUID -ne 0 ]]; then echo "This script should be run as root using sudo command." exit 1 else echo "Check run as root passed..." fi } ######################################################################## # Check CPU core available (Linux or MacOS) ChecksCPUCores() { CPU_CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) if [[ $CPU_CORES -gt 1 ]]; then CPU_CORES=$((CPU_CORES-1)) fi echo "CPU Cores to use : $CPU_CORES" } ######################################################################## # For time execution measurement ; startup StartScript() { BEGIN_SCRIPT=$(date +"%s") } ######################################################################## # For time execution measurement : shutdown TerminateScript() { TERMIN_SCRIPT=$(date +"%s") difftimelps=$(($TERMIN_SCRIPT-$BEGIN_SCRIPT)) echo "Elaspsed time for script execution : $(($difftimelps / 3600 )) hours $((($difftimelps % 3600) / 60)) minutes $(($difftimelps % 60)) seconds" } ######################################################################## # Adjust devel env.for Centos6 CentOS6Adjustments() { # Chek if we are inside CentOS 6 or not. grep -r "CentOS release 6" /etc/redhat-release || exit 1 # That's not always set correctly in CentOS 6.7 export LC_ALL=en_US.UTF-8 export LANG=en_us.UTF-8 # Determine which architecture should be built if [[ "$(arch)" = "i686" || "$(arch)" = "x86_64" ]] ; then ARCH=$(arch) echo "Architecture is $ARCH" else echo "Architecture could not be determined" exit 1 fi # if the library path doesn't point to our usr/lib, linking will be broken and we won't find all deps either export LD_LIBRARY_PATH=/usr/lib64/:/usr/lib:/digikam.appdir/usr/lib } ######################################################################## # Copy dependencies with ldd analysis # arg1 : original file path to parse. # arg2 : target path to copy dependencies CopyReccursiveDependencies() { echo "Scan dependencies for $1" FILES=$(ldd $1 | grep "=>" | awk '{print $3}') for FILE in $FILES ; do if [ -f "$FILE" ] ; then - cp $FILE $2 2> /dev/null || true + cp -u $FILE $2 2> /dev/null || true # echo " ==> $FILE" fi done } diff --git a/project/bundles/appimage/config.sh b/project/bundles/appimage/config.sh index d8530bf622..904098f906 100644 --- a/project/bundles/appimage/config.sh +++ b/project/bundles/appimage/config.sh @@ -1,47 +1,60 @@ #!/bin/bash # Copyright (c) 2015-2019, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. ######################################################################## # Absolute path where are downloaded all tarballs to compile. -DOWNLOAD_DIR="/d" +DOWNLOAD_DIR="/digikam.appimage/download" # Absolute path where are compiled all tarballs -BUILDING_DIR="/b" +BUILDING_DIR="/digikam.appimage/build" + +# Absolute path where are installed all software components +INSTALL_DIR="/usr" + +# Absolute path where are bundled all software components +APP_IMG_DIR="/digikam.appimage/appdir" + +# Setup variables needed to help everything find what we build + +#export PATH=$INSTALL_DIR/bin:$PATH +#export LD_LIBRARY_PATH=$INSTALL_DIR/lib:$INSTALL_DIR/lib64:$LD_LIBRARY_PATH +#export PKG_CONFIG_PATH=$INSTALL_DIR/share/pkgconfig:$INSTALL_DIR/lib/pkgconfig::$INSTALL_DIR/lib64/pkgconfig/usr/lib/pkgconfig:$PKG_CONFIG_PATH +#export CMAKE_PREFIX_PATH=$INSTALL_DIR:$CMAKE_PREFIX_PATH ######################################################################## # URL to git repository to checkout digiKam source code # Read/write url is an alternative when official read only server is down. #DK_GITURL="git://anongit.kde.org/digikam.git" DK_GITURL="git@git.kde.org:digikam" # Location to build source code. DK_BUILDTEMP=$BUILDING_DIR/dktemp # digiKam tag version from git. Official tarball do not include extra shared libraries. # The list of tags can be listed with this url: https://quickgit.kde.org/?p=digikam.git&a=tags # If you want to package current implemntation from git, use "master" as tag. -#DK_VERSION=v5.5.0 +#DK_VERSION=v6.0.0 DK_VERSION=master -#DK_VERSION=gsoc18-exporttools-o2 +#DK_VERSION=development/dplugins # Installer sub version to differentiates newer updates of the installer itself, even if the underlying application hasn’t changed. #DK_EPOCH="-01" # Epoch with time-stamp for pre-release bundle in ISO format DK_EPOCH="-`date "+%Y%m%dT%H%M%S"`" # Installer will include or not digiKam debug symbols DK_DEBUG=1 # Sign bundles with GPG. Passphrase must be hosted in ~/.gnupg/dkorg-gpg-pwd.txt DK_SIGN=0 # Upload automatically bundle to files.kde.org (pre-release only). -DK_UPLOAD=1 -DK_UPLOADURL="digikam@racnoss.kde.org" +DK_UPLOAD=0 +DK_UPLOADURL="digikam@milonia.kde.org" DK_UPLOADDIR="/srv/archives/files/digikam/" diff --git a/project/bundles/appimage/data/AppRun b/project/bundles/appimage/data/AppRun index 16a075af19..d582f580ba 100755 --- a/project/bundles/appimage/data/AppRun +++ b/project/bundles/appimage/data/AppRun @@ -1,132 +1,132 @@ #!/bin/bash # Main AppImage script to wrap XDG_* variable properly for Qt5. # # Copyright (c) 2015-2019, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # preload_shared_library () { FILE=$1 - echo $FILE + echo "$FILE" if [[ "$(arch)" = "x86_64" ]] ; then # 64 bits system if [ -f "/usr/lib64/$FILE" ] ; then export LD_PRELOAD=$LD_PRELOAD:/usr/lib64/$FILE - elif [ -f "/usr/lib/x86_64-linux-gnu/$FILE" ] ; then + elif [ -f "/usr/lib/x86_64-linux-gnu/$FILE" ] ; then export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/$FILE - elif [ -f "/lib/x86_64-linux-gnu/$FILE" ] ; then + elif [ -f "/lib/x86_64-linux-gnu/$FILE" ] ; then export LD_PRELOAD=$LD_PRELOAD:/lib/x86_64-linux-gnu/$FILE fi else # 32 bits system if [ -f "/usr/lib/$FILE" ] ; then export LD_PRELOAD=$LD_PRELOAD:/usr/lib/$FILE elif [ -f "/usr/lib/i386-linux-gnu/$FILE" ] ; then export LD_PRELOAD=$LD_PRELOAD:/usr/lib/i386-linux-gnu/$FILE elif [ -f "/lib/i386-linux-gnu/$FILE" ] ; then export LD_PRELOAD=$LD_PRELOAD:/lib/i386-linux-gnu/$FILE fi fi } preload_shared_library libfreetype.so preload_shared_library libudev.so echo "-- digiKam AppImage Bundle" echo "-- Use 'help' as CLI argument to know all available options for digiKam application" echo "-- Preloading shared libs: $LD_PRELOAD" DIR="`dirname \"$0\"`" DIR="`( cd \"$DIR\" && pwd )`" export APPDIR=$DIR export APPIMAGE_ORIGINAL_LD_LIBRARY_PATH=$LD_LIBRARY_PATH export APPIMAGE_ORIGINAL_QT_PLUGIN_PATH=$QT_PLUGIN_PATH export APPIMAGE_ORIGINAL_XDG_DATA_DIRS=$XDG_DATA_DIRS export APPIMAGE_ORIGINAL_PATH=$PATH export LD_LIBRARY_PATH=$DIR/usr/lib/:$LD_LIBRARY_PATH export QT_PLUGIN_PATH=$DIR/usr/plugins/ export XDG_DATA_DIRS=$DIR/usr/share/:$XDG_DATA_DIRS export PATH=$DIR/usr/bin:$DIR/usr/lib:$DIR/usr/lib/libexec/kf5:$DIR/usr/share/digikam/utils:$PATH export KDE_FORK_SLAVES=1 export CAMLIBS=$DIR/usr/lib/libgphoto2 export IOLIBS=$DIR/usr/lib/libgphoto2_port # code to disable Plasma desktopk detection with QDesktopService export APPIMAGE_ORIGINAL_KDE_FULL_SESSION=$KDE_FULL_SESSION export APPIMAGE_ORIGINAL_DESKTOP_SESSION=$DESKTOP_SESSION export APPIMAGE_ORIGINAL_XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP export APPIMAGE_ORIGINAL_XDG_SESSION_DESKTOP=$XDG_SESSION_DESKTOP #unset KDE_FULL_SESSION #unset DESKTOP_SESSION #unset XDG_CURRENT_DESKTOP #unset XDG_SESSION_DESKTOP # if no customized Qt debug loggin variable is set, turn on one for a better readability if [ -z "$QT_MESSAGE_PATTERN" ]; then export QT_MESSAGE_PATTERN="`echo -e "\033[34m%{function}\033[0m: %{message}"`" fi export APPIMAGE_STARTUP_LD_LIBRARY_PATH=$LD_LIBRARY_PATH export APPIMAGE_STARTUP_QT_PLUGIN_PATH=$QT_PLUGIN_PATH export APPIMAGE_STARTUP_XDG_DATA_DIRS=$XDG_DATA_DIRS export APPIMAGE_STARTUP_PATH=$PATH # Parse CLI options. if [[ $1 == "showfoto" ]] ; then # Run Showfoto as well. showfoto ${@:2} elif [[ $1 == "debug" ]] ; then if [[ $2 == "showfoto" ]] ; then # Showfoto in debug mode. echo "Starting Showfoto into GDB..." echo "Use 'bt' command on debugger prompt to get a crash backtrace." echo "Use 'q' command to quit debugger session." gdb -ex=r --args showfoto ${@:3} else # digiKam in debug mode. echo "Starting digiKam into GDB..." echo "Use 'bt' command on debugger prompt to get a crash backtrace." echo "Use 'q' command to quit debugger session." gdb -ex=r --args digikam ${@:2} fi elif [[ $1 == "help" ]] ; then # digiKam/Showfoto CLI help. echo "digiKam AppImage bundle CLI options:" echo " without option : run digiKam." echo " : run Showfoto instead digiKam." echo " : run digiKam into GDB." echo " : run Showfoto into GDB." echo " : show these information." else # Run digiKam as well. digikam $@ fi