File PKGBUILD of Package linphone-desktop

# Fix for error: bsdtar: Failed to set default locale
# LANG=en_US.UTF-8 # not available, use C or POSIX
LANG=C
LANG=C.UTF-8
LC_ALL=${LANG}
# Get some information about the machine we are building on:
_numberOfProcessorsOnMachine=$(nproc)
_wantedJobs=$(echo "1.1*${_numberOfProcessorsOnMachine}" | bc -l)
_jobsIget=$(echo ${_wantedJobs} | awk '{print int($1+0.5)}')
_TOTAL_DISK=$(df -h --total | awk 'END{print $2}')
_FREEMEM=$(free --mega)
_TOTAL_MEM=$(free --total --mega | xargs | awk '{print $19"MB"}')
_TOTAL_RAM=$(free --total --mega | xargs | awk '{print $8"MB"}')
_TOTAL_SWAP=$(free --total --mega | xargs | awk '{print $15"MB"}')
pkgname=linphone-desktop
pkgver=6.0.1
pkgrel=1
pkgdesc='A free VoIP and video softphone based on the SIP protocol'
arch=(x86_64)
url='http://linphone.org'
license=(GPL)
#depends: 'qt6-graphicaleffects' 'qt6-quickcontrols' 'qt6-quickcontrols2'
# 'qt6=6.9.0'
depends=('qt6-base' 'qt6-multimedia' 'qt6-svg' 'qt6-speech' 'libxcrypt-compat'
        v4l-utils
        glew)
optdepends=('linphone-contacts-vcard-csv-import-export: linphone contacts vCard CSV avatar import export'
            'firejail-linphone-desktop: firejail linphone profile adjustments'
            'firetools-linphone-desktop: add linphone to firetools'
            'firejail: sandbox'
            'firetools: firejail GUI')
#makedepends: 'qt6-quickcontrols2'
# 'qt6=6.6.2' 'cmake=3.28.3'
makedepends=('coreutils' 'procps-ng' 'bc' 'git' 'gendesk' 'gcc' 'cmake' 
             'meson' 'yasm' 'nasm' 'doxygen' 'perl' 'python-pystache' 
             'python-six' 'libpulse' 'libxext'
             'qt6-base' 'qt6-declarative' 'qt6-networkauth' 'qt6-svg' 'qt6-tools')
# git download has to go into _service file
# modified to save also .git folder
# which is by default removed by download service:
# source=("${pkgname}-${pkgver}.tar.xz::git+https://github.com/BelledonneCommunications/linphone-desktop.git#commit=abcdefa"
source=("${pkgname}-${pkgver}.tar.xz"
        "linphone.png::https://gitlab.linphone.org/BC/public/linphone-desktop/-/raw/8dfd384e3df08b200c8eb382b740da6839961bf0/linphone-app/assets/icons/hicolor/128x128/apps/icon.png"
       )
sha512sums=('SKIP'
            'd6495cdc022b1e4c92b3641cb70347e7e6b6ef47599004de729e908b4876a12540713ab54b588611c99c8025fb9b33e3392573c85c13f72cdaee8bcf7a73d65d'
           )
options=()
_uploaddir=/usr/src/packages/SOURCES
_sourcedir=/usr/src/packages/BUILD/${pkgname}/src/${pkgname}-${pkgver}
# srcdir is already defined as
# ${srcdir}=/usr/src/packages/BUILD/${pkgname}/src
_builddir=/usr/src/packages/BUILD/${pkgname}/build
_pkgdir=/usr/src/packages/BUILD/${pkgname}/pkg/${pkgname}
_TITLE="Linphone"
_executable=linphone
_install_prefix=/opt/${_executable}
_alternative_one=true
_alternative_two=false
_use_qt_everywhere=false
_sdkver=$(echo ${pkgver} | cut -d' ' -f 2 | sed 's/[(,)]//g' | cut -d'.' -f 1-3)
#_icon_name=${_executable}
_icon_name=${pkgname}
_icon=${pkgdir}/usr/share/icons/hicolor/scalable/apps/${_icon_name}.svg

build() {
  echo "--- Machine data we are building on ---"
  echo "Total disk: $_TOTAL_DISK"
  echo "Output of free -h:"
  echo "$_FREEMEM"
  echo "Total memory: $_TOTAL_MEM"
  echo "Total RAM: $_TOTAL_RAM"
  echo "Total SWAP: $_TOTAL_SWAP"
  echo "_numberOfProcessorsOnMachine=$_numberOfProcessorsOnMachine"
  echo "_wantedJobs=$_wantedJobs"
  echo "_jobsIget=$_jobsIget"
  echo "--- End machine data we are building on ---"
  #echo "--- Apply patches ---"
  #PATCHDIR=${_sourcedir}
  #PATCHFILE=${_uploaddir}/0001-build-out-of-git.patch
  #echo PATCHDIR=$PATCHDIR
  #echo PATCHFILE=$PATCHFILE
  #patch -s -p1 --directory=$PATCHDIR --remove-empty-files --force -i $PATCHFILE
  #echo "--- End apply patches ---"
  cd "$srcdir/${pkgname}-${pkgver}"

  # git download has to go into _service file:
  # git submodule update --init --recursive
  mkdir -p build build/OUTPUT && cd build

  if ${_use_qt_everywhere}; then
    export Qt6_ROOT_DIR=/opt/Qt6.6.2
    export Qt6_LIB_DIR=$(Qt6_ROOT_DIR)/lib
    export Qt6_DIR=$(Qt6_LIB_DIR)/cmake/Qt6
    export PATH=$(Qt6_ROOT_DIR)/bin:$(ORIGPATH)
    export TOOLCHAIN=$(Qt6_DIR)/qt.toolchain.cmake
    export CFLAGS=$(echo "$CFLAGS -Wno-error=maybe-uninitialized -Wno-error=unused-parameter -Wno-error=return-type -Wno-error=implicit-function-declaration -Wno-error=deprecated-declarations")
    export CXXFLAGS=$(echo "$CXXFLAGS -Wno-error=maybe-uninitialized -Wno-error=unused-parameter -Wno-error=return-type -Wno-error=implicit-function-declaration -Wno-error=deprecated-declarations")
  else
    export TOOLCHAIN=/usr/lib/cmake/Qt6/qt.toolchain.cmake    
  fi

  # -DCMAKE_BUILD_TYPE=RelWithDebInfo
  # -DCMAKE_BUILD_TYPE=Release
  # LINPHONESDK_STATE can be: snapshots releases or empty.
  # LINPHONESDK_BRANCH can be: alpha beta or empty. '-alpha.14' '-beta.12'
  # -DCMAKE_TOOLCHAIN_FILE=/usr/lib/cmake/Qt6/qt.toolchain.cmake
  cmake .. \
        -DCMAKE_C_COMPILER=/usr/bin/gcc \
        -DCMAKE_CXX_COMPILER=/usr/bin/g++ \
        -DCMAKE_BUILD_PARALLEL_LEVEL=${_jobsIget} \
        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
        -DENABLE_PQCRYPTO=YES \
        -DCMAKE_SKIP_INSTALL_RPATH=YES \
        -DCMAKE_INSTALL_PREFIX=${_install_prefix} \
        -DLINPHONEAPP_VERSION=${_sdkver} \
        -DLINPHONESDK_VERSION=${_sdkver} \
        -DLINPHONESDK_STATE="snapshots" \
        -DLINPHONESDK_BRANCH="-alpha.384" \
        -DENABLE_LDAP=OFF \
        -DENABLE_BUILD_VERBOSE=ON \
        -DCMAKE_VERBOSE_MAKEFILE=ON \
        -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
        -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}
  # --config RelWithDebInfo
  # --config Release
  cmake --build . --target install --parallel ${_jobsIget} --config RelWithDebInfo

  cd "$srcdir"
  if ${_alternative_one}; then
    # Alternative 1
    gendesk -f -n \
            --pkgname="${pkgname}" \
            --pkgdesc="${pkgdesc}" \
            --name="${_TITLE}" \
            --genericname="VoIP Client" \
            --categories=Network \
            --icon="linphone.png" \
            --exec=${_install_prefix}/${_executable}-launcher \
            --terminal=false \
            --startupnotify=true \
            --comment "SIP phone Linphone"
    # End alternative 1
  fi
  if ${_alternative_two}; then
    # Alternative 2
    gendesk -f -n \
            --pkgname="${pkgname}" \
            --pkgdesc="${pkgdesc}" \
            --name="${_TITLE}" \
            --genericname="VoIP Client" \
            --categories=Network \
            --icon="linphone.png" \
            --exec=${_install_prefix}/bin/${_executable} \
            --terminal=false \
            --startupnotify=true \
            --comment "SIP phone Linphone"
    # End alternative 2
  fi
  ls -al
  echo cat ${executable}*.desktop
  cat ${executable}*.desktop
  mv -v ${executable}*.desktop "tmp.desktop"
  mv -v "tmp.desktop" "${pkgname}.desktop"
}

package() {
  mkdir -p "$pkgdir${_install_prefix}/"
  
  echo "--- Exchange nowebcamCIF.jpg ---"
  cp -v "${_uploaddir}/static.jpg" "$srcdir/${pkgname}-${pkgver}/build/OUTPUT/share/images/nowebcamCIF.jpg"

  if ${_alternative_two}; then
    # Alternative 2
    # Other programs such as emacs crash if libxml2.so* exists
    # in ${_install_prefix}/lib so we remove it and 
    # use system libxml2 instead
    rm -vf "$srcdir/${pkgname}-${pkgver}/build/OUTPUT/lib/libxml2.so.2"
    rm -vf "$srcdir/${pkgname}-${pkgver}/build/OUTPUT/lib/libxml2.so"
    # End alternative 2
  fi
  
  cp -r "$srcdir/${pkgname}-${pkgver}/build/OUTPUT/." "${pkgdir}${_install_prefix}/"

  mkdir -p "$pkgdir/usr/share/applications/"
  echo ls -al "$srcdir"
  ls -al "$srcdir"
  install -Dm644 "$srcdir/${pkgname}.desktop" "$pkgdir/usr/share/applications/${pkgname}.desktop"

  mkdir -p "$pkgdir/usr/share/pixmaps/"
  echo ls -al "$srcdir"
  ls -al "$srcdir"
  install -Dm644 "$srcdir/linphone.png" "$pkgdir/usr/share/pixmaps/${pkgname}.png"
  
  mkdir -p "${pkgdir}/usr/share/icons/hicolor/scalable/apps" 
#  cat <<EOF > "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"  
#<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
#  <path fill="#f5f5f5" d="M485.4 999.7a2 2 0 0 1 1.2 0c.4.1 0 .2-.6.2s-1 0-.6-.2zm28 0a2 2 0 0 1 1.2 0c.4.1 0 .2-.6.2s-1 0-.6-.2zm-23.5-37.5a2 2 0 0 1 1.2 0c.4.1 0 .2-.6.2s-1 0-.6-.2zm19.2 0a2.9 2.9 0 0 1 1.5 0c.4.1 0 .2-.9.2-.8 0-1-.1-.6-.3zm9-.6a2.9 2.9 0 0 1 1.5 0c.4.2 0 .3-.9.3-.8 0-1-.1-.6-.3zm-47.2-.5 1 .1c.1.2-.2.3-.7.3-.6 0-.7-.2-.3-.3zm92.5-3.4a2 2 0 0 1 1.2 0c.4.1 0 .2-.6.2s-1 0-.6-.2zm60.5-12.5c.4-.2.8-.2 1 0 .1.2-.2.3-.7.3-.6 0-.7-.2-.3-.3zM615 842.5a260 260 0 0 1-69-19.4 484 484 0 0 1-82.5-49.4c-44.1-33.2-94-86.7-149.5-160.4a420.7 420.7 0 0 0-11.5-15.2 6 6 0 0 0-1.4-2.2 28 28 0 0 1-2.3-3.2 25.9 25.9 0 0 0-2.6-3.7c-1-1.2-2.2-3-2.7-4s-2.3-3.4-4-5.5a42.2 42.2 0 0 1-3.8-5.5c-.5-.9-3.1-5.3-6-9.7a571.6 571.6 0 0 1-30.3-52.6 570.6 570.6 0 0 1-25.7-56 122 122 0 0 0-3.5-8.5c-.9-1.4-7.2-21-9.9-30.8a269.5 269.5 0 0 1-10.9-84.4c1.7-29 8.2-51 21.4-72.1 5.6-9 8.7-13 17.2-21.6l7.8-7.9 3 4a517 517 0 0 1 5.6 7 181.5 181.5 0 0 0 7.1 9.1l5.3 7.1 6 7.8a183.3 183.3 0 0 0 6.8 8.7 57.1 57.1 0 0 0 2.6 3.5 586.2 586.2 0 0 1 8.4 10.8 260.3 260.3 0 0 0 15.5 20 44 44 0 0 1 2.8 3.5c.4.8 1.4 2 2.1 2.9l2 2.5 3.9 5a529.3 529.3 0 0 1 11.3 14.7 332.5 332.5 0 0 0 7 9 711.7 711.7 0 0 0 12 15.3c7.7 9.8 10.3 12.8 10.8 12.4.3-.1.5.2.5.8 0 1.2.6 2.1 7.3 10.5l6.1 8 1.6 2.1-2 4a24 24 0 0 0-2 4.6c0 .5-.2.8-.5.8s-.5.2-.4.4c0 .2-.4 2-1 3.9-4.3 13.2-1.2 35 7.4 52.2 14 27.8 70.3 104 112 151.5 7.3 8.2 19.8 20.7 26 26l5.5 4.6a81.5 81.5 0 0 0 22 12.8c0 1.3 13.9 3 17.4 2.3 1-.2 5.4-.4 9.7-.3l7.8.1 4 5.1c27 35 109 144.1 116 154.3 3.1 4.7 3 5-2.7 8.4a119 119 0 0 1-48.6 16.2c-7.4.7-22.7 1-29.1.5zm207-11.2a10.9 10.9 0 0 1 2-1.8l-1.5 1.8a10.9 10.9 0 0 1-2 1.7l1.5-1.8zm7.8-7.8c.5-.6 1-1 1.1-1 .1 0-.1.5-.7 1l-1.1 1c-.1 0 .2-.5.7-1zm-120.5-12.4c-3.4-2.2-4-2.8-39.1-48.4-53-68.6-86.2-113-87-116-.5-1.9 1.6-4.4 9.6-12 14-13.4 43.7-34.2 51.6-36.2 1.7-.4 2.4-.4 3.5.2 3 1.5 10.4 8.7 16.7 16.2a556 556 0 0 1 20.9 25.9l7.3 9.2c1 1.1 20.5 27 31.7 42 25.4 34.3 44.5 61.7 46.3 66.3l.8 2.2-1.7 2.9a232.2 232.2 0 0 1-54.2 47c-3.6 1.9-4.4 2-6.5.7zm147.2-17.3.9-.9c.8-.6.8-.6.2.2-.7.8-1.1 1.1-1.1.7zm-818-264.6c0-.6.2-.7.3-.3.2.4.2.8 0 1-.2.1-.3-.2-.3-.7zm-.4-9.7c0-1 .1-1.4.2-.9a4.1 4.1 0 0 1 0 1.8c0 .5-.2 0-.2-.9zm923.5-.3c0-.8.1-1 .3-.6a3 3 0 0 1 0 1.5c-.2.4-.3 0-.3-.9zm-15.5-3.5c0-1 .1-1.5.2-.8.2.6.2 1.5 0 2 0 .5-.2 0-.2-1.1zm-946-1.5c0-.8.1-1 .3-.6a3 3 0 0 1 0 1.5c-.2.4-.3 0-.3-.9zm999.5-.5c0-.8.1-1 .3-.6a3 3 0 0 1 0 1.5c-.2.4-.3 0-.3-.9zm-999.5-7c0-1 .1-1.4.2-.8.2.6.2 1.5 0 2 0 .5-.2 0-.2-1.1zm0-14.2c0-.7 0-1 .2-.6.2.3.2.9 0 1.2-.1.4-.2 0-.2-.6zm37.4-2.3c0-.6.2-.7.3-.3.2.4.2.8 0 1-.2.1-.3-.2-.3-.7zm908.7-4.7c0-2 0-2.9.2-1.9v3.8c-.1 1-.2.2-.2-1.9zM0 486c0-.7 0-1 .2-.6.2.3.2.9 0 1.2-.1.4-.2 0-.2-.6Zm38-5.3c0-.8.1-1 .3-.6a3 3 0 0 1 0 1.5c-.2.4-.3 0-.3-.9zm923.5-.2c0-.7 0-1 .2-.6.2.3.2.9 0 1.2-.1.4-.2 0-.2-.6zm-578-95.7a1006 1006 0 0 1-51.8-64.5 59423 59423 0 0 1-50.7-67 9661 9661 0 0 0-15.7-20.7c-6.9-9-7.7-10.4-7.2-11.2a339.8 339.8 0 0 1 54.7-39.8c5.6-2.9 14.3-6.6 15.2-6.6.4 0 1.8 1.5 3.2 3.4l5.4 7a4959.5 4959.5 0 0 1 22 28.9 1058.9 1058.9 0 0 0 12.3 16l6.3 8a148.4 148.4 0 0 1 4.4 6c.7 1.2 3 4 4.9 6.4a175.6 175.6 0 0 1 4.8 6.2l19.4 25.8a1633.4 1633.4 0 0 1 18.6 25l8 11.6c8.4 11.6 11.6 17.2 11.6 20.2 0 2.7-2.3 5.8-8.7 11.6a350.6 350.6 0 0 1-46 35.1c-5.6 3.3-6.3 3.2-10.6-1.3zM181 187.4l.9-.9c.8-.6.8-.6.2.2-.7.9-1.1 1.1-1.1.7zm96.9-78.7h1c.1.3-.2.4-.7.4-.6 0-.7-.2-.3-.3zm205.7-55h2.8c.7.2.1.2-1.4.2s-2.1 0-1.4-.2zm30 0h2.8c.7.2.1.2-1.4.2s-2.1 0-1.4-.2zM480 38.2a2 2 0 0 1 1.2 0c.4.1 0 .2-.6.2s-1-.1-.6-.2zm39.5 0c.4-.2.8-.2 1 0 .1.2-.2.3-.7.3-.6 0-.7-.2-.3-.3zm-30.5-.5a2 2 0 0 1 1.2 0c.4.1 0 .2-.6.2s-1-.1-.6-.2zm20.7 0a2.9 2.9 0 0 1 1.5 0c.4.1 0 .2-.9.2-.8 0-1-.1-.6-.3zM485.4 0a2 2 0 0 1 1.2 0c.4.2 0 .3-.6.3s-1-.1-.6-.2zm28.5 0a2 2 0 0 1 1.2 0c.4.2 0 .3-.6.3s-1-.1-.6-.2z"/>
#  <path fill="#00242c" d="M473.8 999a506.4 506.4 0 0 1-218.6-63.5A500 500 0 0 1 95.4 792.9a544.8 544.8 0 0 1-32.9-51.6 812.4 812.4 0 0 1-20-40.5 506.6 506.6 0 0 1-39-256 499.6 499.6 0 0 1 160.1-314.1A499.3 499.3 0 0 1 438.5 4.3c24.2-3 43-4 69-3.6 19.8.2 30.8.9 48 2.8 89.1 10 175 44.2 246.5 98.5a472 472 0 0 1 31.7 26.2c7.1 6.3 33 32.3 39.9 40a502.5 502.5 0 0 1 110.5 208.3A508.5 508.5 0 0 1 999 477a500.5 500.5 0 0 1-459.3 521 630.3 630.3 0 0 1-66 1z"/>
#  <path fill="#056e80" d="M501 38.6a392 392 0 0 0-45.8 1.3 473.2 473.2 0 0 0-126 30.8 450 450 0 0 0-55 26.8c-1 1-2.1 1.8-2.3 1.6-1.2-1.2-31.4 18-48 30.5a494.8 494.8 0 0 0-69.1 63.6A462.8 462.8 0 0 0 76 316.7a464.6 464.6 0 0 0-36 138.1c-1.8 17-2 69.2-.5 85.9a478.9 478.9 0 0 0 32.3 132.8A462.5 462.5 0 0 0 472.6 961c6.3.3 11.5.7 11.7.9.8.7 45.9-.7 57.6-1.9a453 453 0 0 0 143.2-36.8 642 642 0 0 0 53.2-27.5 470 470 0 0 0 145.4-138.5 491.3 491.3 0 0 0 53.7-108.5 463.3 463.3 0 0 0 17.1-231.6 463.4 463.4 0 0 0-57.8-153.8l-5.3-8.9c-7.5-12.5-25-36.5-38.7-52.8a480.7 480.7 0 0 0-88-80.3A467.8 467.8 0 0 0 576 44.2a357.3 357.3 0 0 0-75-5.6ZM498.5 54a377 377 0 0 1 87.1 7.7 466.7 466.7 0 0 1 96.2 29.8 284.4 284.4 0 0 1 26.5 13c8.4 4.3 7.5 3.8 24.7 14.2a450.4 450.4 0 0 1 146 144.6 440.8 440.8 0 0 1 67.1 237.3c0 34-1.5 50.4-7 81a521 521 0 0 1-25.4 87.8c-.6 1.6-1.6 3.9-6 13.6a28.2 28.2 0 0 0-2.1 5.6c0 .4-.8 1.8-1.6 3a32.8 32.8 0 0 0-3 5.8 35.5 35.5 0 0 1-2.8 5.7 80.7 80.7 0 0 0-3.8 6.8 455.4 455.4 0 0 1-45.1 69.3 493.8 493.8 0 0 1-81.4 78.7 446.7 446.7 0 0 1-218 86.1c-6 .7-19.6 1.6-30.3 2-18.4.8-33 .9-42.1.3A445 445 0 0 1 304 901.5a445.8 445.8 0 0 1-192-179.4 230.9 230.9 0 0 0-4-7.3 605.6 605.6 0 0 1-18.7-38l-3.5-9a439.5 439.5 0 0 1-32.2-157.5c-.8-36 2.2-69.3 9.1-102a487 487 0 0 1 30-92.8c2.1-4.8 13.1-27 14.3-28.9l13.6-23.3c.7-1.1 2.7-4.4 4.6-7.1a452.4 452.4 0 0 1 139.1-135.8 139.9 139.9 0 0 0 15-10.1c0 .3 6.5-2.8 14.4-6.8 21-10.7 20.4-10.4 33.4-15.6A449 449 0 0 0 339 83a398 398 0 0 1 36.9-12.1c25-7.2 48-11.7 76.9-15a355 355 0 0 1 45.7-2zm117.2 31.2c-2.2.4-5.6 8.7-7.3 17.7-4.4 22.6-6.5 55.8-12.3 197.2-4.4 108.7-6.3 135-10.2 141.1-1.3 2.2-2.2 2.3-3.9.6-3.3-3.4-4.2-15.4-5.7-80.5-1.3-54.8-2.4-81.4-3.7-93.6-2.5-22.7-9-32.4-14.4-21.6-4.5 8.9-5.7 25.7-7.8 105.8-1.2 44.3-2 61.5-3.3 64.7-.8 2-2.7 1.7-3.5-.5-1.2-3.2-1.7-11.7-3-49.6-1.6-52.5-2.2-59-5.7-65-3.4-5.8-6.6-6.4-9.8-1.6-4.2 6.2-5.3 16.5-7.1 68.2-1.8 51.7-2.8 60.9-6.7 62.4-2.2.8-5.4-2.3-6.8-6.6-3-8.8-4.3-22.8-10-106-5.8-83.8-8-102.3-13.7-113.7-2.3-4.5-4.5-6.1-7.4-5.4-4.4 1-7.5 8.4-22.7 53.1a520 520 0 0 1-20.1 53.9c-1 1.5-.4 2.7 6.5 12.5 4.2 6 8.7 13.1 10.1 15.9 2.3 4.7 2.4 5.1 1.3 7.7-.6 1.5-4 5.4-7.3 8.6a351 351 0 0 1-47.1 36 32 32 0 0 0-6.1 4.3 186 186 0 0 1-11.2 8.4c-7 5.1-8.3 6.3-8.3 8.2 0 1.2-.6 3.7-1.3 5.4-1 2.5-1.2 5-.9 12.8a81.8 81.8 0 0 0 9.5 35.7c14.2 28.5 72.1 106.8 113 152.5a97 97 0 0 0 9 9.4c.2-.4 1-8 2-17 1.9-19.5 3.4-27.8 5.8-32.7 2.9-5.8 7-5.5 8.7.7a280 280 0 0 1 3.2 45l.5 23.4 5.6 3.9c6 4.1 14.3 8.8 15.6 8.8.5 0 1-9.2 1.4-23 .6-26.5 1.7-44.4 3-48.1 1.6-5.1 3.4-2.6 4.3 6.3.4 4.6 2.9 59 2.9 65 0 2.1.1 2.2 4.4 2.2 4.8 0 4.6.1 16.9-11.3l3.9-3.7.7-26.7a464 464 0 0 1 3.3-54c.9-3.4 2.6-5.1 4.4-4.5 3.3 1.3 4.9 11.7 7.6 50.2.9 12 1.7 22 1.9 22 .7.8 8.7-4 17-10.3 18.4-13.8 32.9-22.3 36.3-21.2.9.3 3.8 2.5 6.5 5l4.8 4.4v-5c0-14.1 1.7-48 2.5-51.8 1.5-6.8 4.7-6.3 6.8 1.1a89.7 89.7 0 0 1 2 11c1 8.2 3 38.4 3.6 52.6l.4 10 9.6 12.2 9.5 12.1.5-3.5c.3-2 .8-13.4 1-25.5 1.7-67 3.5-88.3 7.6-92.9 1.6-1.7 5.7-1.9 8-.2a13 13 0 0 1 3.4 5c3.6 8.4 5.4 22.4 8.7 67.5 3 42.1 4.7 53 8 53 3 0 8.9-14.4 11.3-28 1.6-8.4 2.6-21 4.2-51.3 2.4-46.4 2.7-48 8.4-47.2 1.7.2 6 2.1 9.5 4.2A35 35 0 0 0 782 537c5.1 0 8-1.6 33.6-19l18.7-12.6h9.9c14.9 0 55.7-1.5 66.1-2.4 10.3-1 13.1-1.9 11.3-3.7-2.2-2.2-13-3-61.6-4.4l-26.4-.8-19-12.7c-18.8-12.7-27.6-17.6-33-18.6-4-.8-9.1.8-17.4 5.5a36.7 36.7 0 0 1-10.7 4.5c-3.1.4-3.5.2-4.3-1.8-.4-1.2-1.7-17.6-2.8-36.3-2.5-41.5-3.3-51.2-5.3-61.8-2.8-14.4-8.2-27.5-11.1-26.9-3 .6-5 13.6-7.5 48.9-4.2 59.8-6.5 73.3-13.3 77.4-3.4 2.1-4.9 2-7.2-.9-3.8-4.5-4.7-13.8-6.6-67.6-2.3-65.3-3.9-78.5-9.4-81.4-2-1.2-4.4 0-6 3-2.8 5.6-4.4 20-7 62.2-2.5 43.7-3.7 56.2-5.8 62.3-1.2 3.4-3.1 4.5-5 3-2-1.8-2 .2-4.5-148-1.2-68.4-2.2-86.5-5.8-104a54.7 54.7 0 0 0-7.7-19.7 3.9 3.9 0 0 0-6.3.4c-3.5 5.4-4.2 18.2-5.7 95.4-1.4 71.4-2.4 97.2-3.9 101.7-1.2 3.6-3.3 5.3-4.7 3.8-2.3-2.2-2.7-24.1-1.6-87.3 1.6-97.8 2-168.4 1-182.5-1.3-16.5-4.4-28-7.3-27.5zM384.6 212.6l-.5.4c-1 1.2-2.2 8-3 18.8a66 66 0 0 1-1 8.6c-.1.3-.8-.3-2.5-2.4a14.2 14.2 0 0 0-2-2l2.2 3 3.5 4.7a216.8 216.8 0 0 0 7.6 9.8 4 4 0 0 0-.3-1.2c-.4-1-.5-2.2-1-11.7-.8-18.8-1-22.2-1.7-25.3-.4-1.4-1-2.7-1.3-2.7zM220.5 448.4l-1 4.8c-1.8 9.8-4.2 15.9-7.4 19.2l-3 3.2-6.4-.3c-9.8-.5-11.7-1.7-16.4-11.2-4.2-8.2-5.8-9.8-8.9-8.1-1.5.8-3 3.5-10.1 19.1l-3 6.6-10.7 5.4a78.5 78.5 0 0 1-15 6.2c-2.5.4-14.7 1.4-27.2 2-29.4 1.6-33.6 2.2-33.6 4.8 0 2.1 5.5 2.9 28.3 3.7 32 1.3 34.5 1.6 42 6 3.4 2 7.6 4 9.2 4.5 4.4 1.4 8 6.2 12.4 16.3 4.8 11.1 6.2 12.9 9.6 12.9 3.3 0 4.8-1.6 6.6-7.3a17.1 17.1 0 0 1 17-12.1c3.5 0 9 2.8 9.8 5 .2.8.8 1.4 1.2 1.4 1.4 0 4 7 5.2 14 .6 3.7 1.7 13.3 2.4 21.3 1.6 18.2 2.6 25 4.5 29.3 1.8 4.2 4.2 4.6 8 1.3 5.4-4.5 8-12.3 11.8-37a469 469 0 0 1 4.1-23c1.3-5 4.3-8.6 6.5-7.8.6.3 1.2.3 1.2 0l-10.4-20.9a579.2 579.2 0 0 1-23.2-50.4z" style="-inkscape-stroke:none"/>
#  <path fill="#dfdfdf" d="M612.3 842.1c-.2-.2-2.2-.6-4.4-.8a75.3 75.3 0 0 1-9.7-1.7 338 338 0 0 1-43-13 279.2 279.2 0 0 0-5.2-2A474.9 474.9 0 0 1 445.5 759a552 552 0 0 1-17-15.1 990 990 0 0 1-99.4-111.4 1392.2 1392.2 0 0 1-16.4-21.5 93.3 93.3 0 0 0-4-5.2 65 65 0 0 1-3.3-4.3 173 173 0 0 0-4.7-6 99 99 0 0 0-8.3-12.4 194 194 0 0 1-15.6-24 526 526 0 0 1-29.7-53 512.7 512.7 0 0 1-23.1-50.6 363.5 363.5 0 0 1-22-79.8l-1.2-9.3c-.4-3.6-1-13-1-21-.9-44.2 11.6-79.3 37.5-106l8.5-8.8 13.4 17.3a6674.4 6674.4 0 0 1 28.4 36.7l9.7 12.6 9.9 13a67 67 0 0 0 3.8 4.8 768.2 768.2 0 0 0 10.5 13.6l5 6.3a2632.4 2632.4 0 0 0 28 35.7 288.6 288.6 0 0 1 7.6 9.7l6.6 8.7c2.2 2.6 3.9 5.5 3.9 6.3 0 .8-1 3.6-2.3 6.2a61.3 61.3 0 0 0-3.5 8.6 83.7 83.7 0 0 0 2.2 36c1.7 7.6 11.4 26.3 19.4 37.6 1.6 2 2.8 4.2 2.8 4.6 0 .5.4.8.8.8.5 0 .8.5.8 1.2 0 .6.3 1.2.7 1.4a33 33 0 0 1 4.5 6l6.4 9.3a569.9 569.9 0 0 1 4.2 6.1l3.7 5.2 14.6 19.4a1491.2 1491.2 0 0 0 59 73.7l6.6 7.3a194.4 194.4 0 0 0 43.3 35.9c5.6 2.8 12.8 3.8 26.4 3.8h13.4l17.8 23.3c28.8 37.8 92.7 123 98.6 131.7 6.7 9.5 7 8.9-6 15.5a127.4 127.4 0 0 1-36 12c-7.6 1-36.8 2-37.7 1.1zm-230.5-460a196.3 196.3 0 0 1-8.8-9.9 504 504 0 0 0-9-10.8 92.1 92.1 0 0 0-2.4-2.9 466 466 0 0 1-7.4-9.4 245.1 245.1 0 0 0-8.3-10.3c-.9-1-1.7-2-1.7-2.3A7309 7309 0 0 1 258.4 222c0-.9 9.9-9.3 20.2-17.3 17.8-13.8 42.3-28.3 48-28.5 2.8-.1 4.1 1.4 25.7 29.8l20.5 26.8 37.2 49.4c30.4 40.3 39.4 54.1 38.4 58.3-.7 2.8-7.3 9.7-17.5 18.2-18.8 15.6-38.2 29.2-41.7 29.2-1.1 0-3.8-2.2-7.4-5.9zm325.7 427a218 218 0 0 1-12.9-15.3C662.6 753 595 664 587.2 652.5l-4.2-6.3 2.4-3.4c2-2.9 12.7-12.8 20-18.7 13.8-11 37-25.5 40.7-25.5 2.2 0 11 8 19 17.3l7.6 8.9c4.7 5.2 50.3 65.3 67.3 88.8a589 589 0 0 1 29.5 43l1.9 3.9-2.1 3a248.2 248.2 0 0 1-26 26.5c-13.2 11.4-28 21.6-31.5 21.6-.8 0-2.7-1.2-4.3-2.6z" style="-inkscape-stroke:none"/>
#</svg>
#EOF

#  cat <<EOF > "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
#<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512"><defs><linearGradient id="d"><stop offset="0" stop-color="#eba936"/><stop offset="1" stop-color="#c95328"/></linearGradient><linearGradient xlink:href="#a" id="e" x1="1012.513" x2="1006.808" y1="484.417" y2="20.626" gradientTransform="translate(-830.864 592.678) scale(1.03178)" gradientUnits="userSpaceOnUse"/><linearGradient id="a" x1="45.448" x2="45.448" y1="92.54" y2="7.017" gradientTransform="matrix(1.00587 0 0 .99417 100 0)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-opacity=".588"/></linearGradient><linearGradient xlink:href="#a" id="f" x1="1012.513" x2="1006.808" y1="484.417" y2="20.626" gradientTransform="translate(-837.951 592.518) scale(1.04025)" gradientUnits="userSpaceOnUse"/><linearGradient xlink:href="#a" id="g" x1="1012.513" x2="1006.808" y1="484.417" y2="20.626" gradientTransform="translate(-823.777 592.838) scale(1.0233)" gradientUnits="userSpaceOnUse"/><linearGradient xlink:href="#a" id="h" x1="1012.513" x2="1006.808" y1="484.417" y2="20.626" gradientTransform="translate(-816.69 592.997) scale(1.01483)" gradientUnits="userSpaceOnUse"/><linearGradient xlink:href="#a" id="i" x1="1012.513" x2="1006.808" y1="484.417" y2="20.626" gradientTransform="translate(-810.489 593.137) scale(1.00742)" gradientUnits="userSpaceOnUse"/><linearGradient xlink:href="#b" id="k" x1="993.439" x2="988.786" y1="51.512" y2="363.738" gradientTransform="translate(778.6 -360.56)" gradientUnits="userSpaceOnUse"/><linearGradient id="b"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient xlink:href="#c" id="l" x1="1764.649" x2="1763.69" y1="155.597" y2="-55.941" gradientUnits="userSpaceOnUse"/><linearGradient id="c"><stop offset="0"/><stop offset="1" stop-color="#fff" stop-opacity=".2"/></linearGradient><linearGradient xlink:href="#d" id="j" x1="390.75" x2="390.75" y1="482" y2="30" gradientUnits="userSpaceOnUse"/></defs><g color="#000" transform="translate(-11.985 -592.117)"><rect width="487" height="487" x="31.985" y="612.117" fill="url(#e)" opacity=".1" overflow="visible" ry="101.458" style="marker:none"/><rect width="491" height="491" x="31.985" y="612.117" fill="url(#f)" opacity=".08" overflow="visible" ry="102.292" style="marker:none"/><rect width="483" height="483" x="31.985" y="612.117" fill="url(#g)" opacity=".2" overflow="visible" ry="100.625" style="marker:none"/><rect width="479" height="479" x="31.985" y="612.117" fill="url(#h)" opacity=".25" overflow="visible" ry="99.792" style="marker:none"/><rect width="475.5" height="475.5" x="31.985" y="612.117" fill="url(#i)" opacity=".25" overflow="visible" ry="99.063" style="marker:none"/></g><path fill="url(#j)" d="M118.344 20C63.867 20 20 63.867 20 118.344v275.312C20 448.133 63.867 492 118.344 492h275.312C448.133 492 492 448.133 492 393.656V118.344C492 63.867 448.133 20 393.656 20H118.344z"/><path fill="#fff" d="M298.425 118.613c-4.792-.057-9.428.308-13.817 1.146-15.26 2.911-12.892 4.167 9.489 5.028 34.709 1.336 82.47 31.06 94.38 58.738 6.539 15.198 8.874 16.327 11.1 5.364 6.084-29.952-54.83-69.73-101.152-70.276z"/><path fill="#fff" d="M281.16 143.162a54.367 54.367 0 0 0-2.132.01c-8.116.21-25.936 5.466-39.599 11.679-24.619 11.194-24.514 11.254 11.53 6.778 43.548-5.408 85.14 13.978 99.678 46.461 7.023 15.692 12.134 19.037 18.767 12.284 20.882-21.258-43.186-76.597-88.245-77.212z"/><path fill="#fff" d="M252.097 186.196c-14.099-.032-27.38 2.807-36.187 9.363-12.147 9.041-9 10.21 21.188 7.874 22.75-1.761 41.388 1.89 52.014 10.187 19.145 14.948 28.98 16.82 28.98 5.516 0-18.894-34.976-32.868-65.994-32.94z"/><path fill-opacity=".196" d="M267.658 254.096zm4.373 3.039c.01 4.153-3.261 12.485-8.73 25.81-12.143 29.586-11.856 31.3 9.011 53.473 29.26 31.09 41.148 77.259 29.301 113.8-8.529 26.31-18.598 39.685-31.006 41.782h123.05c27.773 0 52.785-11.406 70.636-29.803-91.796-92.201-176.782-187.324-192.262-205.062zm-47.578 16.375zm-8.57 2.148c-8.135 1.687-17.508 2.734-28.85 3.238 11.342-.504 20.715-1.551 28.85-3.238zm-83.69 2.987zm14.17.226c9.61.294 18.245.426 26.067.375-7.822.05-16.458-.081-26.067-.375zm-27.644-.023zm-41.249 3.933zm-9.972 2.004c-4.773 1.096-9.222 2.332-13.332 3.701 4.11-1.37 8.56-2.605 13.332-3.7zM50.17 289.9zm-7.297 3.092c-2.844 1.36-5.439 2.81-7.777 4.346 2.338-1.536 4.933-2.985 7.777-4.346zm-9.15 5.278zm-2.557 1.923zm-11.141 23.803c.006.296.02.57.028.852-.009-.285-.022-.552-.028-.852zm.118 2.709zm.147 1.613c.004.036.01.069.015.104l-.016-.104zm.163.977zm.953 2.406.032.04-.032-.04zm.454.475zm3.056.623c-.05.007-.1.012-.15.017.05-.006.1-.01.15-.017zm-1.018.064h.106-.106z"/><path fill="#fff" d="M268.725 253.946c-4.317.307-13.084 4.874-27.636 12.721-19.907 10.734-43.477 13.77-94.726 12.205C68.988 276.508 20 292.837 20 320.99c0 15.546.948 15.601 26.91 1.562 16.47-8.907 44.58-14.407 72.454-14.176 102.583.853 181.05 83.583 145.555 153.46-9.785 19.263-10.4 26.132-2.595 28.989 15.172 5.553 28.936-8.674 39.288-40.606 11.847-36.541-.04-82.71-29.299-113.8-20.867-22.173-21.155-23.888-9.012-53.474 8.537-20.799 11.734-29.448 5.424-28.999z"/><path fill="#fff" d="M59.676 371.008c-3.114.08-6.327.724-9.57 1.991-19.027 7.433-16.93 44.524 3.703 65.53 9.488 9.658 29.052 22.785 43.474 29.172 33.022 14.623 105.574 15.64 123.845 1.736 7.615-5.796 14.847-20.022 16.072-31.612 1.998-18.897-.764-21.072-26.751-21.072-23.461 0-28.983 3.21-28.983 16.857 0 12.625-6.236 17.41-24.84 19.051-38.128 3.364-66.245-15.15-66.245-43.624 0-22.514-13.894-38.465-30.705-38.03z"/><g color="#000"><path fill="url(#k)" d="M1650.5-310.416c-54.477 0-98.313 43.836-98.313 98.312V63.24c0 54.477 43.836 98.344 98.312 98.344h2.938c-53.323 0-96.25-42.928-96.25-96.25v-269.5c0-53.323 42.927-96.25 96.25-96.25h269.5c53.322 0 96.25 42.927 96.25 96.25v269.5c0 53.322-42.928 96.25-96.25 96.25h2.906c54.477 0 98.344-43.867 98.344-98.344v-275.344c0-54.476-43.867-98.312-98.344-98.312H1650.5z" opacity=".5" overflow="visible" style="marker:none" transform="translate(-1532.187 330.416)"/><path fill="url(#l)" d="M1650.5 161.584c-54.477 0-98.313-43.836-98.313-98.313v-275.343c0-54.477 43.836-98.344 98.312-98.344h2.938c-53.323 0-96.25 42.927-96.25 96.25v269.5c0 53.322 42.927 96.25 96.25 96.25h269.5c53.322 0 96.25-42.928 96.25-96.25v-269.5c0-53.323-42.928-96.25-96.25-96.25h2.906c54.477 0 98.344 43.867 98.344 98.344V63.27c0 54.477-43.867 98.313-98.344 98.313H1650.5z" opacity=".2" overflow="visible" style="marker:none" transform="translate(-1532.187 330.416)"/></g></svg>
#EOF

#  echo "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"512\" height=\"512\"><defs><linearGradient id=\"d\"><stop offset=\"0\" stop-color=\"#eba936\"/><stop offset=\"1\" stop-color=\"#c95328\"/></linearGradient><linearGradient xlink:href=\"#a\" id=\"e\" x1=\"1012.513\" x2=\"1006.808\" y1=\"484.417\" y2=\"20.626\" gradientTransform=\"translate(-830.864 592.678) scale(1.03178)\" gradientUnits=\"userSpaceOnUse\"/><linearGradient id=\"a\" x1=\"45.448\" x2=\"45.448\" y1=\"92.54\" y2=\"7.017\" gradientTransform=\"matrix(1.00587 0 0 .99417 100 0)\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\"/><stop offset=\"1\" stop-opacity=\".588\"/></linearGradient><linearGradient xlink:href=\"#a\" id=\"f\" x1=\"1012.513\" x2=\"1006.808\" y1=\"484.417\" y2=\"20.626\" gradientTransform=\"translate(-837.951 592.518) scale(1.04025)\" gradientUnits=\"userSpaceOnUse\"/><linearGradient xlink:href=\"#a\" id=\"g\" x1=\"1012.513\" x2=\"1006.808\" y1=\"484.417\" y2=\"20.626\" gradientTransform=\"translate(-823.777 592.838) scale(1.0233)\" gradientUnits=\"userSpaceOnUse\"/><linearGradient xlink:href=\"#a\" id=\"h\" x1=\"1012.513\" x2=\"1006.808\" y1=\"484.417\" y2=\"20.626\" gradientTransform=\"translate(-816.69 592.997) scale(1.01483)\" gradientUnits=\"userSpaceOnUse\"/><linearGradient xlink:href=\"#a\" id=\"i\" x1=\"1012.513\" x2=\"1006.808\" y1=\"484.417\" y2=\"20.626\" gradientTransform=\"translate(-810.489 593.137) scale(1.00742)\" gradientUnits=\"userSpaceOnUse\"/><linearGradient xlink:href=\"#b\" id=\"k\" x1=\"993.439\" x2=\"988.786\" y1=\"51.512\" y2=\"363.738\" gradientTransform=\"translate(778.6 -360.56)\" gradientUnits=\"userSpaceOnUse\"/><linearGradient id=\"b\"><stop offset=\"0\" stop-color=\"#fff\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></linearGradient><linearGradient xlink:href=\"#c\" id=\"l\" x1=\"1764.649\" x2=\"1763.69\" y1=\"155.597\" y2=\"-55.941\" gradientUnits=\"userSpaceOnUse\"/><linearGradient id=\"c\"><stop offset=\"0\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\".2\"/></linearGradient><linearGradient xlink:href=\"#d\" id=\"j\" x1=\"390.75\" x2=\"390.75\" y1=\"482\" y2=\"30\" gradientUnits=\"userSpaceOnUse\"/></defs><g color=\"#000\" transform=\"translate(-11.985 -592.117)\"><rect width=\"487\" height=\"487\" x=\"31.985\" y=\"612.117\" fill=\"url(#e)\" opacity=\".1\" overflow=\"visible\" ry=\"101.458\" style=\"marker:none\"/><rect width=\"491\" height=\"491\" x=\"31.985\" y=\"612.117\" fill=\"url(#f)\" opacity=\".08\" overflow=\"visible\" ry=\"102.292\" style=\"marker:none\"/><rect width=\"483\" height=\"483\" x=\"31.985\" y=\"612.117\" fill=\"url(#g)\" opacity=\".2\" overflow=\"visible\" ry=\"100.625\" style=\"marker:none\"/><rect width=\"479\" height=\"479\" x=\"31.985\" y=\"612.117\" fill=\"url(#h)\" opacity=\".25\" overflow=\"visible\" ry=\"99.792\" style=\"marker:none\"/><rect width=\"475.5\" height=\"475.5\" x=\"31.985\" y=\"612.117\" fill=\"url(#i)\" opacity=\".25\" overflow=\"visible\" ry=\"99.063\" style=\"marker:none\"/></g><path fill=\"url(#j)\" d=\"M118.344 20C63.867 20 20 63.867 20 118.344v275.312C20 448.133 63.867 492 118.344 492h275.312C448.133 492 492 448.133 492 393.656V118.344C492 63.867 448.133 20 393.656 20H118.344z\"/><path fill=\"#fff\" d=\"M298.425 118.613c-4.792-.057-9.428.308-13.817 1.146-15.26 2.911-12.892 4.167 9.489 5.028 34.709 1.336 82.47 31.06 94.38 58.738 6.539 15.198 8.874 16.327 11.1 5.364 6.084-29.952-54.83-69.73-101.152-70.276z\"/><path fill=\"#fff\" d=\"M281.16 143.162a54.367 54.367 0 0 0-2.132.01c-8.116.21-25.936 5.466-39.599 11.679-24.619 11.194-24.514 11.254 11.53 6.778 43.548-5.408 85.14 13.978 99.678 46.461 7.023 15.692 12.134 19.037 18.767 12.284 20.882-21.258-43.186-76.597-88.245-77.212z\"/><path fill=\"#fff\" d=\"M252.097 186.196c-14.099-.032-27.38 2.807-36.187 9.363-12.147 9.041-9 10.21 21.188 7.874 22.75-1.761 41.388 1.89 52.014 10.187 19.145 14.948 28.98 16.82 28.98 5.516 0-18.894-34.976-32.868-65.994-32.94z\"/><path fill-opacity=\".196\" d=\"M267.658 254.096zm4.373 3.039c.01 4.153-3.261 12.485-8.73 25.81-12.143 29.586-11.856 31.3 9.011 53.473 29.26 31.09 41.148 77.259 29.301 113.8-8.529 26.31-18.598 39.685-31.006 41.782h123.05c27.773 0 52.785-11.406 70.636-29.803-91.796-92.201-176.782-187.324-192.262-205.062zm-47.578 16.375zm-8.57 2.148c-8.135 1.687-17.508 2.734-28.85 3.238 11.342-.504 20.715-1.551 28.85-3.238zm-83.69 2.987zm14.17.226c9.61.294 18.245.426 26.067.375-7.822.05-16.458-.081-26.067-.375zm-27.644-.023zm-41.249 3.933zm-9.972 2.004c-4.773 1.096-9.222 2.332-13.332 3.701 4.11-1.37 8.56-2.605 13.332-3.7zM50.17 289.9zm-7.297 3.092c-2.844 1.36-5.439 2.81-7.777 4.346 2.338-1.536 4.933-2.985 7.777-4.346zm-9.15 5.278zm-2.557 1.923zm-11.141 23.803c.006.296.02.57.028.852-.009-.285-.022-.552-.028-.852zm.118 2.709zm.147 1.613c.004.036.01.069.015.104l-.016-.104zm.163.977zm.953 2.406.032.04-.032-.04zm.454.475zm3.056.623c-.05.007-.1.012-.15.017.05-.006.1-.01.15-.017zm-1.018.064h.106-.106z\"/><path fill=\"#fff\" d=\"M268.725 253.946c-4.317.307-13.084 4.874-27.636 12.721-19.907 10.734-43.477 13.77-94.726 12.205C68.988 276.508 20 292.837 20 320.99c0 15.546.948 15.601 26.91 1.562 16.47-8.907 44.58-14.407 72.454-14.176 102.583.853 181.05 83.583 145.555 153.46-9.785 19.263-10.4 26.132-2.595 28.989 15.172 5.553 28.936-8.674 39.288-40.606 11.847-36.541-.04-82.71-29.299-113.8-20.867-22.173-21.155-23.888-9.012-53.474 8.537-20.799 11.734-29.448 5.424-28.999z\"/><path fill=\"#fff\" d=\"M59.676 371.008c-3.114.08-6.327.724-9.57 1.991-19.027 7.433-16.93 44.524 3.703 65.53 9.488 9.658 29.052 22.785 43.474 29.172 33.022 14.623 105.574 15.64 123.845 1.736 7.615-5.796 14.847-20.022 16.072-31.612 1.998-18.897-.764-21.072-26.751-21.072-23.461 0-28.983 3.21-28.983 16.857 0 12.625-6.236 17.41-24.84 19.051-38.128 3.364-66.245-15.15-66.245-43.624 0-22.514-13.894-38.465-30.705-38.03z\"/><g color=\"#000\"><path fill=\"url(#k)\" d=\"M1650.5-310.416c-54.477 0-98.313 43.836-98.313 98.312V63.24c0 54.477 43.836 98.344 98.312 98.344h2.938c-53.323 0-96.25-42.928-96.25-96.25v-269.5c0-53.323 42.927-96.25 96.25-96.25h269.5c53.322 0 96.25 42.927 96.25 96.25v269.5c0 53.322-42.928 96.25-96.25 96.25h2.906c54.477 0 98.344-43.867 98.344-98.344v-275.344c0-54.476-43.867-98.312-98.344-98.312H1650.5z\" opacity=\".5\" overflow=\"visible\" style=\"marker:none\" transform=\"translate(-1532.187 330.416)\"/><path fill=\"url(#l)\" d=\"M1650.5 161.584c-54.477 0-98.313-43.836-98.313-98.313v-275.343c0-54.477 43.836-98.344 98.312-98.344h2.938c-53.323 0-96.25 42.927-96.25 96.25v269.5c0 53.322 42.927 96.25 96.25 96.25h269.5c53.322 0 96.25-42.928 96.25-96.25v-269.5c0-53.323-42.928-96.25-96.25-96.25h2.906c54.477 0 98.344 43.867 98.344 98.344V63.27c0 54.477-43.867 98.313-98.344 98.313H1650.5z\" opacity=\".2\" overflow=\"visible\" style=\"marker:none\" transform=\"translate(-1532.187 330.416)\"/></g></svg>" > "${_icon}"
  echo "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" width=\"512\" height=\"512\" viewBox=\"0 0 135.467 135.467\"><defs><linearGradient id=\"a\"><stop offset=\"0\" style=\"stop-color:#000;stop-opacity:1\"/><stop offset=\"1\" style=\"stop-color:#275e18;stop-opacity:1\"/></linearGradient><linearGradient xlink:href=\"#a\" id=\"b\" x1=\"46.497\" x2=\"103.506\" y1=\"66.821\" y2=\"66.821\" gradientUnits=\"userSpaceOnUse\"/></defs><path d=\"M11.32 135.467C5.233 135.44.027 130.44 0 125.469V9.958C-.009 4.588 4.966-.034 9.96 0H125.507c5.433.06 9.934 5.37 9.961 9.958v115.511c-.05 5.285-5.284 9.946-9.96 9.957l-56.113.038c-30.862.02-58.073.003-58.073.003z\" style=\"fill:#eb6608;stroke:none;stroke-width:.287295;-inkscape-stroke:none;stop-color:#000;fill-opacity:1\"/><path d=\"M90.655 26.395c11.131 4.975 19.654 10.91 25.642 17.857 12.664 14.692 16.2 33.49 9.396 49.947-4.025 9.736-9.216 15.582-18.01 20.284-12.216 6.53-26.978 7.371-44.028 2.506-7.823-2.233-14.784-5.324-20.87-9.269l-2.297-1.488-16.33 1.741c-8.98.958-16.343 1.536-16.36 1.283-.017-.252 3.081-4.668 6.886-9.814 3.804-5.145 6.98-9.578 7.059-9.85.078-.273-1.427-3.29-3.343-6.704-6.284-11.196-7.906-19.586-6.043-31.263 1.776-11.14 7.894-19.649 18.605-25.875 9.134-5.31 17.626-7.4 28.922-7.113 4.728.12 6.84.503 15.653 2.846 6.944 1.846 11.757 3.41 15.118 4.912zm-19.455.367c-6.987-1.096-10.64-1.046-18.047.244-5.89 1.026-7.48 1.568-11.836 4.032-5.869 3.32-9.45 6.906-12.274 12.29-2.932 5.588-3.454 12.086-1.677 20.894 2.893 14.34 12.246 25.63 29.421 35.517 3.642 2.097 5.772 2.91 13.178 5.029 7.992 2.286 9.417 2.543 14.949 2.694 7.31.2 11.006-.256 16.655-2.053 10.195-3.242 16.958-10.214 19.91-20.528 1.133-3.958 1.784-10.525 1.383-13.953-.455-3.885-2.804-10.689-5.061-14.654-2.225-3.909-6.84-9.758-10.062-12.752-8.312-7.724-23.585-14.73-36.54-16.76Z\" style=\"fill:url(#b);stroke-width:1.4097;stroke:#fff;stroke-opacity:1;stroke-dasharray:none;font-variation-settings:normal;opacity:1;vector-effect:none;fill-opacity:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;-inkscape-stroke:none;stop-color:#000;stop-opacity:1\"/><path d=\"M83.634 99.177c-1.865-2.429-4.071-8.828-4.128-11.972-.021-1.194.218-3.014.531-4.045.562-1.85.625-1.893 4.664-3.196 4.426-1.428 5.408-2.414 5.337-5.362-.043-1.788-1.94-7.12-3.86-10.849-2.452-4.762-9.11-12.735-11.681-13.989-.954-.465-5.191-1.517-5.29-1.314-.354.726-3.613 4.884-4.381 5.59-3.774 3.468-15.035-3.432-17.297-10.596-.55-1.747-.494-2.029.836-4.167.895-1.44 2.527-3.143 4.384-4.579 4.602-3.557 8.586-3.942 15.485-1.494 11.496 4.078 21.998 14.52 29.363 29.195 5.056 10.074 6.625 22.774 3.777 30.585-.838 2.3-1.251 2.848-3.505 4.654-4.1 3.285-9.553 5.132-11.848 4.013-.428-.209-1.502-1.322-2.387-2.474z\" style=\"fill:url(#b);stroke:#fff;stroke-width:1.40970347;stop-color:#000;fill-opacity:1;stroke-opacity:1;stroke-dasharray:none\"/></svg>" > "${_icon}"

#  cat <<EOF > "${_icon}"
#<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" width="512" height="512" viewBox="0 0 135.467 135.467"><defs><linearGradient id="a"><stop offset="0" style="stop-color:#000;stop-opacity:1"/><stop offset="1" style="stop-color:#275e18;stop-opacity:1"/></linearGradient><linearGradient xlink:href="#a" id="b" x1="46.497" x2="103.506" y1="66.821" y2="66.821" gradientUnits="userSpaceOnUse"/></defs><path d="M11.32 135.467C5.233 135.44.027 130.44 0 125.469V9.958C-.009 4.588 4.966-.034 9.96 0H125.507c5.433.06 9.934 5.37 9.961 9.958v115.511c-.05 5.285-5.284 9.946-9.96 9.957l-56.113.038c-30.862.02-58.073.003-58.073.003z" style="fill:#eb6608;stroke:none;stroke-width:.287295;-inkscape-stroke:none;stop-color:#000;fill-opacity:1"/><path d="M90.655 26.395c11.131 4.975 19.654 10.91 25.642 17.857 12.664 14.692 16.2 33.49 9.396 49.947-4.025 9.736-9.216 15.582-18.01 20.284-12.216 6.53-26.978 7.371-44.028 2.506-7.823-2.233-14.784-5.324-20.87-9.269l-2.297-1.488-16.33 1.741c-8.98.958-16.343 1.536-16.36 1.283-.017-.252 3.081-4.668 6.886-9.814 3.804-5.145 6.98-9.578 7.059-9.85.078-.273-1.427-3.29-3.343-6.704-6.284-11.196-7.906-19.586-6.043-31.263 1.776-11.14 7.894-19.649 18.605-25.875 9.134-5.31 17.626-7.4 28.922-7.113 4.728.12 6.84.503 15.653 2.846 6.944 1.846 11.757 3.41 15.118 4.912zm-19.455.367c-6.987-1.096-10.64-1.046-18.047.244-5.89 1.026-7.48 1.568-11.836 4.032-5.869 3.32-9.45 6.906-12.274 12.29-2.932 5.588-3.454 12.086-1.677 20.894 2.893 14.34 12.246 25.63 29.421 35.517 3.642 2.097 5.772 2.91 13.178 5.029 7.992 2.286 9.417 2.543 14.949 2.694 7.31.2 11.006-.256 16.655-2.053 10.195-3.242 16.958-10.214 19.91-20.528 1.133-3.958 1.784-10.525 1.383-13.953-.455-3.885-2.804-10.689-5.061-14.654-2.225-3.909-6.84-9.758-10.062-12.752-8.312-7.724-23.585-14.73-36.54-16.76Z" style="fill:url(#b);stroke-width:1.4097;stroke:#fff;stroke-opacity:1;stroke-dasharray:none;font-variation-settings:normal;opacity:1;vector-effect:none;fill-opacity:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;-inkscape-stroke:none;stop-color:#000;stop-opacity:1"/><path d="M83.634 99.177c-1.865-2.429-4.071-8.828-4.128-11.972-.021-1.194.218-3.014.531-4.045.562-1.85.625-1.893 4.664-3.196 4.426-1.428 5.408-2.414 5.337-5.362-.043-1.788-1.94-7.12-3.86-10.849-2.452-4.762-9.11-12.735-11.681-13.989-.954-.465-5.191-1.517-5.29-1.314-.354.726-3.613 4.884-4.381 5.59-3.774 3.468-15.035-3.432-17.297-10.596-.55-1.747-.494-2.029.836-4.167.895-1.44 2.527-3.143 4.384-4.579 4.602-3.557 8.586-3.942 15.485-1.494 11.496 4.078 21.998 14.52 29.363 29.195 5.056 10.074 6.625 22.774 3.777 30.585-.838 2.3-1.251 2.848-3.505 4.654-4.1 3.285-9.553 5.132-11.848 4.013-.428-.209-1.502-1.322-2.387-2.474z" style="fill:url(#b);stroke:#fff;stroke-width:1.40970347;stop-color:#000;fill-opacity:1;stroke-opacity:1;stroke-dasharray:none"/></svg>
#EOF

  sed -i "s|Icon=.*|Icon=${_icon_name}|g" "${pkgdir}/usr/share/applications/${pkgname}.desktop"

  # Fix ${_install_prefix}/bin/${_executable} not finding its libraries in ../lib/
  if ${_alternative_one}; then
    # Alternative 1
    # Add linphone's own lib folder to LD_LIBRARY_PATH
    echo "#!/bin/bash" > "$pkgdir${_install_prefix}/${_executable}-launcher"
    echo "LD_LIBRARY_PATH=\"${_install_prefix}/lib:\$LD_LIBRARY_PATH\" \"./bin/${_executable}\" \"\$@\"" >> "$pkgdir${_install_prefix}/${_executable}-launcher"
    chmod +x "$pkgdir${_install_prefix}/${_executable}-launcher"
    # End alternative 1
  fi
  if ${_alternative_two}; then
    # Alternative 2
    # Create ${pkgname}.conf and let ldconfig find those libraries
    mkdir -p "$pkgdir/etc/ld.so.conf.d"
    echo "${_install_prefix}/lib" > "$pkgdir/etc/ld.so.conf.d/${pkgname}.conf"
    chmod 644 "$pkgdir/etc/ld.so.conf.d/${pkgname}.conf"
    # End alternative 2
  fi
  
  echo "--- Start list files that will be packaged ---" 
  find ${pkgdir} | sed "s|${pkgdir}||g"
  echo "--- End list files that will be packaged ---" 
}
openSUSE Build Service is sponsored by